fixed ai timeout bug (#617)

This commit is contained in:
Cole Lashley 2024-04-29 15:56:20 -07:00 committed by GitHub
parent 50662c2152
commit ac91fa8596
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2735,7 +2735,7 @@ func doOpenAICmdInfoCompletion(cmd *sstore.CmdType, clientId string, opts *sstor
}
writePacketToUpdateBus(ctx, cmd, asstMessagePk)
packetTimeout := OpenAIPacketTimeout
if opts.Timeout >= 0 {
if opts.Timeout > 0 {
packetTimeout = time.Duration(opts.Timeout) * time.Millisecond
}
doneWaitingForPackets := false
@ -2830,7 +2830,7 @@ func doOpenAIStreamCompletion(cmd *sstore.CmdType, clientId string, opts *sstore
return
}
packetTimeout := OpenAIPacketTimeout
if opts.Timeout >= 0 {
if opts.Timeout > 0 {
packetTimeout = time.Duration(opts.Timeout) * time.Millisecond
}
doneWaitingForPackets := false