Fix CreateChatCompletion

Don't double-append toolReplies
This commit is contained in:
Matt Low 2023-12-06 05:48:03 +00:00
parent 1966ec881b
commit 59e78669c8

View File

@ -90,7 +90,7 @@ func CreateChatCompletion(model string, messages []Message, maxTokens int, repli
messages = append(append(messages, assistantReply), toolReplies...)
// Recurse into CreateChatCompletion with the tool call replies added
// to the original messages
return CreateChatCompletion(model, append(messages, toolReplies...), maxTokens, replies)
return CreateChatCompletion(model, messages, maxTokens, replies)
}
if replies != nil {