LLM access to the Azure OpenAI SDK
Install this plugin in the same environment as LLM.
llm install llm-azureFirst, set an API key for Azure OpenAI:
llm keys set azure
# Paste key hereTo add the gpt-4-32k chat model, and embedding model text-embedding-3-small deployed in your Azure Subscription, add this to your azure/config.yaml file:
- model_id: gpt-4-32k
model_name: gpt-4-32k
api_base: https://your_deployment.openai.azure.com/
api_version: '2023-05-15'
- model_id: text-embedding-3-small
embedding_model: true
model_name: text-embedding-3-small
api_base: https://your_deployment.openai.azure.com/
api_version: '2023-05-14'the configuration file should be in the azure directory in the config of your llm installation.
Run this command to find the directory in which this file should be created:
dirname "$(llm logs path)"The model_id is the name LLM will use for the model. The model_name is the name which needs to be passed to the API - this might differ from the model_id, especially if model_id could potentially clash with other installed models.