fixed 2 more switches for baseurl (#527)

This commit is contained in:
Cole Lashley
2024-03-28 13:14:05 -07:00
committed by GitHub
parent a61310afc3
commit 4879e90e91
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ func RunCompletionStream(ctx context.Context, opts *sstore.OpenAIOptsType, promp
if opts.Model == "" {
return nil, fmt.Errorf("no openai model specified")
}
if opts.APIToken == "" {
if opts.BaseURL == "" && opts.APIToken == "" {
return nil, fmt.Errorf("no api token")
}
clientConfig := openaiapi.DefaultConfig(opts.APIToken)