Wire up Azure OpenAI completion provider (#8646)

This PR wires up support for [Azure
OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/overview)
as an alternative AI provider in the assistant panel.

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

```json
{
  "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
This commit is contained in:
Marshall Bowers 2024-02-29 22:01:33 -05:00 committed by GitHub
parent 7c1ef966f3
commit eb1ab69606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 290 additions and 65 deletions

1
Cargo.lock generated
View file

@ -93,6 +93,7 @@ dependencies = [
"postage",
"rand 0.8.5",
"rusqlite",
"schemars",
"serde",
"serde_json",
"tiktoken-rs",