From 1c37086a6f90c3c94a27f06ffaa6e1c17387702c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E9=9C=87=E5=B7=8D?= Date: Sun, 7 May 2023 16:01:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Readme=E5=8F=8A?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 +++++++++++---- Samples/Senparc.AI.Samples.Consoles/Program.cs | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 63d2f97..cd42db8 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,16 @@ Senparc 全家桶的 AI 扩展包,目前主要集中于 LLM(大语言模型 }, //Senparc.AI 设置 "SenparcAiSetting": { - "IsDebug": true, - "AiPlatform": "AzureOpenAI", +"IsDebug": true, + "AiPlatform": "NeuCharOpenAI", + "NeuCharOpenAIKeys": { + "ApiKey": "YourNeuCharApiKey", + "NeuCharEndpoint": "https://www.neuchar.com//" + }, "AzureOpenAIKeys": { "ApiKey": "YourAzureApiKey", "AzureEndpoint": "https://xxxx.openai.azure.com/", - "AzureOpenAIApiVersion": "2022-12-01" + "AzureOpenAIApiVersion": "2022-12-01" }, "OpenAIKeys": { "ApiKey": "YourOpenAIKey", @@ -37,12 +41,15 @@ Senparc 全家桶的 AI 扩展包,目前主要集中于 LLM(大语言模型 ``` -其中:`AiPlatform` 目前可选值为 `OpenAI` 或 `AzureOpenAI`,分别对应 openai.com 官方接口(OpenAI),以及基于微软 Azure 的 Azure OpenAI 接口(AOAI),系统会根据配置自动实现切换,无需在逻辑代码中进行判断。 +其中:`AiPlatform` 目前可选值为 `OpenAI`、`NeuCharOpenAI` 或 `AzureOpenAI`,分别对应 openai.com 官方接口(OpenAI),以及 https://www.neuchar.com 由 Senparc 提供的中转接口,及基于微软 Azure 的 Azure OpenAI 接口(AOAI),系统会根据配置自动实现切换,无需在逻辑代码中进行判断。 仅当 `AiPlatform` 设置为 `OpenAI` 时,才需要设置 `OpenAIKeys` 及以下参数。 +仅当 `AiPlatform` 设置为 `NeuCharOpenAI` 时,才需要设置 `NeuCharOpenAIKeys` 及以下参数。 + 仅当 `AiPlatform` 设置为 `AzureOpenAI` 时,才需要设置 `AzureOpenAIKeys` 及以下参数。 + > 提示:AzureOpenAI 调用限制请参考:https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quotas-limits
> OpenAI 调用限制请参考 OpenAI 后台:https://platform.openai.com/docs/guides/rate-limits diff --git a/Samples/Senparc.AI.Samples.Consoles/Program.cs b/Samples/Senparc.AI.Samples.Consoles/Program.cs index 583e386..6565dd9 100644 --- a/Samples/Senparc.AI.Samples.Consoles/Program.cs +++ b/Samples/Senparc.AI.Samples.Consoles/Program.cs @@ -40,6 +40,8 @@ .UseSenparcAI(senparcAiSetting); +Console.WriteLine("启动完毕,当前接口:" + Senparc.AI.Config.SenparcAiSetting.AiPlatform); +Console.WriteLine(); Console.WriteLine("请输入序号,开始对应功能测试:"); Console.WriteLine("[1] GPT对话机器人"); Console.WriteLine("[2] 训练 Embedding 任务"); From 1d23c9bcacd057e9d254b01b519af04d63ef2de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E9=9C=87=E5=B7=8D?= Date: Sun, 7 May 2023 16:08:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Console=20Sample?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Samples/Senparc.AI.Samples.Consoles/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Samples/Senparc.AI.Samples.Consoles/Program.cs b/Samples/Senparc.AI.Samples.Consoles/Program.cs index 6565dd9..4da5a2a 100644 --- a/Samples/Senparc.AI.Samples.Consoles/Program.cs +++ b/Samples/Senparc.AI.Samples.Consoles/Program.cs @@ -41,6 +41,7 @@ Console.WriteLine("启动完毕,当前接口:" + Senparc.AI.Config.SenparcAiSetting.AiPlatform); +Console.WriteLine("======================="); Console.WriteLine(); Console.WriteLine("请输入序号,开始对应功能测试:"); Console.WriteLine("[1] GPT对话机器人");