Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support custom API base #6

Open
johnd0e opened this issue May 5, 2024 · 2 comments
Open

Support custom API base #6

johnd0e opened this issue May 5, 2024 · 2 comments

Comments

@johnd0e
Copy link

johnd0e commented May 5, 2024

I would like this feature to be available in the settings.
The default value should be https://api.openai.com/v1, however, it should also allow the specification of custom values.

I would also like to see similar setting for Google Gemini API base, with default value https://generativelanguage.googleapis.com or https://generativelanguage.googleapis.com/v1beta.

This should not be a fixed option, as there may be a need to switch APIs dynamically.

Please note:

  • Different APIs typically do not use the same API keys.
  • Sometimes, certain APIs do not require API keys at all, and more importantly, passing a redundant value as an API key could potentially trigger an error.
@pymike00
Copy link
Owner

pymike00 commented May 6, 2024

Hi there and thanks for the suggestion!

Please tell me more. Why would having the a default value in settings be useful?

How does that improve the ability to create new models for a given provider?

Aside from cleaning up the codebase which I agree it would by moving the hardcoding in a more suitable place! But why the base url?

What other endpoints are you thinking about using?

@johnd0e
Copy link
Author

johnd0e commented May 6, 2024

Please tell me more. Why would having the a default value in settings be useful?
How does that improve the ability to create new models for a given provider?

Uh.. It seems to me that we do not speak about the same matter.
I will try to explain further.

But why the base url?
What other endpoints are you thinking about using?

I am not thinking about other endpoints at all.
I mean quite opposite: there is only one possible endpoint (/chat/completion), but many variable base api urls possible.
Besides, it is quite common practice - to specify base url.

Because there are a lot of other services, that are compatible with OpenAI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants