Rag.NET.DataProviders.GitHub
1.1.0
dotnet add package Rag.NET.DataProviders.GitHub --version 1.1.0
NuGet\Install-Package Rag.NET.DataProviders.GitHub -Version 1.1.0
<PackageReference Include="Rag.NET.DataProviders.GitHub" Version="1.1.0" />
<PackageVersion Include="Rag.NET.DataProviders.GitHub" Version="1.1.0" />
<PackageReference Include="Rag.NET.DataProviders.GitHub" />
paket add Rag.NET.DataProviders.GitHub --version 1.1.0
#r "nuget: Rag.NET.DataProviders.GitHub, 1.1.0"
#:package Rag.NET.DataProviders.GitHub@1.1.0
#addin nuget:?package=Rag.NET.DataProviders.GitHub&version=1.1.0
#tool nuget:?package=Rag.NET.DataProviders.GitHub&version=1.1.0
Rag.NET.DataProviders.GitHub
Part of Rag.NET — a modular RAG pipeline for .NET built on Microsoft.Extensions.AI. Ships as 73 packages; install only what you call. Documentation · Choosing packages
GitHub repository connector for Rag.NET ingestion, built on Octokit: streams a branch's files into the pipeline, with commit-SHA deltas so subsequent runs only fetch what changed — and the blob SHA as ETag, guaranteeing byte-identical content is never re-ingested.
Install
dotnet add package Rag.NET.DataProviders.GitHub
Setup
This connector is constructed directly (no DI extension method) so you control the Octokit client:
using Microsoft.Extensions.DependencyInjection;
using Octokit;
using Rag.NET.Abstractions;
using Rag.NET.DataProviders.GitHub;
var gitHubClient = new GitHubClient(new ProductHeaderValue("my-app"))
{
Credentials = new Credentials(Environment.GetEnvironmentVariable("GITHUB_TOKEN")!),
};
var provider = new GitHubDataProvider(
owner: "my-org",
repo: "my-repo",
client: gitHubClient,
options: new GitHubDataProviderOptions
{
Branch = "main",
Extensions = [".md", ".cs"],
LastIngestedCommitSha = savedCommitSha, // null on first run = full traversal
});
services.AddSingleton<IFileContentProvider>(provider);
Example
using Rag.NET.DataProviders;
using Rag.NET.Models;
var result = await pipeline.IngestFromProviderAsync(provider, new ProviderId("github"), hashStore);
Console.WriteLine($"Ingested {result.Ingested}, skipped {result.Skipped}");
// Persist the branch HEAD SHA after an error-free run for the next delta.
Full guide
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Octokit (>= 14.0.0)
- Rag.NET.DataProviders (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.