Skip to content

Conversation

rodrigo2019
Copy link

  • Unifies OpenAI client construction to only use api_key + base_url + default_query.

  • Makes OPENAI_API_KEY the primary key; keeps CHATGPT_API_KEY as legacy for compatibility.

  • Adds OPENAI_DEFAULT_QUERY support (JSON or k=v list) for passing query params.

with these new configuration it's possible to use openai over azure endpoints

Configuration

OPENAI_API_KEY=your_key
(Legacy) CHATGPT_API_KEY still accepted but deprecated
OPENAI_BASE_URL=https://your-endpoint/openai/v1
OPENAI_DEFAULT_QUERY='{"api-version":"preview"}' or api-version=2024-02-01

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.

1 participant