Skip to content
Snippets Groups Projects
Unverified Commit c419027d authored by yisding's avatar yisding Committed by GitHub
Browse files

add docs for azure openai (#480)

parent 6a16b474
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,18 @@ const openaiLLM = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0 }); ...@@ -16,6 +16,18 @@ const openaiLLM = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0 });
const serviceContext = serviceContextFromDefaults({ llm: openaiLLM }); const serviceContext = serviceContextFromDefaults({ llm: openaiLLM });
``` ```
## Azure OpenAI
To use Azure OpenAI, you only need to set a few environment variables.
For example:
```
export AZURE_OPENAI_KEY="<YOUR KEY HERE>"
export AZURE_OPENAI_ENDPOINT="<YOUR ENDPOINT, see https://learn.microsoft.com/en-us/azure/ai-services/openai/quickstart?tabs=command-line%2Cpython&pivots=rest-api>"
export AZURE_OPENAI_DEPLOYMENT="gpt-4" # or some other deployment name
```
## API Reference ## API Reference
- [OpenAI](../../api/classes/OpenAI.md) - [OpenAI](../../api/classes/OpenAI.md)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment