Minor cleanup
This commit is contained in:
parent
c02b21ca37
commit
137c568129
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user