You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return of acc.JustFinishedToolCall() - FinishedChatCompletionToolCall does not contain toolCallID, which is is required for openai.ToolMessage, so users need to record it by themselves.
acc.JustFinishedToolCall()
-FinishedChatCompletionToolCall
does not contain toolCallID, which is is required foropenai.ToolMessage
, so users need to record it by themselves.Message
to the message list used in the API call.For non-streaming, you can simply append
chat.choices[0].message
like:https://github.com/openai/openai-[go/blob/952d231c9d5fce675262a6a639a99a62249d4a7f/examples/chat-completion-tool-calling/main.go#L62](https://www.golinks.io/blob/952d231c9d5fce675262a6a639a99a62249d4a7f/examples/chat-completion-tool-calling/main.go#L62?trackSource=github)
For streaming, it seems that there's not implements about it, maybe something like
openai.ToolCallsMessage
? Or, simply useFinishedChatCompletionToolCall
as the Message?Also, I could not find any examples about it. I only found this:
https://github.com/openai/openai-[go/blob/952d231c9d5fce675262a6a639a99a62249d4a7f/examples/chat-completion-accumulating/main.go#L65-L68](https://www.golinks.io/blob/952d231c9d5fce675262a6a639a99a62249d4a7f/examples/chat-completion-accumulating/main.go#L65-L68?trackSource=github)
If you don't append the origin tool call
Message
with only oneopenai.ToolMessage
, you will get this error:The text was updated successfully, but these errors were encountered: