DifyAI 2.0.1
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 DifyAI --version 2.0.1
NuGet\Install-Package DifyAI -Version 2.0.1
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="DifyAI" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DifyAI" Version="2.0.1" />
<PackageReference Include="DifyAI" />
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 DifyAI --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DifyAI, 2.0.1"
#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 DifyAI@2.0.1
#: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=DifyAI&version=2.0.1
#tool nuget:?package=DifyAI&version=2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
安装
Install-Package DifyAI
注册
services
.AddDifyAI(x =>
{
x.BaseDomain = "http://127.0.0.1/v1";
x.DefaultApiKey = "app-xxxxxxxxxxxxxxxx";
});
使用
private readonly IDifyAIService _difyAIService;
聊天助手、Agent 应用消息
// 阻塞模式
var rsp = await _difyAIService.ChatMessages.ChatAsync
(req);
// 流式模式
await foreach (var rsp in _difyAIService.ChatMessages.ChatStreamAsync(req))
{
}
// 停止响应
await _difyAIService.ChatMessages.StopChatAsync(req);
工作流应用消息
// 阻塞模式
var rsp = await _difyAIService.Workflows.WorkflowAsync
(req);
// 流式模式
await foreach (var rsp in _difyAIService.Workflows.WorkflowStreamAsyncAsync(req))
{
}
// 停止响应
await _difyAIService.Workflows.StopWorkflowAsync(req);
文本生成应用消息
// 阻塞模式
var rsp = await _difyAIService.CompletionMessages.CompletionAsync
(req);
// 流式模式
await foreach (var rsp in _difyAIService.CompletionMessages.CompletionStreamAsync(req))
{
}
// 停止响应
await _difyAIService.CompletionMessages.StopCompletionAsync(req);
文件
// 上传文件
var rsp = await _difyAIService.Files.UploadAsync(req);
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. 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.
-
net6.0
- Microsoft.Extensions.Http (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 6.0.0)
- MimeMapping (>= 3.0.1)
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 |
---|---|---|
3.10.0 | 122 | 7/18/2025 |
3.9.0 | 155 | 7/14/2025 |
3.8.0 | 729 | 6/9/2025 |
3.7.4 | 155 | 6/5/2025 |
3.7.3 | 166 | 5/27/2025 |
3.7.2 | 335 | 5/21/2025 |
3.7.1 | 142 | 5/21/2025 |
3.7.0 | 224 | 5/16/2025 |
3.6.0 | 162 | 5/9/2025 |
3.5.0 | 148 | 5/7/2025 |
3.4.0 | 184 | 4/24/2025 |
3.3.0 | 237 | 4/14/2025 |
3.2.0 | 186 | 4/11/2025 |
3.1.0 | 170 | 4/1/2025 |
3.0.1 | 2,464 | 11/19/2024 |
3.0.0 | 424 | 8/20/2024 |
2.5.0 | 126 | 7/25/2024 |
2.4.0 | 121 | 7/15/2024 |
2.3.1 | 167 | 5/27/2024 |
2.3.0 | 120 | 5/25/2024 |
2.2.0 | 122 | 5/21/2024 |
2.1.0 | 139 | 5/20/2024 |
2.0.1 | 122 | 5/18/2024 |
2.0.0 | 127 | 5/18/2024 |
1.2.0 | 117 | 5/14/2024 |
1.1.0 | 127 | 5/11/2024 |
1.1.0-beta2 | 102 | 5/11/2024 |
1.1.0-beta1 | 102 | 5/10/2024 |
1.0.0 | 137 | 5/10/2024 |