Skip to content

Implement Microsoft.Extensions.AI IEmbeddingGenerator#2

Merged
ericstj merged 1 commit into
mainfrom
meai-embeddinggenerator
Jun 8, 2026
Merged

Implement Microsoft.Extensions.AI IEmbeddingGenerator#2
ericstj merged 1 commit into
mainfrom
meai-embeddinggenerator

Conversation

@ericstj

@ericstj ericstj commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Exposes Model2VecModel as Microsoft.Extensions.AI IEmbeddingGenerator<string, Embedding<float>> so it plugs directly into the .NET AI ecosystem (RAG pipelines, vector stores, semantic search).

What's new

  • Model2VecModel implements IEmbeddingGenerator<string, Embedding<float>> via a partial class; GenerateAsync reuses the existing Encode inference path.
  • Composes with any Microsoft.Extensions.VectorData store (e.g. Hnsw.Net) to embed and index text with no external service.

Notes

  • Additive, non-breaking API; dotnet pack passes package validation against the 0.1.0 baseline.
  • 11/11 tests pass, including 3 new EmbeddingGeneratorTests (single/batch parity with Encode and metadata).

Expose Model2VecModel as IEmbeddingGenerator<string, Embedding<float>>
so it plugs into the .NET AI ecosystem (RAG, vector stores, semantic
search) and composes with Microsoft.Extensions.VectorData stores.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ericstj ericstj merged commit f24ec53 into main Jun 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant