ERNIE-Bot.SDK
0.2.0-preview
This is a prerelease version of ERNIE-Bot.SDK.
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 ERNIE-Bot.SDK --version 0.2.0-preview
NuGet\Install-Package ERNIE-Bot.SDK -Version 0.2.0-preview
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="ERNIE-Bot.SDK" Version="0.2.0-preview" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ERNIE-Bot.SDK --version 0.2.0-preview
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ERNIE-Bot.SDK, 0.2.0-preview"
#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 ERNIE-Bot.SDK as a Cake Addin #addin nuget:?package=ERNIE-Bot.SDK&version=0.2.0-preview&prerelease // Install ERNIE-Bot.SDK as a Cake Tool #tool nuget:?package=ERNIE-Bot.SDK&version=0.2.0-preview&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ERNIE-Bot SDK
ERNIE-Bot(文心千帆) .NET SDK
使用
引入该 Package 之后,实例化ERNIEBotClient
即可使用。
var clientId = builder.Configuration["ClientId"];
var secret = builder.Configuration["ClientSecret"];
var httpClient = new HttpClient();
var tokenStore = new MemoryTokenStore();
var client = new ERNIEBotClient(clientId, secret, client, tokenStore);
API 鉴权令牌的存储和管理
由于百度的接口采用了AccessToken的鉴权方式,所以需要在使用之前先获取AccessToken,然后在请求的时候带上AccessToken。为了方便管理,SDK提供了ITokenStore
接口,用于存储和管理AccessToken。
用户可自行实现该接口,自行管理AccessToken的存储和更新。SDK提供了MemoryTokenStore
,用于在内存中存储AccessToken,该实现依赖于MemoryCache
。
接口功能
- API 鉴权
- ERNIE-Bot
- ERNIE-Bot (Stream)
- ERNIE-Bot-turbo
- ERNIE-Bot-turbo (Stream)
- Embedding-V1
- BLOOMZ-7B
- Prompt模版
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- IdentityModel (>= 6.1.0)
- Microsoft.Extensions.Caching.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.VisualStudio.Validation (>= 17.6.11)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on ERNIE-Bot.SDK:
Package | Downloads |
---|---|
ERNIE-Bot.SemanticKernel
ERNIE-Bot(文心千帆) 集成 Semantic Kernel |
|
ERNIE-Bot.KernelMemory
Package Description |
|
Thor.ErnieBot
Thor(雷神托尔)AI网关,用于管理AI大模型服务。 |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on ERNIE-Bot.SDK:
Repository | Stars |
---|---|
AIDotNet/Thor
Thor(雷神托尔) 是一款强大的人工智能模型管理工具,其主要目的是为了实现多种AI模型的统一管理和使用。通过Thor(雷神托尔),用户可以轻松地管理和使用众多AI模型,而且Thor(雷神托尔)兼容OpenAI的接口格式,使得使用更加方便。
|
Version | Downloads | Last updated |
---|---|---|
0.14.4 | 2,360 | 3/19/2024 |
0.14.3 | 185 | 3/19/2024 |
0.14.2 | 175 | 3/18/2024 |
0.14.1 | 285 | 2/18/2024 |
0.14.0 | 193 | 2/6/2024 |
0.13.1 | 188 | 1/16/2024 |
0.13.0 | 2,177 | 12/21/2023 |
0.12.0-preview | 195 | 12/11/2023 |
0.11.0-preview | 193 | 12/5/2023 |
0.10.0-preview | 198 | 11/28/2023 |
0.9.0-preview | 171 | 11/23/2023 |
0.8.0-preview | 147 | 11/14/2023 |
0.7.0-preview | 615 | 10/16/2023 |
0.6.1-preview | 197 | 9/6/2023 |
0.6.0-preview | 152 | 9/5/2023 |
0.5.1-preview | 1,106 | 8/31/2023 |
0.5.0-preview | 227 | 8/29/2023 |
0.4.0-preview | 140 | 8/29/2023 |
0.3.2-preview | 526 | 7/11/2023 |
0.3.1-preview | 218 | 7/6/2023 |
0.3.0-preview | 176 | 7/6/2023 |
0.2.1-preview | 204 | 6/29/2023 |
0.2.0-preview | 153 | 6/28/2023 |
0.1.0-preview | 145 | 6/25/2023 |