fix(muse-glimmer): parse required/named tool calls natively (#34781)
Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
This commit is contained in:
co-authored by
Xinyuan Tong
parent
d7207be156
commit
42e8718d3d
@@ -251,6 +251,11 @@ class MuseGlimmerDetector(BaseFormatDetector):
|
|||||||
def supports_structural_tag(self) -> bool:
|
def supports_structural_tag(self) -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def parses_required_natively(self) -> bool:
|
||||||
|
"""The model only ever emits ATEM tool calls, so the JSON-array grammar
|
||||||
|
the default required/named path forces cannot parse its output."""
|
||||||
|
return True
|
||||||
|
|
||||||
def structure_info(self) -> _GetInfoFunc:
|
def structure_info(self) -> _GetInfoFunc:
|
||||||
return lambda name: StructureInfo(
|
return lambda name: StructureInfo(
|
||||||
begin=f'{FUNCTION_CALLS_OPEN}\n{INVOKE_OPEN} name="{name}">',
|
begin=f'{FUNCTION_CALLS_OPEN}\n{INVOKE_OPEN} name="{name}">',
|
||||||
|
|||||||
Reference in New Issue
Block a user