Skip to content

Commit ffe9b12

Browse files
authored
Update API version and model references (#160)
2 parents 5f5bcdd + ab8d289 commit ffe9b12

File tree

13 files changed

+33
-29
lines changed

13 files changed

+33
-29
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ builder.Services.AddChatGpt(options =>
5959
- 2024-02-15-preview
6060
- 2024-03-01-preview
6161
- 2024-04-01-preview
62-
- 2024-05-01-preview (default)
62+
- 2024-05-01-preview
6363
- 2024-02-01
64+
- 2024-06-01 (default)
6465
- _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").
6566

6667
### DefaultModel and DefaultEmbeddingModel
@@ -78,6 +79,7 @@ Currently available models are:
7879
- gpt-4-32k
7980
- gpt-4-turbo
8081
- gpt-4o
82+
- gpt-4o-mini
8183

8284
They have fixed names, available in the [OpenAIChatGptModels.cs file](https://github.com/marcominerva/ChatGptNet/blob/master/src/ChatGptNet/Models/OpenAIChatGptModels.cs).
8385

@@ -143,7 +145,7 @@ The configuration can be automatically read from [IConfiguration](https://learn.
143145
"ApiKey": "", // Required
144146
//"Organization": "", // Optional, used only by OpenAI
145147
"ResourceName": "", // Required when using Azure OpenAI Service
146-
"ApiVersion": "2023-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2023-08-01-preview)
148+
"ApiVersion": "2024-06-01", // Optional, used only by Azure OpenAI Service (default: 2024-06-01)
147149
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
148150
149151
"DefaultModel": "my-model",

samples/ChatGptApi/ChatGptApi.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
11-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
12-
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.7" />
11+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.7.0" />
1312
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
1413
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.1.6" />
1514
</ItemGroup>

samples/ChatGptApi/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-01-preview)
7+
"ApiVersion": "2024-06-01", // Optional, used only by Azure OpenAI Service (default: 2024-06-01)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

samples/ChatGptBlazor.Wasm/ChatGptBlazor.Wasm.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Markdig" Version="0.37.0" />
12-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.6" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.6" PrivateAssets="all" />
14-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
15-
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.7" PrivateAssets="all" />
14+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.7.0" />
1615
</ItemGroup>
1716

1817
<ItemGroup>

samples/ChatGptConsole/ChatGptConsole.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
13-
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
12+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.7.0" />
1413
</ItemGroup>
1514

1615
<ItemGroup>

samples/ChatGptConsole/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-01-preview)
7+
"ApiVersion": "2024-06-01", // Optional, used only by Azure OpenAI Service (default: 2024-06-01)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

samples/ChatGptFunctionCallingConsole/ChatGptFunctionCallingConsole.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
13-
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
12+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.7.0" />
1413
</ItemGroup>
1514

1615
<ItemGroup>

samples/ChatGptFunctionCallingConsole/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-01-preview)
7+
"ApiVersion": "2024-06-01", // Optional, used only by Azure OpenAI Service (default: 2024-06-01)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

samples/ChatGptStreamConsole/ChatGptStreamConsole.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
13-
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
12+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.7.0" />
1413
</ItemGroup>
1514

1615
<ItemGroup>

samples/ChatGptStreamConsole/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-01-preview)
7+
"ApiVersion": "2024-06-01", // Optional, used only by Azure OpenAI Service (default: 2024-06-01)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

0 commit comments

Comments
 (0)