mods
mods copied to clipboard
Document how to use with Azure OpenAI
I'm not able to get it to work. Keep hitting 404.
azure:
# Set to 'azure-ad' to use Active Directory
# Azure OpenAI setup: https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource
base-url: https://<resourcename>.openai.azure.com
api-key-env: AZURE_OPENAI_KEY
models:
gpt-4:
aliases: ["az4"]
max-input-chars: 24500
fallback:
gpt-35-turbo-16k:
aliases: ["az35t"]
max-input-chars: 12250
fallback:
gpt-35:
aliases: ["az35"]
max-input-chars: 12250
fallback:
Despite this I see a 404
echo say hi | mods -a azure -m gpt-35-turbo-16k
ERROR Missing model 'gpt-35-turbo-16k' for API 'azure'.
error, status code: 404, message: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
Am I missing something?
Hello, It seems you've encountered this issue because your deployment named "gpt-35-turbo-16k" hasn't been deployed with this name on Azure OpenAI. After providing the base URL, you will need to also specify your particular deployment name within the "models" section of your configuration.
For instance, if you've deployed a GPT-4 model named "MyGPT4" and a GPT-3.5 model named "MyGPT35" on Azure OpenAI, your configuration should resemble the following:
models:
MyGPT4:
aliases: ["az4"]
max-input-chars: 24500
fallback: MyGPT35
MyGPT35:
aliases: ["az35"]
max-input-chars: 12250
fallback:
sorry to hijack this issue ? Is there a way of using a copilot api key with mod could not find anything ont he docs
I think this issue also raises a good point on improving UX here. We should see about listing off what models are available for that API, if the one specified doesn't exist. Although, it is usually a good idea to specify fallback models in case one fails, again something we could highlight better in the docs. Thanks for letting us know :)