Skip to content

How to implement AzureOpenAI instead of OpenAI? #115

Closed Answered by szymondudycz
2000calories asked this question in Q&A
Discussion options

You must be logged in to vote

You can use LiteLLM, which supports Azure OpenAI. For that you'd configure app.yaml with

$llm: !pw.xpacks.llm.llms.LiteLLMChat
  model: "azure/<your deployment name>"

and set environmental variables AZURE_API_KEY, AZURE_API_BASE and AZURE_API_VERSION.

You can also provide these values as arguments to LiteLLM rather than env variables, more information in LiteLLM docs: https://docs.litellm.ai/docs/providers/azure

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by 2000calories
Comment options

You must be logged in to vote
0 replies
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