docs(azure.md): update instructions for using Azure with the Plugins endpoint

This commit is contained in:
Danny Avila 2023-07-06 14:04:48 -04:00 committed by Danny Avila
parent b6a2634a0a
commit 206fc50bc9

View file

@ -26,9 +26,12 @@ These two variables are optional but may be used in future updates of this proje
## Plugin Endpoint Variables
To use Azure with the Plugins endpoint, you need to uncomment the following variable:
Note: feature may not work as expected with the Plugins endpoint as Azure OpenAI may not support OpenAI Functions yet. Even when results were generated, they were not great compared to the regular OpenAI endpoint. You should set the "Functions" off in the Agent settings, and it's recommend to not skip completion with functions off.
To use Azure with the Plugins endpoint, there are some extra steps to take as the langchain library is particular with envrionment variables:
* `PLUGINS_USE_AZURE`: If set to "true" or any truthy value, this will enable the program to use Azure with the Plugins endpoint.
* Omit it or leave it commented to use the default OpenAI API for Plugins
* `AZURE_OPENAI_API_KEY`: Your Azure API key must be set to this environment variable, not to be confused with `AZURE_API_KEY`, which can remain as before.
* `OPENAI_API_KEY`: Must be omitted or commented to use Azure with Plugins
Please note that this feature may not work as expected with the Plugins endpoint as Azure OpenAI may not support OpenAI Functions yet. You should set the "Functions" off in the Agent settings, and it's recommend to not skip completion with functions off. Leave it commented to use the default OpenAI API.
These steps are quick workarounds as other solutions would require renaming environment variables. This is due to langchain overriding environment variables, and will have to be solved with a later solution.