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

Add HTTPS Support to openai extension #4270

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

chuyqa
Copy link
Contributor

@chuyqa chuyqa commented Oct 12, 2023

Checklist:

Related Issue: #4254

This PR passes the ssl-certfile and ssl-keyfile from the CLI to the OpenAI extension.

Test with no cert params

2023-10-12 09:08:15 INFO:Loading the extension "gallery"...
Running on local URL:  http://playground.internal:7860

To create a public link, set `share=True` in `launch()`.
OpenAI compatible API ready at: OPENAI_API_BASE=http://0.0.0.0:5001/v1

Test with cli args

# Same arguments from text-gen now get pushed down to the extension
...
--ssl-certfile=/devcerts/certificate.pem \
--ssl-keyfile=/devcerts/private_key.pem \
...

To create a public link, set `share=True` in `launch()`.
OpenAI compatible API ready at: OPENAI_API_BASE=https://0.0.0.0:5001/v1

Test with Env Variables

# Same naming convention OPENEDAI* as existing extension
export OPENEDAI_CERT_PATH=/devcerts/certificate.pem
export OPENEDAI_KEY_PATH=/devcerts/private_key.pem 
...
To create a public link, set `share=True` in `launch()`.
OpenAI compatible API ready at: OPENAI_API_BASE=https://0.0.0.0:5001/v1

@oobabooga oobabooga merged commit ed66ca3 into oobabooga:main Oct 13, 2023
@oobabooga
Copy link
Owner

Very nice, thank you!

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

Successfully merging this pull request may close these issues.

2 participants