KimiAI_API 1.0.0
See the version list below for details.
dotnet add package KimiAI_API --version 1.0.0
NuGet\Install-Package KimiAI_API -Version 1.0.0
<PackageReference Include="KimiAI_API" Version="1.0.0" />
<PackageVersion Include="KimiAI_API" Version="1.0.0" />
<PackageReference Include="KimiAI_API" />
paket add KimiAI_API --version 1.0.0
#r "nuget: KimiAI_API, 1.0.0"
#:package KimiAI_API@1.0.0
#addin nuget:?package=KimiAI_API&version=1.0.0
#tool nuget:?package=KimiAI_API&version=1.0.0
该nuget包根据KimiAI官方提供的SDK进行改编,旨在您更加便捷地使用KimiAI提供的c#语言的API。 目前仍处于初步版本,仅包含普通的对话接口的调用,后续会更新其他KimiAI支持的功能。 包内包含所需的相关类,调用方法在KimiAI类中。
1.聊天接口: SendChat()方法返回HttpResponseMessage对象,根据您发出的请求,可选用HandleStream()或HandleChat()来处理并返回ChatResponse类,或者您可以根据自己的需要进行处理。 注意,HandleStream()方法返回IAsyncEnumerable<ChatResponse?>,需要使用foreach语句进行处理,以下是示例:
var response = await SendChat(chatReq, "YourKey"); await foreach(ChatResponse? result in HandleStream(response)) { ...your code... }
This nuget package is adapted from the official SDK provided by KimiAI, and is designed to make it easier for you to use the APIs provided by KimiAI in c# language. It is still in the preliminary version, only contains the call of common dialogue interface, and will be updated with other KimiAI supported functions. The package contains the required related classes, the calling methods are in the KimiAI class.
- Chat interface: SendChat() method returns the HttpResponseMessage object. Depending on the request you send, you can choose HandleStream() or HandleChat() to process and return the ChatResponse class, or you can do it according to your needs. Note that the HandleStream() method returns IAsyncEnumerable<ChatResponse?>, which needs to be processed using a foreach statement, as shown in the following example:
var response = await SendChat(chatReq, ‘YourKey’); await foreach(ChatResponse? result in HandleStream(response)) { ...your code... }
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Http (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Configuration.ConfigurationManager (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.