You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It would be helpful if you could provide the API key as part of the from_provider constructor, as settings are often managed outside the environment variables. Currently the only option is to pass it to the client, but that removes the LLM provider-agnostic solution of from_provider()
Describe the solution you'd like
This code should be accepted
Today this results in an Exception: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
Describe alternatives you've considered
Environment variables: Not easy to change at runtime etc.
Setting the API key directly on the client: Impossible to write LLM provider-agnostic code
Additional context
n/a
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It would be helpful if you could provide the API key as part of the from_provider constructor, as settings are often managed outside the environment variables. Currently the only option is to pass it to the client, but that removes the LLM provider-agnostic solution of from_provider()
Describe the solution you'd like
This code should be accepted
Today this results in an Exception:
The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
Describe alternatives you've considered
Additional context
n/a
The text was updated successfully, but these errors were encountered: