Skip to content

Support for AzureOpenAI #14

Description

@akolk

Can you check if the AZURE_OPENAI_ENDPOINT environment variable exists and then use the AzureOpenAI instead of OpenAI client? We have an AzureOpenAI account that we use a lot.

change:
self._client = openai.OpenAI(api_key=self.api_key)

to:
self._client = openai.OpenAI(api_key=self.api_key) if os.getenv("AZURE_OPENAI_ENDPOINT") is None else openai.AzureOpenAI(api_key=self.api_key)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions