Sdcb.WenXinQianFan
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package Sdcb.WenXinQianFan --version 1.0.0
NuGet\Install-Package Sdcb.WenXinQianFan -Version 1.0.0
<PackageReference Include="Sdcb.WenXinQianFan" Version="1.0.0" />
paket add Sdcb.WenXinQianFan --version 1.0.0
#r "nuget: Sdcb.WenXinQianFan, 1.0.0"
// Install Sdcb.WenXinQianFan as a Cake Addin #addin nuget:?package=Sdcb.WenXinQianFan&version=1.0.0 // Install Sdcb.WenXinQianFan as a Cake Tool #tool nuget:?package=Sdcb.WenXinQianFan&version=1.0.0
Sdcb.WenXinQianFan
English | ��������
Sdcb.WenXinQianFan
��һ���ǹٷ��Ŀ�Դ��Ŀ���ṩWenXin QianFan API �� .NET �ͻ��ˡ������Ŀ�������������ܹ�����Ȼ�������û���������������˺��������֡�
����
- Ϊ WenXin QianFan API �ṩ .NET �ͻ��ˡ�
- ֧��ͬ�����첽ͨ�š�
- ʵ������API����ʵ��ʵʱͨ�š�
- Ϊ��������˿����ṩ�˼�ֱ�۵�API��
��װ
ͨ��NuGet����װ Sdcb.WenXinQianFan
�� �ڳ��������������̨����������������װ�������
Install-Package Sdcb.WenXinQianFan
ʹ�÷���
Ҫʹ�� Sdcb.WenXinQianFan������Ҫ����һ�� QianFanClient
��ʵ����������ͨ����WenXin QianFan APIƾ�ݴ��ݸ����캯���������ͻ��ˣ�
QianFanClient client = new QianFanClient(apiKey, apiSecret);
ʾ��1��ʹ��ͬ��API��������������
����ʾ����ʾ�����ʹ�� ChatAsync
�����������������죺
QianFanClient c = new QianFanClient(apiKey, apiSecret);
ChatResponse msg = await c.ChatAsync(KnownModel.ERNIEBotTurbo, new ChatMessage[]
{
ChatMessage.FromUser("ϵͳ��ʾ�����������һ��5���к������ڽ�ɫҡ������ѧ�������������ģ���һ������ʦ"),
ChatMessage.FromAssistant("����"),
ChatMessage.FromUser("���С���ѣ���������ʦ����������ѧ��"),
});
Console.WriteLine(msg.Result);
ʾ��2��ʹ����API��������������
����ʾ����ʾ�����ʹ�� ChatAsStreamAsync
�����Լ���API�������������죺
StringBuilder sb = new StringBuilder();
QianFanClient c = new QianFanClient(apiKey, apiSecret);
await foreach (StreamedChatResponse msg in c.ChatAsStreamAsync(KnownModel.ERNIEBot, new ChatMessage[] { ChatMessage.FromUser("���ϵ�ʡ�����ģ�") }, new ChatRequestParameters
{
Temperature = 0.5f,
PenaltyScore = 2.0f,
UserId = "zhoujie"
}))
{
sb.Append(msg.Result);
}
Console.WriteLine(sb.ToString());
֧�ֵ�ģ��
������ Sdcb.WenXinQianFan ֧�ֵ�����ģ���б��
ģ�� | ���� |
---|---|
ERNIEBot | �ٶ������з��Ĵ�����ģ�ͣ����Ǻ����������ݣ����и�ǿ�ĶԻ��ʴ����ݴ������ɵ������� |
ERNIEBotTurbo | �ٶ������з��Ĵ�����ģ�ͣ����Ǻ����������ݣ����и�ǿ�ĶԻ��ʴ����ݴ������ɵ���������Ӧ�ٶȸ��졣 |
BLOOMZ_7B | ҵ��֪���Ĵ�����ģ�ͣ���BigScience�з�����Դ���ܹ���46�����Ժ�13�ֱ����������ı��� |
Llama2_7bChat | Meta AI�з�����Դ���ڱ��롢�����֪ʶӦ�õȳ����������㣬Llama-2-7b-chat�Ǹ�����ԭ����Դ�汾�������ڶԻ������� |
Llama2_13bChat | Meta AI�з�����Դ���ڱ��롢�����֪ʶӦ�õȳ����������㣬Llama-2-13b-chat��������Ч�������ԭ����Դ�汾�������ڶԻ������� |
Llama2_70bChat | Meta AI�з�����Դ���ڱ��롢�����֪ʶӦ�õȳ����������㣬Llama-2-70b-chat�Ǹ߾���Ч����ԭ����Դ�汾�� |
QianfanBLOOMZ_7BCompressed | ǧ���Ŷ���BLOOMZ-7B�����ϵ�ѹ���汾���ں�������ϡ�軯�ȼ������Դ�ռ�ý���30%���ϡ� |
QianfanChineseLlama2_7B | ǧ���Ŷ���Llama-2-7b�����ϵ�������ǿ�汾����CMMLU��C-EVAL���������ݼ��ϱ������졣 |
ChatGLM2_6B_32K | ����AI���廪KEGʵ���ҷ�������Ӣ˫��Ի�ģ�ͣ��ܹ����õĴ������32K���ȵ������ġ� |
AquilaChat_7B | ����Դ�о�Ժ�з�������Aquila-7Bѵ���ĶԻ�ģ�ͣ�֧���������ı��Ի���������������������ͨ���������չ������ָ��淶��ʵ�� AquilaChat������ģ�ͺ��ߵĵ��ã���������չ�� |
���µ��б���������������˽⡣
���֤
Sdcb.WenXinQianFan ��ѭ MIT ���֤�� �����LICENSE.txt�ļ��Ի�ȡ������Ϣ��
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 7.0.0)
- System.Net.Http.Json (>= 7.0.1)
- System.Text.Json (>= 7.0.3)
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Sdcb.WenXinQianFan:
Repository | Stars |
---|---|
sdcb/chats
Flexible frontend for managing and deploying language models.
|