Cisharpai.Rag.OpenAi
0.4.0
See the version list below for details.
dotnet add package Cisharpai.Rag.OpenAi --version 0.4.0
NuGet\Install-Package Cisharpai.Rag.OpenAi -Version 0.4.0
<PackageReference Include="Cisharpai.Rag.OpenAi" Version="0.4.0" />
<PackageVersion Include="Cisharpai.Rag.OpenAi" Version="0.4.0" />
<PackageReference Include="Cisharpai.Rag.OpenAi" />
paket add Cisharpai.Rag.OpenAi --version 0.4.0
#r "nuget: Cisharpai.Rag.OpenAi, 0.4.0"
#:package Cisharpai.Rag.OpenAi@0.4.0
#addin nuget:?package=Cisharpai.Rag.OpenAi&version=0.4.0
#tool nuget:?package=Cisharpai.Rag.OpenAi&version=0.4.0
Cisharpai.Rag.OpenAi
Bridge package that adds OpenAI hosted retrieval (file_search via the Responses API) to Cisharpai. Install this alongside Cisharpai.OpenAi, not instead of it.
using Cisharpai.OpenAi;
using Cisharpai.Rag;
using Cisharpai.Rag.OpenAi;
// Register both the OpenAI chat client and hosted retrieval:
services.AddOpenAiClient(opt =>
{
opt.ApiKey = "sk-...";
opt.DefaultModel = "gpt-4o";
});
services.AddOpenAiHostedRetrieval(opt =>
{
opt.ApiKey = "sk-...";
opt.DefaultModel = "gpt-4o";
});
Once registered, discover the feature through the standard Features.Get<T>() pattern and obtain an IRetriever bound to a specific vector store:
var feature = chatClient.Features.Get<IHostedRetrievalFeature>()!;
IRetriever retriever = feature.ForStore("vs_my_store");
IReadOnlyList<ScoredChunk> results = await retriever.RetrieveAsync("search query", topK: 5);
Each ForStore call returns an independent, thread-safe IRetriever. Consumers that need only retrieval depend on IRetriever directly and can swap implementations (hosted, BM25, hybrid) by changing a DI registration.
This package references both Cisharpai.OpenAi and Cisharpai.Rag, keeping the OpenAI provider package free of any RAG dependency for users who do not need retrieval.
See the RAG usage guide for vector store management, file upload, and configuration details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 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
- Cisharpai.OpenAi (>= 0.4.0)
- Cisharpai.Rag (>= 0.4.0)
-
net8.0
- Cisharpai.OpenAi (>= 0.4.0)
- Cisharpai.Rag (>= 0.4.0)
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.5.0-alpha.16.404 | 51 | 9/27/2026 |
| 0.5.0-alpha.12.396 | 52 | 9/22/2026 |
| 0.5.0-alpha.8.391 | 56 | 9/21/2026 |
| 0.5.0-alpha.4.386 | 48 | 9/21/2026 |
| 0.4.0 | 100 | 9/20/2026 |
| 0.4.0-PullRequest81.41.376 | 59 | 9/16/2026 |
| 0.4.0-PullRequest81.36.378 | 55 | 9/16/2026 |
| 0.4.0-PullRequest81.36.377 | 49 | 9/16/2026 |
| 0.4.0-alpha.35.380 | 56 | 9/16/2026 |
| 0.4.0-alpha.34.368 | 59 | 9/15/2026 |