fix: in the localagent.py yield MessageChunk add agr tool_calls,and After calling the "tool_calls", the first returned body data will be concatenated.

This commit is contained in:
Dong_master
2025-08-12 11:25:37 +08:00
parent 9f22b8b585
commit e744e9c4ef
2 changed files with 7 additions and 0 deletions
@@ -248,6 +248,7 @@ class ModelScopeChatCompletions(requester.ProviderAPIRequester):
if hasattr(chunk, 'choices') and chunk.choices:
choice = chunk.choices[0]
delta = choice.delta.model_dump() if hasattr(choice, 'delta') else {}
print(delta)
finish_reason = getattr(choice, 'finish_reason', None)
else:
delta = {}