hongmao.HmExtension.AiChat 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package hongmao.HmExtension.AiChat --version 1.0.0                
NuGet\Install-Package hongmao.HmExtension.AiChat -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="hongmao.HmExtension.AiChat" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add hongmao.HmExtension.AiChat --version 1.0.0                
#r "nuget: hongmao.HmExtension.AiChat, 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.
// Install hongmao.HmExtension.AiChat as a Cake Addin
#addin nuget:?package=hongmao.HmExtension.AiChat&version=1.0.0

// Install hongmao.HmExtension.AiChat as a Cake Tool
#tool nuget:?package=hongmao.HmExtension.AiChat&version=1.0.0                

AI模块

该模块用于简化各种大模型的调用过程

使用方式

后续会不定期添加支持的模型

星火

1. 创建AI客户端

_client = HmAiChatClientFactory.Create(new XingHuoChatOption()
            {
                ApiUrl = ApiUrl,
                ApiSecret = AppSecret
            });

2. 设置AI的身份(可选)

_client.SetSystemMessage("你是一个经验丰富的C#开发工程师");

3. 发送消息

try
{
    // 发送并接收消息
    var msg = await _client.SendMessageAsync(XinHuoModel.Lite, contentTb.Text);
}
catch (Exception ex)
{
    MessageBox.Show($"发生错误:{ex.Message}");
    Console.WriteLine(ex.StackTrace);
}
Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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.1 134 8/22/2024
1.0.0 122 8/22/2024

1. 新增AI模块
2. 新增星火大模型支持
3. 新增星火大模型测试界面