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

View file

@ -263,7 +263,7 @@ impl Telemetry {
self: &Arc<Self>,
conversation_id: Option<String>,
kind: AssistantKind,
model: &'static str,
model: &str,
) {
let event = Event::Assistant(AssistantEvent {
conversation_id,