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 easily changing the endpoint of the openapi server #3

Open
tristandruyen opened this issue Nov 18, 2024 · 2 comments
Open

Support easily changing the endpoint of the openapi server #3

tristandruyen opened this issue Nov 18, 2024 · 2 comments
Assignees

Comments

@tristandruyen
Copy link

tristandruyen commented Nov 18, 2024

Great idea!

Just one issue, I don't really wanna give OpenAI access to my private documents.
Luckily there is an easy solution. Just allow changing the URL of the API endpoint.
This would enable easily using alternative back-ends like ollama that are API-compatible.
Probably just an environment variable would be enough.

@Tammilore Tammilore self-assigned this Nov 18, 2024
@tkelley-eg
Copy link

I did some quick research and it looks as though you can set an environment variable for the baseURL (OPENAI_BASE_URL) since it's not explicitly passed. There's support for other params as well.

https://github.com/openai/openai-node/blob/a92cc1dbc4ab3284c6654d69d5c39399a867f601/src/index.ts#L213

@danbarbarito
Copy link

It looks like the URL is currently hardcoded:

"https://api.openai.com/v1/chat/completions",

It would be really great if this can be set by an environment variable

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

4 participants