RAGFlowSharp 0.0.3

dotnet add package RAGFlowSharp --version 0.0.3
                    
NuGet\Install-Package RAGFlowSharp -Version 0.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="RAGFlowSharp" Version="0.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RAGFlowSharp" Version="0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="RAGFlowSharp" />
                    
Project file
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 RAGFlowSharp --version 0.0.3
                    
#r "nuget: RAGFlowSharp, 0.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.
#:package RAGFlowSharp@0.0.3
                    
#: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=RAGFlowSharp&version=0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=RAGFlowSharp&version=0.0.3
                    
Install as a Cake Tool

RAGFlowSharp

NuGet Version

RAGFlowSharp is a .NET-based RAG (Retrieval-Augmented Generation) workflow management library that provides a comprehensive set of APIs to manage various components in RAG applications.

Key Features

  • Dataset Management
  • File Processing
  • Text Chunking
  • Session Management
  • Intelligent Agent
  • Chat Assistant

Quick Start

Installation

dotnet add package RAGFlowSharp

Configuration

with Dependency injection
// Configure services in Program.cs or Startup.cs
services.AddRAGFlowSharp(options =>
{
    options.ApiKey = "<your-api-key>";
    options.BaseUrl = "http://your.ragflow.base.url";
});

Usage Example

public class MyRAGService
{
    private readonly IRagflowApi _ragflowApi;

    public MyRAGService(IRagflowApi ragflowApi)
    {
        _ragflowApi = ragflowApi;
    }

    public async Task ProcessDocument()
    {
        // Create dataset
        var dataset = await _ragflowApi.DatasetApi.CreateDatasetAsync(new CreateDatasetRequest
        {
            Name = "MyDataset",
            Description = "Sample Dataset"
        });

        // Upload file
        var file = await _ragflowApi.FileApi.UploadFileAsync(new UploadFileRequest
        {
            DatasetId = dataset.Id,
            FileName = "example.pdf",
            FileContent = File.ReadAllBytes("path/to/file.pdf")
        });

        // Process text chunks
        var chunks = await _ragflowApi.ChunkApi.ProcessFileAsync(new ProcessFileRequest
        {
            FileId = file.Id
        });

        // Create session
        var session = await _ragflowApi.SessionApi.CreateSessionAsync(new CreateSessionRequest
        {
            DatasetId = dataset.Id
        });

        // Use chat assistant
        var response = await _ragflowApi.ChatAssistantApi.ChatAsync(new ChatRequest
        {
            SessionId = session.Id,
            Message = "Please analyze the main content of this document"
        });
    }
}

API Interfaces

Dataset Management (IDatasetApi)

  • Create dataset
  • Get dataset list
  • Update dataset information
  • Delete dataset

File Processing (IFileApi)

  • Upload file
  • Get file list
  • Delete file
  • Get file content

Text Chunking (IChunkApi)

  • Process file chunks
  • Get chunk list
  • Update chunk information
  • Delete chunk

Session Management (ISessionApi)

  • Create session
  • Get session history
  • Update session status
  • Delete session

Intelligent Agent (IAgentApi)

  • Create agent
  • Configure agent behavior
  • Execute agent tasks
  • Manage agent status

Chat Assistant (IChatAssistantApi)

  • Send message
  • Get response
  • Manage conversation context
  • Configure assistant parameters

Contributing

Issues and Pull Requests are welcome!

License

MIT License

Product 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.  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. 
.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.

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
0.0.3 144 6/25/2025
0.0.2 154 5/11/2025
0.0.1 135 5/11/2025