RAGToolkit.AI.VectorData.Tei
1.0.1
dotnet add package RAGToolkit.AI.VectorData.Tei --version 1.0.1
NuGet\Install-Package RAGToolkit.AI.VectorData.Tei -Version 1.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="RAGToolkit.AI.VectorData.Tei" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RAGToolkit.AI.VectorData.Tei" Version="1.0.1" />
<PackageReference Include="RAGToolkit.AI.VectorData.Tei" />
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 RAGToolkit.AI.VectorData.Tei --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RAGToolkit.AI.VectorData.Tei, 1.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 RAGToolkit.AI.VectorData.Tei@1.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=RAGToolkit.AI.VectorData.Tei&version=1.0.1
#tool nuget:?package=RAGToolkit.AI.VectorData.Tei&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RAGToolkit.AI.VectorData.Tei
用 Hugging Face Text Embeddings Inference 的 /embed_sparse 端点做稀疏向量生成 —— 面向 SPLADE 这类学习式稀疏模型。
用法
using RAGToolkit.AI.VectorData.Tei;
var generator = new TextEmbeddingsInferenceSparseGenerator(httpClient);
builder.Services.AddSingleton<ISparseEmbeddingGenerator<string>>(generator);
httpClient.BaseAddress 指向 TEI 服务,例如 http://localhost:8080。
注册到 DI 之后,Qdrant 那边没显式配生成器的稀疏选项会自动挂上它 —— 见
...VectorData.Qdrant。
API
public sealed class TextEmbeddingsInferenceSparseGenerator(
HttpClient httpClient,
string requestPath = "/embed_sparse") : ISparseEmbeddingGenerator<string>
请求体 { "inputs": [...] },响应是每个输入一组 { index, value }。
注意
- 只做稀疏。 稠密嵌入走
IEmbeddingGenerator(TEI 的/embed,或任何其他 provider)。 - TEI 不能做文本生成 —— 它是嵌入 / 重排服务,不是 chat 服务。
依赖
RAGToolkit.AI.VectorData.AbstractionsMicrosoft.Extensions.AI.Abstractions
许可证
MIT —— 见 LICENSE。
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- RAGToolkit.AI.VectorData.Abstractions (>= 1.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.