FaceMan.SemanticHub
1.0.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FaceMan.SemanticHub --version 1.0.3
NuGet\Install-Package FaceMan.SemanticHub -Version 1.0.3
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="FaceMan.SemanticHub" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FaceMan.SemanticHub --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FaceMan.SemanticHub, 1.0.3"
#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 FaceMan.SemanticHub as a Cake Addin #addin nuget:?package=FaceMan.SemanticHub&version=1.0.3 // Install FaceMan.SemanticHub as a Cake Tool #tool nuget:?package=FaceMan.SemanticHub&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SemanticHub
.Net 基于SK接入大语言模型的SDK,帮助使用者快速对接各大模型,目前仅支持对话模型
- 支持流式接口在聊天接口中整合统一的入参和出参,方便调用。
Version
v1.0.1 添加AzureOpenAI、OpenAI、通义千问、智谱AI、讯飞星火、文心一言对话模型,支持传入模型参数。
v1.0.2 自定义代理地址,增加单元测试,统一AzureOpenAI、OpenAI与其他模型的写法
v1.0.3 返回消耗的token数
v1.0.4 开发中。。。。
- 图像接口
已完成对话模型
- AzureOpenAI
- OpenAI
- 通义千问
- 讯飞星火
- 文心一言
- 智谱AI
也可以直接搜索Nuget包FaceMan.SemanticHub引入
计划功能
- 对话模型
- 支持返回Token
- 支持自定义代理地址
- 图像接口
- 语音转文字接口
- 增加chatGLM、Gemini 等更多大模型
- 未完待续。。。
使用方法
项目地址:faceman0814/SemanticHub (github.com)
参考单元测试内容
Tips
- 单元测试时的时候不要并发点,会报错,因为他是websocket访问。
- OpenAI 采用流式方法对话时,不会返回消耗的token。
- 各模型厂商对token的消耗计算是不一样的,可以通过单元测试对比结果。
- 测试中通义千问流式方法消耗的token比直接对话的要多一点。
- 文心一言实际调用中的模型并不叫模型名,要跟官方的对标好比如ernie-bot实际在代码中的传参是completions,这个后续优化。
- 文心一言有概率乱答
如何贡献
如果你希望参与贡献,欢迎 Pull Requests,或给我们 Issues
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.Azure.Management.ResourceManager.Fluent (>= 1.38.1)
- Microsoft.SemanticKernel (>= 1.0.1)
- Microsoft.SemanticKernel.Connectors.Qdrant (>= 1.0.1-alpha)
- Microsoft.SemanticKernel.Connectors.Sqlite (>= 1.0.1-alpha)
- Microsoft.SemanticKernel.Plugins.Document (>= 1.0.1-alpha)
- Microsoft.SemanticKernel.Plugins.MsGraph (>= 1.0.1-alpha)
- Microsoft.SemanticKernel.Plugins.OpenApi (>= 1.0.1-alpha)
- Microsoft.SemanticKernel.Plugins.Web (>= 1.0.1-alpha)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
支持返回消耗的token数