OpenAI SDK: Proxy multiple models deployed in the same Azure instancev3.6+

Configure one route to proxy multiple models deployed in the same Azure instance.

For this plugin to work properly, you need a Gateway Route with the following configuration:

routes:
 - name: azure-chat
   paths:
     - "~/openai/deployments/(?<azure_instance>[^#?/]+)/chat/completions"
   methods:
     - POST

When you apply this configuration, you can set the SDK endpoint to http://localhost:8000/azure. When the Azure instance parameter is set to my-gpt-3-5, the Python SDK produces the URL http://localhost:8000/openai/deployments/my-gpt-3-5/chat/completions and is directed to the respective Azure deployment ID and model.

Prerequisites

  • Cohere account

  • Mistral account

Environment variables

  • AZURE_API_KEY: The API key used to authenticate requests to Cohere.

Set up the plugin

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!