Skip to content

Commit

Permalink
fix regression introduced by #135
Browse files Browse the repository at this point in the history
see #161
  • Loading branch information
umputun committed Oct 26, 2024
1 parent dc35a18 commit 5a09134
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,13 @@ func makeDetector(opts options) *tgspam.Detector {
MaxSymbolsRequest: opts.OpenAI.MaxSymbolsRequest,
RetryCount: opts.OpenAI.RetryCount,
}
log.Printf("[DEBUG] openai config: %+v", openAIConfig)

config := openai.DefaultConfig(opts.OpenAI.Token)
config.BaseURL = opts.OpenAI.APIBase
if opts.OpenAI.APIBase != "" {
config.BaseURL = opts.OpenAI.APIBase
}
log.Printf("[DEBUG] openai config: %+v", openAIConfig)

detector.WithOpenAIChecker(openai.NewClientWithConfig(config), openAIConfig)
}

Expand Down

0 comments on commit 5a09134

Please sign in to comment.