mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-10-21 04:40:13 +00:00
fix: add reasoning field fallback in ChatCompletionsTransport.parse (#1731)
This commit is contained in:
parent
af74550409
commit
9aca3adbb8
1 changed files with 7 additions and 3 deletions
|
|
@ -588,9 +588,13 @@ class ChatCompletionsTransport:
|
|||
response_delta = _get_value(delta, "content") or _get_value(
|
||||
message, "content"
|
||||
) or ""
|
||||
reasoning_delta = _get_value(delta, "reasoning_content") or _get_value(
|
||||
message, "reasoning_content"
|
||||
) or ""
|
||||
reasoning_delta = (
|
||||
_get_value(delta, "reasoning_content")
|
||||
or _get_value(message, "reasoning_content")
|
||||
or _get_value(delta, "reasoning")
|
||||
or _get_value(message, "reasoning")
|
||||
or ""
|
||||
)
|
||||
reasoning_delta = (reasoning_filter or _ChatReasoningFilter()).feed(
|
||||
reasoning_delta, final=reasoning_filter is None
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue