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 OPENAI_BASE_URL #31

Open
codefromthecrypt opened this issue Sep 6, 2024 · 0 comments
Open

Support OPENAI_BASE_URL #31

codefromthecrypt opened this issue Sep 6, 2024 · 0 comments

Comments

@codefromthecrypt
Copy link
Contributor

codefromthecrypt commented Sep 6, 2024

OPENAI_BASE_URL is more canonical and less errorprone (in adrian's opinion) than OPENAI_HOST for indicating the base endpoint. Typically, this ends in /v1. We should take care to also both handle trailing slash and not require it. After this, I think we should sunset OPENAI_HOST so that there's only one way.

from _client.py

        if base_url is None:
            base_url = os.environ.get("OPENAI_BASE_URL")
        if base_url is None:
            base_url = f"https://api.openai.com/v1"

https://github.com/openai/openai-python#configuring-the-http-client

@codefromthecrypt codefromthecrypt changed the title Support OPENAI_API_BASE Support OPENAI_BASE_URL Sep 6, 2024
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

1 participant