Merge branch 'main' into agent_session_unit_test

This commit is contained in:
Francisco Arceo 2025-08-12 18:22:22 -06:00 committed by GitHub
commit 3edf413db5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 267 additions and 213 deletions

View file

@ -488,8 +488,12 @@ class OpenAIResponsesImpl:
# Convert collected chunks to complete response
if chat_response_tool_calls:
tool_calls = [chat_response_tool_calls[i] for i in sorted(chat_response_tool_calls.keys())]
# when there are tool calls, we need to clear the content
chat_response_content = []
else:
tool_calls = None
assistant_message = OpenAIAssistantMessageParam(
content="".join(chat_response_content),
tool_calls=tool_calls,