From 62da79ea9d981110e42257a9927bd25c78952fbc Mon Sep 17 00:00:00 2001 From: rodion-m Date: Sun, 23 Jul 2023 02:00:26 +0600 Subject: [PATCH] Update dependencies --- .../OpenAI.ChatGpt.AspNetCore.csproj | 2 +- .../OpenAI.ChatGpt.EntityFrameworkCore.csproj | 6 +++--- ...penAI.ChatGpt.Modules.StructuredResponse.csproj | 4 ++-- .../OpenAI.ChatGpt.Modules.Translator.csproj | 2 +- .../Models/ChatCompletion/ChatCompletionModels.cs | 10 +++++----- OpenAI.ChatGpt/OpenAI.ChatGpt.csproj | 2 +- OpenAI.ChatGpt/OpenAiClient.cs | 4 ++-- .../ChatGpt.BlazorExample.csproj | 4 ++-- .../ChatGpt.SpectreConsoleExample.csproj | 2 +- .../ChatGpt.TelegramBotExample.csproj | 6 +++--- samples/ChatGpt.TelegramBotExample/Program.cs | 6 +++--- .../OpenAI.ChatGpt.IntegrationTests.csproj | 14 +++++++------- .../OpenAI.ChatGpt.UnitTests.csproj | 12 ++++++------ 13 files changed, 37 insertions(+), 37 deletions(-) diff --git a/OpenAI.ChatGpt.AspNetCore/OpenAI.ChatGpt.AspNetCore.csproj b/OpenAI.ChatGpt.AspNetCore/OpenAI.ChatGpt.AspNetCore.csproj index 494f5b7..d829149 100644 --- a/OpenAI.ChatGpt.AspNetCore/OpenAI.ChatGpt.AspNetCore.csproj +++ b/OpenAI.ChatGpt.AspNetCore/OpenAI.ChatGpt.AspNetCore.csproj @@ -32,7 +32,7 @@ all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/OpenAI.ChatGpt.EntityFrameworkCore/OpenAI.ChatGpt.EntityFrameworkCore.csproj b/OpenAI.ChatGpt.EntityFrameworkCore/OpenAI.ChatGpt.EntityFrameworkCore.csproj index fd18a09..39298db 100644 --- a/OpenAI.ChatGpt.EntityFrameworkCore/OpenAI.ChatGpt.EntityFrameworkCore.csproj +++ b/OpenAI.ChatGpt.EntityFrameworkCore/OpenAI.ChatGpt.EntityFrameworkCore.csproj @@ -27,12 +27,12 @@ all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAI.ChatGpt.Modules.StructuredResponse.csproj b/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAI.ChatGpt.Modules.StructuredResponse.csproj index d9695f4..b934a81 100644 --- a/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAI.ChatGpt.Modules.StructuredResponse.csproj +++ b/OpenAI.ChatGpt.Modules.StructuredResponse/OpenAI.ChatGpt.Modules.StructuredResponse.csproj @@ -27,11 +27,11 @@ all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/OpenAI.ChatGpt.Modules.Translator/OpenAI.ChatGpt.Modules.Translator.csproj b/OpenAI.ChatGpt.Modules.Translator/OpenAI.ChatGpt.Modules.Translator.csproj index 1373def..ce7b326 100644 --- a/OpenAI.ChatGpt.Modules.Translator/OpenAI.ChatGpt.Modules.Translator.csproj +++ b/OpenAI.ChatGpt.Modules.Translator/OpenAI.ChatGpt.Modules.Translator.csproj @@ -28,7 +28,7 @@ all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/OpenAI.ChatGpt/Models/ChatCompletion/ChatCompletionModels.cs b/OpenAI.ChatGpt/Models/ChatCompletion/ChatCompletionModels.cs index 0cdb874..820a701 100644 --- a/OpenAI.ChatGpt/Models/ChatCompletion/ChatCompletionModels.cs +++ b/OpenAI.ChatGpt/Models/ChatCompletion/ChatCompletionModels.cs @@ -121,14 +121,14 @@ public static class ChatCompletionModels { { Gpt4, 8192 }, { Gpt4_0613, 8192 }, - { Gpt4_32k, 32768 }, - { Gpt4_32k_0613, 32768 }, + { Gpt4_32k, 32_768 }, + { Gpt4_32k_0613, 32_768 }, { Gpt3_5_Turbo, 4096 }, - { Gpt3_5_Turbo_16k, 16384 }, + { Gpt3_5_Turbo_16k, 16_384 }, { Gpt3_5_Turbo_0613, 4096 }, - { Gpt3_5_Turbo_16k_0613, 16384 }, + { Gpt3_5_Turbo_16k_0613, 16_384 }, { Gpt4_0314, 8192 }, - { Gpt4_32k_0314, 32768 }, + { Gpt4_32k_0314, 32_768 }, { Gpt3_5_Turbo_0301, 4096 }, }; diff --git a/OpenAI.ChatGpt/OpenAI.ChatGpt.csproj b/OpenAI.ChatGpt/OpenAI.ChatGpt.csproj index 1253865..a593e03 100644 --- a/OpenAI.ChatGpt/OpenAI.ChatGpt.csproj +++ b/OpenAI.ChatGpt/OpenAI.ChatGpt.csproj @@ -33,7 +33,7 @@ all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/OpenAI.ChatGpt/OpenAiClient.cs b/OpenAI.ChatGpt/OpenAiClient.cs index 26d5c71..8fbd038 100644 --- a/OpenAI.ChatGpt/OpenAiClient.cs +++ b/OpenAI.ChatGpt/OpenAiClient.cs @@ -104,7 +104,7 @@ private static void ValidateHttpClient(HttpClient httpClient) if (httpClient.DefaultRequestHeaders.Authorization is null) { throw new ArgumentException( - "HttpClient must have an Authorization header set." + + "HttpClient must have an Authorization header set. " + "It should include OpenAI's API key.", nameof(httpClient) ); @@ -122,7 +122,7 @@ private static void ValidateHttpClient(HttpClient httpClient) { throw new ArgumentException( "HttpClient's BaseAddress must end with a slash." + - "It should be set to OpenAI's API endpoint.", + " It should be set to OpenAI's API endpoint.", nameof(httpClient) ); } diff --git a/samples/ChatGpt.BlazorExample/ChatGpt.BlazorExample.csproj b/samples/ChatGpt.BlazorExample/ChatGpt.BlazorExample.csproj index 636c9c0..4be33d7 100644 --- a/samples/ChatGpt.BlazorExample/ChatGpt.BlazorExample.csproj +++ b/samples/ChatGpt.BlazorExample/ChatGpt.BlazorExample.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples/ChatGpt.SpectreConsoleExample/ChatGpt.SpectreConsoleExample.csproj b/samples/ChatGpt.SpectreConsoleExample/ChatGpt.SpectreConsoleExample.csproj index 39aa4cf..443d71e 100644 --- a/samples/ChatGpt.SpectreConsoleExample/ChatGpt.SpectreConsoleExample.csproj +++ b/samples/ChatGpt.SpectreConsoleExample/ChatGpt.SpectreConsoleExample.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/ChatGpt.TelegramBotExample/ChatGpt.TelegramBotExample.csproj b/samples/ChatGpt.TelegramBotExample/ChatGpt.TelegramBotExample.csproj index 5ec5b49..d32a0d2 100644 --- a/samples/ChatGpt.TelegramBotExample/ChatGpt.TelegramBotExample.csproj +++ b/samples/ChatGpt.TelegramBotExample/ChatGpt.TelegramBotExample.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/samples/ChatGpt.TelegramBotExample/Program.cs b/samples/ChatGpt.TelegramBotExample/Program.cs index 5e5868b..6fe43ef 100644 --- a/samples/ChatGpt.TelegramBotExample/Program.cs +++ b/samples/ChatGpt.TelegramBotExample/Program.cs @@ -47,15 +47,15 @@ // Send cancellation request to stop bot cts.Cancel(); -ServiceProvider CreateServiceProvider( - string openaikey, string initialMessage, int maxTokens, string? host = null) +static ServiceProvider CreateServiceProvider( + string openAiKey, string initialMessage, int maxTokens, string? host = null) { var services = new ServiceCollection(); services.AddSingleton(new ConfigurationBuilder().Build()); services.AddOptions() .Configure(cred => { - cred.ApiKey = openaikey; + cred.ApiKey = openAiKey; if(host is not null) cred.ApiHost = host; }); services.AddOptions() diff --git a/tests/OpenAI.ChatGpt.IntegrationTests/OpenAI.ChatGpt.IntegrationTests.csproj b/tests/OpenAI.ChatGpt.IntegrationTests/OpenAI.ChatGpt.IntegrationTests.csproj index f18754a..8301abf 100644 --- a/tests/OpenAI.ChatGpt.IntegrationTests/OpenAI.ChatGpt.IntegrationTests.csproj +++ b/tests/OpenAI.ChatGpt.IntegrationTests/OpenAI.ChatGpt.IntegrationTests.csproj @@ -10,18 +10,18 @@ - - - + + + - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/OpenAI.ChatGpt.UnitTests/OpenAI.ChatGpt.UnitTests.csproj b/tests/OpenAI.ChatGpt.UnitTests/OpenAI.ChatGpt.UnitTests.csproj index cb7e104..669b417 100644 --- a/tests/OpenAI.ChatGpt.UnitTests/OpenAI.ChatGpt.UnitTests.csproj +++ b/tests/OpenAI.ChatGpt.UnitTests/OpenAI.ChatGpt.UnitTests.csproj @@ -11,17 +11,17 @@ - - + + - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all