Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New option: --openai.apibase [$OPENAI_API_BASE] #135

Merged
merged 4 commits into from
Oct 20, 2024

Conversation

johnd0e
Copy link
Contributor

@johnd0e johnd0e commented Oct 10, 2024

OpenAI integration can be activated by specifying --openai.apibase, even without the --openai.token, since some services may function without an API key (token).

Additionally:

  • Updated the default model to gpt-4o-mini.
  • Corrected several typos in the README.

Please ignore any changes that are not directly relevant.

Warning

As I am not a Go programmer, please ensure that the suggested changes are correct.

@johnd0e johnd0e requested a review from umputun as a code owner October 10, 2024 21:00
@@ -22,6 +22,7 @@ type openAIChecker struct {

// OpenAIConfig contains parameters for openAIChecker
type OpenAIConfig struct {
BaseURL string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason why we even need this new field here? from what I see, the only place you should set it is in main.go makeDetector (which you did), but I can't understand why it is added here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

…without --openai.token

Motivation: some services can work without apikey (token)
@georg3k
Copy link

georg3k commented Oct 20, 2024

So this change will make it possible to use custom self-hosted endpoints assuming they have OpenAI compatible APIs, am I right?

@johnd0e
Copy link
Contributor Author

johnd0e commented Oct 20, 2024

@georg3k
Right, and not only selfhosted.

Copy link
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx

@umputun umputun merged commit 4bc148a into umputun:master Oct 20, 2024
2 checks passed
umputun added a commit that referenced this pull request Oct 26, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants