Skip to content

Commit

Permalink
Add Azure OpenAI API version environment variable (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella authored May 23, 2024
1 parent 6fcf47a commit 770674d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ Codemods request access to OpenAI models by name, and by default are given acces
```bash
CODEMODDER_AZURE_OPENAI_API_KEY=<KEY>
CODEMODDER_AZURE_OPENAI_ENDPOINT=<ENDPOINT>
CODEMODDER_AZURE_OPENAI_API_VERSION=<VERSION>
CODEMODDER_AZURE_OPENAI_GPT-3_5-TURBO-2024-12-12_DEPLOYMENT=<DEPLOYMENT_NAME>
CODEMODDER_AZURE_OPENAI_GPT-4-TURBO-2024-04-12_API_DEPLOYMENT=<DEPLOYMENT_NAME>
```

- Providing `CODEMODDER_AZURE_OPENAI_API_KEY` without `CODEMODDER_AZURE_OPENAI_ENDPOINT` (and vice versa) will cause a failure on startup.
- The `CODEMODDER_AZURE_API_VERSION` is optional and codemodders can choose a reasonable default as a fallback. This spec does not intend to be prescriptive about particular fallback versions.
- If using Azure OpenAI and a codemod requests access to a model for which there is no corresponding `CODEMODDER_AZURE_OPENAI_(MODELNAME)_DEPLOYMENT` variable, the deployment name will be assumed to be the name of the model (e.g., "gpt-4o").
- If both Azure and OpenAI instructions are available, Azure will be preferred.

Expand Down

0 comments on commit 770674d

Please sign in to comment.