Compare commits
No commits in common. "2f3d95356aa0ca07f28c808399e65905818cc902" and "c02b21ca3705dc7cb5d785a5eb88eefd3b268355" have entirely different histories.
2f3d95356a
...
c02b21ca37
@ -64,11 +64,12 @@ func LLMRequest(messages []Message) (string, error) {
|
||||
go HandleDelayedContent(receiver)
|
||||
|
||||
response, err := CreateChatCompletionStream(model, messages, maxTokens, receiver)
|
||||
if err != nil && response != "" {
|
||||
Warn("Received partial response. Error: %v\n", err)
|
||||
err = nil // ignore partial response error
|
||||
}
|
||||
|
||||
if response != "" {
|
||||
if err != nil {
|
||||
Warn("Received partial response. Error: %v\n", err)
|
||||
err = nil
|
||||
}
|
||||
// there was some content, so break to a new line after it
|
||||
fmt.Println()
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ func CreateChatCompletionRequest(model string, messages []Message, maxTokens int
|
||||
Model: model,
|
||||
Messages: chatCompletionMessages,
|
||||
MaxTokens: maxTokens,
|
||||
N: 1, // limit responses to 1 "choice". we use choices[0] to reference it
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user