Skip to content
Discussion options

You must be logged in to vote

The AzureChatOpenAI class does not exist in the llama_index.llms.azure_openai module. Instead, you should use AzureOpenAI, SyncAzureOpenAI, or AsyncAzureOpenAI. Here is the correct import statement and example configuration:

from llama_index.llms.azure_openai import AzureOpenAI

llm = AzureOpenAI(
    deployment_name="gpt-4o",
    model_name="gpt-4o",
    azure_endpoint="https://YOUR_RESOURCE_NAME.openai.azure.com/",
    api_version="2023-07-01-preview",
    temperature=0.0,
    api_key="YOUR_AZURE_OPENAI_API_KEY"
)

Make sure to replace the placeholders with your actual Azure OpenAI configurations:

  • YOUR_RESOURCE_NAME: The name of your Azure resource.
  • YOUR_AZURE_OPENAI_API_KEY: Your Azur…

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
@dosubot
Comment options

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