redis-vl-dotnet
Extensions
This section is the canonical overview for optional vectorizer and reranker packages.
Package layout
The repository keeps provider contracts and implementations outside the core package boundary:
-
src/RedisVL.Vectorizers.Abstractionsfor provider-agnostic text vectorizer contracts -
src/RedisVL.Rerankers.Abstractionsfor provider-agnostic reranker contracts -
src/RedisVL.Vectorizers.OpenAIfor OpenAI embeddings -
src/RedisVL.Vectorizers.HuggingFacefor Hugging Facehf-inferenceembeddings -
src/RedisVL.Rerankers.Coherefor Cohere reranking
Shared contracts
The current abstractions surface includes:
-
ITextVectorizerfor single-input embedding generation -
IBatchTextVectorizerfor providers that can embed multiple inputs in one request -
TextVectorizerExtensions.VectorizeManyAsync(…)for batch-friendly fallback behavior -
ITextRerankerfor query-plus-candidate reranking -
RerankRequest,RerankDocument, andRerankResultfor provider-neutral reranking payloads
The legacy RedisVL.Caches.ITextEmbeddingGenerator interface remains as an obsolete shim over ITextVectorizer for incremental migration.
Read the provider-neutral contract details here:
Provider packages
Use these package pages when you need constructor, environment, and example guidance:
Provider-backed examples
Use these examples when you want runnable package coverage:
-
/examples/OpenAiVectorizerExamplerequiresOPENAI_API_KEY -
/examples/HuggingFaceVectorizerExamplerequiresHF_TOKEN -
/examples/CohereRerankerExamplerequiresCOHERE_API_KEY
These examples show how the provider packages plug into higher-level workflows such as SemanticCache.
All three examples read credentials from environment variables and fail fast with an explicit message when the required provider credential is missing.