mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Small fix in OpenAI Responses client (#1509)
This commit is contained in:
committed by
GitHub
Unverified
parent
f9a9fc7605
commit
3b9193c15e
@@ -391,6 +391,9 @@ class OpenAIBaseResponsesClient(OpenAIBase, BaseChatClient):
|
||||
args["metadata"] = message.additional_properties
|
||||
for content in message.contents:
|
||||
match content:
|
||||
case TextReasoningContent():
|
||||
# Don't send reasoning content back to model
|
||||
continue
|
||||
case FunctionResultContent():
|
||||
new_args: dict[str, Any] = {}
|
||||
new_args.update(self._openai_content_parser(message.role, content, call_id_to_id))
|
||||
@@ -485,6 +488,7 @@ class OpenAIBaseResponsesClient(OpenAIBase, BaseChatClient):
|
||||
"type": "function_call",
|
||||
"name": content.name,
|
||||
"arguments": content.arguments,
|
||||
"status": None,
|
||||
}
|
||||
case FunctionResultContent():
|
||||
# call_id for the result needs to be the same as the call_id for the function call
|
||||
|
||||
Reference in New Issue
Block a user