Minor cleanup

This commit is contained in:
Matt Low 2023-11-25 01:26:37 +00:00
parent c02b21ca37
commit 137c568129

View File

@ -64,12 +64,11 @@ 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()
}