mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Fix openAI tool calls (#118577)
This commit is contained in:
parent
b459559c8b
commit
c01c155037
@ -247,11 +247,13 @@ class OpenAIConversationEntity(
|
||||
)
|
||||
for tool_call in message.tool_calls
|
||||
]
|
||||
return ChatCompletionAssistantMessageParam(
|
||||
param = ChatCompletionAssistantMessageParam(
|
||||
role=message.role,
|
||||
tool_calls=tool_calls,
|
||||
content=message.content,
|
||||
)
|
||||
if tool_calls:
|
||||
param["tool_calls"] = tool_calls
|
||||
return param
|
||||
|
||||
messages.append(message_convert(response))
|
||||
tool_calls = response.tool_calls
|
||||
|
Loading…
x
Reference in New Issue
Block a user