Skip to content

Commit

Permalink
Add ChatGptClientFactory (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva committed Mar 7, 2024
2 parents 23805be + 07dea37 commit 0148e11
Show file tree
Hide file tree
Showing 40 changed files with 411 additions and 141 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:none
csharp_style_unused_value_expression_statement_preference = discard_variable:none

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:suggestion
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,9 @@ builder.Services.AddChatGpt(options =>
- _ResourceName_: the name of your Azure OpenAI Resource (required).
- _ApiKey_: Azure OpenAI provides two methods for authentication. You can use either API Keys or Azure Active Directory (required).
- _ApiVersion_: the version of the API to use (optional). Allowed values:
- 2023-03-15-preview
- 2023-05-15
- 2023-06-01-preview
- 2023-07-01-preview
- 2023-08-01-preview
- 2023-09-01-preview
- 2023-12-01-preview (default)
- 2024-02-15-preview (default)
- _AuthenticationType_: it specifies if the key is an actual API Key or an [Azure Active Directory token](https://learn.microsoft.com/azure/cognitive-services/openai/how-to/managed-identity) (optional, default: "ApiKey").

### DefaultModel and DefaultEmbeddingModel
Expand All @@ -75,7 +71,7 @@ Currently available models are:
- gpt-3.5-turbo-16k,
- gpt-4,
- gpt-4-32k
- gpt-4-1106-preview
- gpt-4-turbo-preview
- gpt-4-vision-preview

They have fixed names, available in the [OpenAIChatGptModels.cs file](https://github.com/marcominerva/ChatGptNet/blob/master/src/ChatGptNet/Models/OpenAIChatGptModels.cs).
Expand Down
8 changes: 4 additions & 4 deletions docs/ChatGptNet.Models/OpenAIChatGptModels.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ public static class OpenAIChatGptModels

| name | description |
| --- | --- |
| const [Gpt35Turbo](OpenAIChatGptModels/Gpt35Turbo.md) | GPT-3.5 model can understand and generate natural language or code and it is optimized for chat. |
| const [Gpt35Turbo_16k](OpenAIChatGptModels/Gpt35Turbo_16k.md) | A model with the same capabilities as the standard [`Gpt35Turbo`](./OpenAIChatGptModels/Gpt35Turbo.md) model but with 4 times the token limit of [`Gpt35Turbo`](./OpenAIChatGptModels/Gpt35Turbo.md). |
| const [Gpt35_Turbo](OpenAIChatGptModels/Gpt35_Turbo.md) | GPT-3.5 model can understand and generate natural language or code and it is optimized for chat. |
| const [Gpt35_Turbo_16k](OpenAIChatGptModels/Gpt35_Turbo_16k.md) | A model with the same capabilities as the standard [`Gpt35_Turbo`](./OpenAIChatGptModels/Gpt35_Turbo.md) model but with 4 times the token limit of [`Gpt35_Turbo`](./OpenAIChatGptModels/Gpt35_Turbo.md). |
| const [Gpt4](OpenAIChatGptModels/Gpt4.md) | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy than any of our previous models, thanks to its broader general knowledge and advanced reasoning capabilities. is optimized for chat but works well for traditional completions tasks. |
| const [Gpt4_1106_Preview](OpenAIChatGptModels/Gpt4_1106_Preview.md) | The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. |
| const [Gpt4Vision_Preview](OpenAIChatGptModels/Gpt4Vision_Preview.md) | Ability to understand images, in addition to all other GPT-4 Turbo capabilties. |
| const [Gpt4_32k](OpenAIChatGptModels/Gpt4_32k.md) | A model with the same capabilities as the base [`Gpt4`](./OpenAIChatGptModels/Gpt4.md) model but with 4 times the token limit of [`Gpt4`](./OpenAIChatGptModels/Gpt4.md). |
| const [Gpt4_Vision_Preview](OpenAIChatGptModels/Gpt4_Vision_Preview.md) | Ability to understand images, in addition to all other GPT-4 Turbo capabilties. |
| const [Gpt4_Turbo_Preview](OpenAIChatGptModels/Gpt4_Turbo_Preview.md) | The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. |

## Remarks

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# OpenAIChatGptModels.Gpt35Turbo field
# OpenAIChatGptModels.Gpt35_Turbo field

GPT-3.5 model can understand and generate natural language or code and it is optimized for chat.

```csharp
public const string Gpt35Turbo;
public const string Gpt35_Turbo;
```

## Remarks
Expand All @@ -12,7 +12,7 @@ This model supports 4.096 tokens. See [GPT-3.5](https://platform.openai.com/docs

## See Also

* field [Gpt35Turbo_16k](./Gpt35Turbo_16k.md)
* field [Gpt35_Turbo_16k](./Gpt35_Turbo_16k.md)
* class [OpenAIChatGptModels](../OpenAIChatGptModels.md)
* namespace [ChatGptNet.Models](../../ChatGptNet.md)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# OpenAIChatGptModels.Gpt35Turbo_16k field
# OpenAIChatGptModels.Gpt35_Turbo_16k field

A model with the same capabilities as the standard [`Gpt35Turbo`](./Gpt35Turbo.md) model but with 4 times the token limit of [`Gpt35Turbo`](./Gpt35Turbo.md).
A model with the same capabilities as the standard [`Gpt35_Turbo`](./Gpt35_Turbo.md) model but with 4 times the token limit of [`Gpt35_Turbo`](./Gpt35_Turbo.md).

```csharp
public const string Gpt35Turbo_16k;
public const string Gpt35_Turbo_16k;
```

## Remarks
Expand All @@ -12,7 +12,7 @@ This model supports 16.384 tokens. See [GPT-3.5](https://platform.openai.com/doc

## See Also

* field [Gpt35Turbo](./Gpt35Turbo.md)
* field [Gpt35_Turbo](./Gpt35_Turbo.md)
* class [OpenAIChatGptModels](../OpenAIChatGptModels.md)
* namespace [ChatGptNet.Models](../../ChatGptNet.md)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# OpenAIChatGptModels.Gpt4_Vision_Preview field
# OpenAIChatGptModels.Gpt4Vision_Preview field

Ability to understand images, in addition to all other GPT-4 Turbo capabilties.

```csharp
public const string Gpt4_Vision_Preview;
public const string Gpt4Vision_Preview;
```

## Remarks

This model supports 128.000 tokens and returns a maximum if 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information.
This model supports 128.000 tokens and returns a maximum of 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information.

## See Also

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# OpenAIChatGptModels.Gpt4_1106_Preview field
# OpenAIChatGptModels.Gpt4_Turbo_Preview field

The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more.

```csharp
public const string Gpt4_1106_Preview;
public const string Gpt4_Turbo_Preview;
```

## Remarks

This model supports 128.000 tokens and returns a maximum if 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information.
This model supports 128.000 tokens and returns a maximum of 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information.

## See Also

Expand Down
20 changes: 20 additions & 0 deletions docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ChatGptFactoryServiceCollectionExtensions class

Provides extension methods for adding ChatGPT Client Factory support in NET applications.

```csharp
public static class ChatGptFactoryServiceCollectionExtensions
```

## Public Members

| name | description |
| --- | --- |
| static [AddChatGptClientFactory](ChatGptFactoryServiceCollectionExtensions/AddChatGptClientFactory.md)(…) | Registers a ChatGptClientFactory instance. |

## See Also

* namespace [ChatGptNet](../ChatGptNet.md)
* [ChatGptFactoryServiceCollectionExtensions.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.cs)
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ChatGptFactoryServiceCollectionExtensions.AddChatGptClientFactory method

Registers a ChatGptClientFactory instance.

```csharp
public static IServiceCollection AddChatGptClientFactory(this IServiceCollection services,
Action<ChatGptOptionsBuilder>? builder = null)
```

| parameter | description |
| --- | --- |
| services | The IServiceCollection to add services to. |
| builder | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). |

## Return Value

A reference to this instance after the operation has completed.

## See Also

* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md)
* class [ChatGptFactoryServiceCollectionExtensions](../ChatGptFactoryServiceCollectionExtensions.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
2 changes: 1 addition & 1 deletion docs/ChatGptNet/ChatGptOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ChatGptOptions
| [ChatGptOptions](ChatGptOptions/ChatGptOptions.md)() | The default constructor. |
| [DefaultEmbeddingModel](ChatGptOptions/DefaultEmbeddingModel.md) { get; set; } | Gets or sets the default model for embedding. (default: [`TextEmbeddingAda002`](../ChatGptNet.Models.Embeddings/OpenAIEmbeddingModels/TextEmbeddingAda002.md) when the provider is OpenAI). |
| [DefaultEmbeddingParameters](ChatGptOptions/DefaultEmbeddingParameters.md) { get; } | Gets or sets the default parameters for embeddings. |
| [DefaultModel](ChatGptOptions/DefaultModel.md) { getset; } | Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI). |
| [DefaultModel](ChatGptOptions/DefaultModel.md) { getset; } | Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI). |
| [DefaultParameters](ChatGptOptions/DefaultParameters.md) { get; } | Gets or sets the default parameters for chat completion. |
| [MessageExpiration](ChatGptOptions/MessageExpiration.md) { getset; } | Gets or sets the expiration for cached conversation messages (default: 1 hour). |
| [MessageLimit](ChatGptOptions/MessageLimit.md) { getset; } | Gets or sets the maximum number of messages to use for chat completion (default: 10). |
Expand Down
2 changes: 1 addition & 1 deletion docs/ChatGptNet/ChatGptOptions/DefaultModel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ChatGptOptions.DefaultModel property

Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI).
Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI).

```csharp
public string? DefaultModel { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions docs/ChatGptNet/ChatGptOptionsBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public class ChatGptOptionsBuilder

| name | description |
| --- | --- |
| [ChatGptOptionsBuilder](ChatGptOptionsBuilder/ChatGptOptionsBuilder.md)() | The default constructor. |
| [ChatGptOptionsBuilder](ChatGptOptionsBuilder/ChatGptOptionsBuilder.md)() | Initializes a new instance of the [`ChatGptOptionsBuilder`](./ChatGptOptionsBuilder.md) class. |
| [DefaultEmbeddingModel](ChatGptOptionsBuilder/DefaultEmbeddingModel.md) { get; set; } | Gets or sets the default model for embeddings. (default: [`TextEmbeddingAda002`](../ChatGptNet.Models.Embeddings/OpenAIEmbeddingModels/TextEmbeddingAda002.md) when the provider is OpenAI). |
| [DefaultEmbeddingParameters](ChatGptOptionsBuilder/DefaultEmbeddingParameters.md) { get; } | Gets or sets the default parameters for embeddings. |
| [DefaultModel](ChatGptOptionsBuilder/DefaultModel.md) { getset; } | Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI). |
| [DefaultEmbeddingParameters](ChatGptOptionsBuilder/DefaultEmbeddingParameters.md) { getset} | Gets or sets the default parameters for embeddings. |
| [DefaultModel](ChatGptOptionsBuilder/DefaultModel.md) { getset; } | Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI). |
| [DefaultParameters](ChatGptOptionsBuilder/DefaultParameters.md) { getset; } | Gets or sets the default parameters for chat completion. |
| [MessageExpiration](ChatGptOptionsBuilder/MessageExpiration.md) { getset; } | Gets or sets the expiration for cached conversation messages (default: 1 hour). |
| [MessageLimit](ChatGptOptionsBuilder/MessageLimit.md) { getset; } | Gets or sets the maximum number of messages to use for chat completion (default: 10). |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ChatGptOptionsBuilder constructor

The default constructor.
Initializes a new instance of the [`ChatGptOptionsBuilder`](../ChatGptOptionsBuilder.md) class.

```csharp
public ChatGptOptionsBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Gets or sets the default parameters for embeddings.

```csharp
public EmbeddingParameters DefaultEmbeddingParameters { get; }
public EmbeddingParameters DefaultEmbeddingParameters { get; set; }
```

## See Also
Expand Down
2 changes: 1 addition & 1 deletion docs/ChatGptNet/ChatGptOptionsBuilder/DefaultModel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ChatGptOptionsBuilder.DefaultModel property

Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI).
Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI).

```csharp
public string? DefaultModel { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Configures Azure OpenAI Service settings.

```csharp
public static ChatGptOptionsBuilder UseAzure(this ChatGptOptionsBuilder builder,
string resourceName, string apiKey, string apiVersion = "2023-12-01-preview",
string resourceName, string apiKey, string apiVersion = "2024-02-15-preview",
AzureAuthenticationType authenticationType = AzureAuthenticationType.ApiKey)
```

Expand Down
21 changes: 21 additions & 0 deletions docs/ChatGptNet/IChatGptClientFactory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# IChatGptClientFactory interface

Provides methods to create new instances of [`IChatGptClient`](./IChatGptClient.md) at runtime

```csharp
public interface IChatGptClientFactory
```

## Members

| name | description |
| --- | --- |
| [CreateClient](IChatGptClientFactory/CreateClient.md)() | Creates a new instance of a ChatGptClient. |
| [CreateClient](IChatGptClientFactory/CreateClient.md)(…) | Creates a new instance of a ChatGptClient configured with the supplied action. (2 methods) |

## See Also

* namespace [ChatGptNet](../ChatGptNet.md)
* [IChatGptClientFactory.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/IChatGptClientFactory.cs)
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
69 changes: 69 additions & 0 deletions docs/ChatGptNet/IChatGptClientFactory/CreateClient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# IChatGptClientFactory.CreateClient method (1 of 3)

Creates a new instance of a ChatGptClient.

```csharp
public IChatGptClient CreateClient()
```

## Return Value

A new [`IChatGptClient`](../IChatGptClient.md)

## See Also

* interface [IChatGptClient](../IChatGptClient.md)
* interface [IChatGptClientFactory](../IChatGptClientFactory.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

---

# IChatGptClientFactory.CreateClient method (2 of 3)

Creates a new instance of a ChatGptClient configured with the supplied action.

```csharp
public IChatGptClient CreateClient(Action<ChatGptOptionsBuilder>? setupAction)
```

| parameter | description |
| --- | --- |
| setupAction | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). |

## Return Value

A new [`IChatGptClient`](../IChatGptClient.md)

## See Also

* interface [IChatGptClient](../IChatGptClient.md)
* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md)
* interface [IChatGptClientFactory](../IChatGptClientFactory.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

---

# IChatGptClientFactory.CreateClient method (3 of 3)

Creates a new instance of a ChatGptClient configured with the supplied action.

```csharp
public IChatGptClient CreateClient(Action<IServiceProvider, ChatGptOptionsBuilder>? setupAction)
```

| parameter | description |
| --- | --- |
| setupAction | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). |

## Return Value

A new [`IChatGptClient`](../IChatGptClient.md)

## See Also

* interface [IChatGptClient](../IChatGptClient.md)
* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md)
* interface [IChatGptClientFactory](../IChatGptClientFactory.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| public type | description |
| --- | --- |
| class [ChatGptBuilder](./ChatGptNet/ChatGptBuilder.md) | Represents the default builder for configuring ChatGPT. |
| static class [ChatGptFactoryServiceCollectionExtensions](./ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md) | Provides extension methods for adding ChatGPT Client Factory support in NET applications. |
| class [ChatGptOptions](./ChatGptNet/ChatGptOptions.md) | Options class that provides settings for configuring ChatGPT. |
| class [ChatGptOptionsBuilder](./ChatGptNet/ChatGptOptionsBuilder.md) | Builder class to define settings for configuring ChatGPT. |
| static class [ChatGptOptionsBuilderExtensions](./ChatGptNet/ChatGptOptionsBuilderExtensions.md) | Provides extensions to configure settings for accessing ChatGPT service. |
Expand All @@ -13,6 +14,7 @@
| static class [IChatGptBuilderExtensions](./ChatGptNet/IChatGptBuilderExtensions.md) | Provides extension methods for configuring ChatGPT after service creation. |
| interface [IChatGptCache](./ChatGptNet/IChatGptCache.md) | Represents the interface used to define the caching behavior for ChatGPT messages. |
| interface [IChatGptClient](./ChatGptNet/IChatGptClient.md) | Provides methods to interact with ChatGPT. |
| interface [IChatGptClientFactory](./ChatGptNet/IChatGptClientFactory.md) | Provides methods to create new instances of [`IChatGptClient`](./ChatGptNet/IChatGptClient.md) at runtime |

## ChatGptNet.Exceptions namespace

Expand Down
7 changes: 4 additions & 3 deletions samples/ChatGptApi/ChatGptApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.1.0" />
<PackageReference Include="Polly.Extensions" Version="8.2.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.2.0" />
<PackageReference Include="Polly.Extensions" Version="8.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.0.6" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 3 additions & 8 deletions samples/ChatGptApi/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Diagnostics;
using System.Text.Json.Serialization;
using ChatGptNet;
using ChatGptNet.Extensions;
using TinyHelpers.AspNetCore.Extensions;

var builder = WebApplication.CreateBuilder(args);

Expand Down Expand Up @@ -40,13 +40,8 @@
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Services.AddProblemDetails(options =>
{
options.CustomizeProblemDetails = context =>
{
context.ProblemDetails.Extensions["traceId"] = Activity.Current?.Id ?? context.HttpContext.TraceIdentifier;
};
});
builder.Services.AddDefaultProblemDetails();
builder.Services.AddDefaultExceptionHandler();

var app = builder.Build();

Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGptApi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ApiKey": "", // Required
//"Organization": "", // Optional, used only by OpenAI
"ResourceName": "", // Required when using Azure OpenAI Service
"ApiVersion": "2023-12-01-preview", // Optional, used only by Azure OpenAI Service (default: 2023-08-01-preview)
"ApiVersion": "2024-02-15-preview", // Optional, used only by Azure OpenAI Service (default: 2024-02-15-preview)
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory

"DefaultModel": "my-model",
Expand Down

0 comments on commit 0148e11

Please sign in to comment.