KimiAI_API 1.0.0

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KimiAI_API" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KimiAI_API" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="KimiAI_API" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KimiAI_API --version 1.0.0
                    
#r "nuget: KimiAI_API, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package KimiAI_API@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KimiAI_API&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=KimiAI_API&version=1.0.0
                    
Install as a Cake Tool

该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.

  1. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 295 9/7/2024
1.0.2 216 9/7/2024 1.0.2 is deprecated because it has critical bugs.
1.0.1 218 9/1/2024
1.0.0 213 8/25/2024