langflow
langflow copied to clipboard
how to config azure openai in langflow
Describe the bug I am new to this. But I can't find a way to config azure open ai.
can someone tell me how to do it?
According to the Azure OpenAI docs in LangChain
All you have to do is change a few parameters:
# Set this to `azure`
export OPENAI_API_TYPE=azure
# The API version you want to use: set this to `2022-12-01` for the released version.
export OPENAI_API_VERSION=2022-12-01
# The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource.
export OPENAI_API_BASE=https://your-resource-name.openai.azure.com
# The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource.
export OPENAI_API_KEY=<your Azure OpenAI API key>
So use openai too?
Yes. OpenAI and Azure are the same APIs just coming from different endpoints, I think.
Yes. OpenAI and Azure are the same APIs just coming from different endpoints, I think.
With some azure config. Like Azure Deployment
I think this is the choice https://github.com/stulzq/azure-openai-proxy
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
According to the Azure OpenAI docs in LangChain
All you have to do is change a few parameters:
# Set this to `azure` export OPENAI_API_TYPE=azure # The API version you want to use: set this to `2022-12-01` for the released version. export OPENAI_API_VERSION=2022-12-01 # The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource. export OPENAI_API_BASE=https://your-resource-name.openai.azure.com # The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource. export OPENAI_API_KEY=<your Azure OpenAI API key>
I tried doing this using a .env file and also using the set
command in Windows but it didn't work. When I send a message, this message shows:
Error: Must provide an 'engine' or deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.Ch... (but the rest of the message is cut off.