Skip to content

Wire up Azure OpenAI completion provider#8646

Merged
maxdeviant merged 11 commits intomainfrom
marshall/azure-open-ai-provider
Mar 1, 2024
Merged

Wire up Azure OpenAI completion provider#8646
maxdeviant merged 11 commits intomainfrom
marshall/azure-open-ai-provider

Conversation

@maxdeviant
Copy link
Member

@maxdeviant maxdeviant commented Mar 1, 2024

This PR wires up support for Azure OpenAI as an alternative AI provider in the assistant panel.

This can be configured using the following in the settings file:

{
  "assistant": {
    "provider": {
      "type": "azure_openai",
      "api_url": "https://{your-resource-name}.openai.azure.com",
      "deployment_id": "gpt-4",
      "api_version": "2023-05-15"
    }
  },
}

You will need to deploy a model within Azure and update the settings accordingly.

Release Notes:

  • N/A

@maxdeviant maxdeviant self-assigned this Mar 1, 2024
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 1, 2024
@maxdeviant maxdeviant merged commit eb1ab69 into main Mar 1, 2024
@maxdeviant maxdeviant deleted the marshall/azure-open-ai-provider branch March 1, 2024 03:01
@SomeoneToIgnore
Copy link
Contributor

Is #8493 relevant still?

@maxdeviant
Copy link
Member Author

Is #8493 relevant still?

No, we should close that one out.

We’re not 100% of the way there yet, but the work I did in this PR is more in line with the direction we want to go.

@tombailey
Copy link

Is #8493 relevant still?

No, we should close that one out.

We’re not 100% of the way there yet, but the work I did in this PR is more in line with the direction we want to go.

I closed my hacky draft in favor of your PR.

Just to note, the people that want to use Azure for assistant completions will probably want to use Azure for the embeddings that power semantic search too:
https://github.com/tombailey/zed/blob/9e17018416eaee778776f99b31bd102fd9acce2e/crates/ai/src/providers/open_ai/embedding.rs#L144

maxdeviant added a commit that referenced this pull request Mar 4, 2024
Following up on #8646, this PR makes it so we select an OpenAI model
based on the deployment ID when using Azure OpenAI.

Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants