added check for no baseurl (#525)

This commit is contained in:
Cole Lashley 2024-03-28 12:20:58 -07:00 committed by GitHub
parent 33400e65ff
commit 80c781bf4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2785,7 +2785,7 @@ func doOpenAIStreamCompletion(cmd *sstore.CmdType, clientId string, opts *sstore
}()
var ch chan *packet.OpenAIPacketType
var err error
if opts.APIToken == "" {
if opts.APIToken == "" && opts.BaseURL == "" {
var conn *websocket.Conn
ch, conn, err = openai.RunCloudCompletionStream(ctx, clientId, opts, prompt)
if conn != nil {