Conversation
|
Someone is attempting to deploy a commit to the MSFT-AIP Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Adds an embeddings capability to the Foundry Local C# SDK, aligning it with the existing OpenAI-compatible chat and audio clients and exposing it through the model abstraction.
Changes:
- Introduces
OpenAIEmbeddingClientwith request/response serialization helpers and JSON source-gen registrations. - Exposes embeddings via
IModel.GetEmbeddingClientAsync()and implements it onModel/ModelVariantwith loaded-model enforcement. - Adds test coverage plus README/API docs updates for the new embeddings surface.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/cs/src/OpenAI/EmbeddingClient.cs | Adds OpenAIEmbeddingClient and the public embeddings API surface. |
| sdk/cs/src/OpenAI/EmbeddingRequestResponseTypes.cs | Adds embeddings request DTO + response parsing/serialization helpers. |
| sdk/cs/src/IModel.cs | Adds GetEmbeddingClientAsync to the public model interface. |
| sdk/cs/src/Detail/Model.cs | Wires GetEmbeddingClientAsync through to the selected variant. |
| sdk/cs/src/Detail/ModelVariant.cs | Implements GetEmbeddingClientAsync with “must be loaded” validation. |
| sdk/cs/src/Detail/JsonSerializationContext.cs | Registers embeddings request/response types for STJ source generation. |
| sdk/cs/test/FoundryLocal.Tests/EmbeddingClientTests.cs | Adds embeddings integration tests (basic, normalization, determinism, known values). |
| sdk/cs/README.md | Documents embeddings feature and shows usage + settings. |
| sdk/cs/docs/api/microsoft.ai.foundry.local.openaiembeddingclient.md | Adds generated API docs for OpenAIEmbeddingClient. |
| sdk/cs/docs/api/microsoft.ai.foundry.local.imodel.md | Updates generated API docs for IModel with embeddings accessor. |
| sdk/cs/docs/api/microsoft.ai.foundry.local.model.md | Updates generated API docs for Model with embeddings accessor. |
| sdk/cs/docs/api/microsoft.ai.foundry.local.modelvariant.md | Updates generated API docs for ModelVariant with embeddings accessor. |
| sdk/cs/docs/api/index.md | Adds OpenAIEmbeddingClient to the API docs index. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added null checks Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
213a854 to
e9d887d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// Get an OpenAI API based EmbeddingClient | ||
| /// </summary> | ||
| /// <param name="ct">Optional cancellation token.</param> | ||
| /// <returns>OpenAI.EmbeddingClient</returns> |
There was a problem hiding this comment.
The XML doc <returns> says OpenAI.EmbeddingClient, but the method returns OpenAIEmbeddingClient (and there is no OpenAI.EmbeddingClient type). Update the return documentation to reference the correct type to avoid misleading API consumers and generated docs.
| /// <returns>OpenAI.EmbeddingClient</returns> | |
| /// <returns>OpenAIEmbeddingClient</returns> |
No description provided.