Skip to content
Discussion options

You must be logged in to vote

Hi @nehalakhani there are three things you can try, the first is using the default_headers param:

AzureChatCompletion(
    api_key=Value of Ocp-Apim-SubscriptionKey
    endpoint={apim_url}/deployments/gpt-4o/chat/completions/deployments/gpt-4o/chat/completions?api-version=2024-02-15-preview
    deployment_name='gpt-4o'
    api_version='2024-02-15-preview'
    default_headers={'Ocp-Apim-SubscriptionKey': <value>}
}

The second is passing in a AsyncAzureOpenAI client directly, after verifying that that passes it in the right way:

from openai import AsyncAzureOpenAI

client = AsyncAzureOpenAI(
    ...
)
AzureChatCompletion(
  async_client = client,
  ...
)

The third is changing the setup of A…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@nehalakhani
Comment options

Answer selected by eavanvalkenburg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants