Fix CreateChatCompletion
Don't double-append toolReplies
This commit is contained in:
parent
1966ec881b
commit
59e78669c8
@ -90,7 +90,7 @@ func CreateChatCompletion(model string, messages []Message, maxTokens int, repli
|
|||||||
messages = append(append(messages, assistantReply), toolReplies...)
|
messages = append(append(messages, assistantReply), toolReplies...)
|
||||||
// Recurse into CreateChatCompletion with the tool call replies added
|
// Recurse into CreateChatCompletion with the tool call replies added
|
||||||
// to the original messages
|
// to the original messages
|
||||||
return CreateChatCompletion(model, append(messages, toolReplies...), maxTokens, replies)
|
return CreateChatCompletion(model, messages, maxTokens, replies)
|
||||||
}
|
}
|
||||||
|
|
||||||
if replies != nil {
|
if replies != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user