-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Enhancement: Option to change OpenAI API Endpoint #36
Comments
Hi @MarkSchmidty that's a good idea. Unfortunately, OpenAI's official node.js library does not support changing the API URL endpoint. How would you suggest approaching this? My humble suggestions:
|
OpenAI's node.js library has a basePath option. Here are some issues from the OpenAI node.js repo discussing using this option with proxies and alternative endpoints: |
Well pointed out thanks. In that case, it should be rather simple to add support for this. I will add an option for specifying this in the |
I have created a pull request for this #84 |
@hahayusuf As someone pointed out in the PR, some countries do not have access to the OpenAI API directly and must use proxies. An option to set this variable in the UI Settings would open up your hosted version to many people who cannot use it in its current form. Something like this: |
Added support for custom base url via an ENV for local development: #543 |
There are OpenAI API compatible endpoints for other models, such as Basaran: https://github.com/hyperonym/basaran
Adding an endpoint variable to the .env would allow users to use any LLM with AgentGPT, not just OpenAI's endpoint.
This is hugely useful for a number of reasons. But the biggest one is that local models don't rack up an API bill.
Another use case for this is proxy endpoints which log the requests/responses. Lots of people use OpenAI's models with endpoint proxies (myself included).
The text was updated successfully, but these errors were encountered: