promptable icon indicating copy to clipboard operation
promptable copied to clipboard

Azure OpenAI Support?

Open Elvincth opened this issue 1 year ago • 1 comments

I tried to override openai config the base url like this:

const configuration = new Configuration({ basePath: "https:/xxx.openai.azure.com/openai/deployments/demo", apiKey: process.env.AZURE_OPENAI_API_KEY, });

But no luck. Any suggestions would be appreciated.

Elvincth avatar Mar 19 '23 15:03 Elvincth

This works for me:

{
  basePath: "https://xxx.openai.azure.com/openai/deployments/xxx",
  baseOptions: {
    headers: { "api-key": env. AZURE_OPENAI_API_KEY },
    params: {
      "api-version": "2023-03-15-preview",     // https://oai.azure.com/portal/chat
    },
  },
}

mlnj avatar May 13 '23 15:05 mlnj