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

OPENAI_API_BASE is hardcoded #2455

Open
wsargent opened this issue Feb 23, 2025 · 0 comments
Open

OPENAI_API_BASE is hardcoded #2455

wsargent opened this issue Feb 23, 2025 · 0 comments

Comments

@wsargent
Copy link

wsargent commented Feb 23, 2025

I think either the documentation needs to be tweaked or there's an underlying bug.

In https://docs.letta.com/guides/server/providers/openai#enabling-openai-models it says:

export OPENAI_API_KEY=...

But it does not cover how to configure the OPENAI_API_BASE environment variable, or even if one exists -- it's not clear from

openai_api_base: str = "https://api.openai.com/v1"
as it's hardcoded and there's no comment on where it comes from or if it can be overridden.

My use case is that I want to use https://docs.lambdalabs.com/public-cloud/lambda-inference-api/ which has a different API base:

openai_api_key = "<API-KEY>"
openai_api_base = "https://api.lambdalabs.com/v1"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)
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