Unverified Commit ae335842 authored by Chang Su's avatar Chang Su Committed by GitHub
Browse files

[Bugfix]: Fix call for function_call_parser.multi_format_detector in adapter.py (#6650)

parent 477a101c
......@@ -1618,14 +1618,14 @@ async def v1_chat_completions(
latest_delta_len = len(call_item.parameters)
expected_call = json.dumps(
parser.multi_format_parser.detectors[0]
.prev_tool_call_arr[index]
.get("arguments", {}),
parser.detector.prev_tool_call_arr[index].get(
"arguments", {}
),
ensure_ascii=False,
)
actual_call = parser.multi_format_parser.detectors[
0
].streamed_args_for_tool[index]
actual_call = parser.detector.streamed_args_for_tool[
index
]
if latest_delta_len > 0:
actual_call = actual_call[:-latest_delta_len]
remaining_call = expected_call.replace(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment