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

Allow specifying OPENAI_API_BASE to override API location #321

Closed
klauern opened this issue Aug 6, 2023 · 4 comments · Fixed by #322
Closed

Allow specifying OPENAI_API_BASE to override API location #321

klauern opened this issue Aug 6, 2023 · 4 comments · Fixed by #322
Labels
enhancement New feature or request

Comments

@klauern
Copy link

klauern commented Aug 6, 2023

Problem

When using the OpenAI models, you can't override where the API points. This is useful for corporate proxies of OpenAI to be able to scope an enterprise's use of API keys more centrally, as OpenAI's interface doesn't give you great tooling to support issuing time-limited API keys, scoped keys, etc.

Proposed Solution

I mentioned this in #245 but if this plugin could use the openai env vars out of the box ($OPENAI_API_KEY and $OPENAI_API_BASE), I wouldn't have to do anything to have this work, as our proxy is a direct mirror.

Additional context

@klauern klauern added the enhancement New feature or request label Aug 6, 2023
@welcome
Copy link

welcome bot commented Aug 6, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@dlqqq
Copy link
Member

dlqqq commented Aug 8, 2023

@klauern I've added support for this in #322, which should add a field allowing you to specify the API base URL. This is visible in the UI right underneath where you select the model. Could you see if you're able to verify the feature in #322? I've included replication steps as a comment on the PR.

@sqlreport
Copy link

Can we also add feature to configure REQUESTS_CA_BUNDLE when using chat UI so we can configure with https certificate?

@JasonWeill
Copy link
Collaborator

@sqlreport Could you please open a new feature request for REQUESTS_CA_BUNDLE? Thanks!

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

Successfully merging a pull request may close this issue.

4 participants