mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +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
|
for tool_call in message.tool_calls
|
||||||
]
|
]
|
||||||
return ChatCompletionAssistantMessageParam(
|
param = ChatCompletionAssistantMessageParam(
|
||||||
role=message.role,
|
role=message.role,
|
||||||
tool_calls=tool_calls,
|
|
||||||
content=message.content,
|
content=message.content,
|
||||||
)
|
)
|
||||||
|
if tool_calls:
|
||||||
|
param["tool_calls"] = tool_calls
|
||||||
|
return param
|
||||||
|
|
||||||
messages.append(message_convert(response))
|
messages.append(message_convert(response))
|
||||||
tool_calls = response.tool_calls
|
tool_calls = response.tool_calls
|
||||||
|
Loading…
x
Reference in New Issue
Block a user