-
Notifications
You must be signed in to change notification settings - Fork 812
Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods #6295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Libraries/Microsoft.Extensions.AI.Abstractions/Embeddings/EmbeddingGeneratorExtensions.cs
Show resolved
Hide resolved
4fa74f6
to
b2b85dc
Compare
To align with the the base method on IEmbeddingGenerator
b2b85dc
to
c37d937
Compare
@stephentoub @SteveSandersonMS should be good now. On a sidenote, we have 2 failing tests under /Users/roji/projects/extensions/test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests (this is before this PR - /cc @SteveSandersonMS?). |
Does cleaning your repo first help? |
Doesn't seem to, no... |
@roji Which tests fail? |
Microsoft.Extensions.AI.Templates.InegrationTests.AichatwebTemplatesTests.BasicAspireTest and Microsoft.Extensions.AI.Templates.InegrationTests.AichatwebTemplatesTests.BasicTest, are these passing for you? |
…eEmbedding extension methods (dotnet#6295)
…eEmbedding extension methods (#6295)
…ess build warnings (#6280) * Update chat template dependencies * Update test snapshots * Update Aspire version * Revert Aspire + update CommunityToolkit.Aspire * Open README in VS after project creation * Add Known Issue to Aspire README for Qdrant * Update survey template URL * Set the Project Template package version to -preview.2 * Update template baseline * Update template pinned versions * Do not append template args to snapshot names * Fix vector store index in the README. Add an AzureAISearch template test. * Add a note to the Aspire README for trusting the development certificate * Use AddOpenAIClient for OpenAI and AddAzureOpenAIClient for Azure OpenAI * Remove duplicated using System.ClientModel * Update Aspire README to specify the exception thrown for the known issue * Augment the Aspire README for more Docker notes for Ollama and Qdrant * Fix Microsoft.Extensions.Http.Resilience warnings with separate pinned versions * Update test baseline for: Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295) * Add --managed-identity to the template developer README * Apply the Ollama timeout recommendation in the template code * Call http.RemoveAllResilienceHandlers before adding the handler * Update template test baseline --------- Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: David Cantu <dacantu@microsoft.com>
…ess build warnings (dotnet#6280) * Update chat template dependencies * Update test snapshots * Update Aspire version * Revert Aspire + update CommunityToolkit.Aspire * Open README in VS after project creation * Add Known Issue to Aspire README for Qdrant * Update survey template URL * Set the Project Template package version to -preview.2 * Update template baseline * Update template pinned versions * Do not append template args to snapshot names * Fix vector store index in the README. Add an AzureAISearch template test. * Add a note to the Aspire README for trusting the development certificate * Use AddOpenAIClient for OpenAI and AddAzureOpenAIClient for Azure OpenAI * Remove duplicated using System.ClientModel * Update Aspire README to specify the exception thrown for the known issue * Augment the Aspire README for more Docker notes for Ollama and Qdrant * Fix Microsoft.Extensions.Http.Resilience warnings with separate pinned versions * Update test baseline for: Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (dotnet#6295) * Add --managed-identity to the template developer README * Apply the Ollama timeout recommendation in the template code * Call http.RemoveAllResilienceHandlers before adding the handler * Update template test baseline --------- Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: David Cantu <dacantu@microsoft.com>
…ess build warnings (#6280) * Update chat template dependencies * Update test snapshots * Update Aspire version * Revert Aspire + update CommunityToolkit.Aspire * Open README in VS after project creation * Add Known Issue to Aspire README for Qdrant * Update survey template URL * Set the Project Template package version to -preview.2 * Update template baseline * Update template pinned versions * Do not append template args to snapshot names * Fix vector store index in the README. Add an AzureAISearch template test. * Add a note to the Aspire README for trusting the development certificate * Use AddOpenAIClient for OpenAI and AddAzureOpenAIClient for Azure OpenAI * Remove duplicated using System.ClientModel * Update Aspire README to specify the exception thrown for the known issue * Augment the Aspire README for more Docker notes for Ollama and Qdrant * Fix Microsoft.Extensions.Http.Resilience warnings with separate pinned versions * Update test baseline for: Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295) * Add --managed-identity to the template developer README * Apply the Ollama timeout recommendation in the template code * Call http.RemoveAllResilienceHandlers before adding the handler * Update template test baseline --------- Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: David Cantu <dacantu@microsoft.com>
* Add missing reference to M.E.AI.OpenAI (#6275) * Update README.md with keyless auth guidance (#6261) * Update README.md * Update src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/README.md Co-authored-by: Jon Galloway <jongalloway@gmail.com> --------- Co-authored-by: Jon Galloway <jongalloway@gmail.com> * Add note on extending timeout for Ollama client (#6258) * Add note on extending timeout for Ollama client Standard HttpClient timeout of 10 seconds applied by Service Defaults under .NET Aspire is likely too short for Ollama calls. Add note with code to extend this timeout. * Update src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/README.Aspire.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/README.Aspire.md Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com> * Update chat template dependencies, fix OpenAI/Aspire config, and address build warnings (#6280) * Update chat template dependencies * Update test snapshots * Update Aspire version * Revert Aspire + update CommunityToolkit.Aspire * Open README in VS after project creation * Add Known Issue to Aspire README for Qdrant * Update survey template URL * Set the Project Template package version to -preview.2 * Update template baseline * Update template pinned versions * Do not append template args to snapshot names * Fix vector store index in the README. Add an AzureAISearch template test. * Add a note to the Aspire README for trusting the development certificate * Use AddOpenAIClient for OpenAI and AddAzureOpenAIClient for Azure OpenAI * Remove duplicated using System.ClientModel * Update Aspire README to specify the exception thrown for the known issue * Augment the Aspire README for more Docker notes for Ollama and Qdrant * Fix Microsoft.Extensions.Http.Resilience warnings with separate pinned versions * Update test baseline for: Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295) * Add --managed-identity to the template developer README * Apply the Ollama timeout recommendation in the template code * Call http.RemoveAllResilienceHandlers before adding the handler * Update template test baseline --------- Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: David Cantu <dacantu@microsoft.com> --------- Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com> Co-authored-by: Jordan Matthiesen <1333029+jmatthiesen@users.noreply.github.com> Co-authored-by: Jon Galloway <jongalloway@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: David Cantu <dacantu@microsoft.com>
…ds (#6295) To align with the the base method on IEmbeddingGenerator
…ds (#6295) To align with the the base method on IEmbeddingGenerator
…ess build warnings (#6280) * Update chat template dependencies * Update test snapshots * Update Aspire version * Revert Aspire + update CommunityToolkit.Aspire * Open README in VS after project creation * Add Known Issue to Aspire README for Qdrant * Update survey template URL * Set the Project Template package version to -preview.2 * Update template baseline * Update template pinned versions * Do not append template args to snapshot names * Fix vector store index in the README. Add an AzureAISearch template test. * Add a note to the Aspire README for trusting the development certificate * Use AddOpenAIClient for OpenAI and AddAzureOpenAIClient for Azure OpenAI * Remove duplicated using System.ClientModel * Update Aspire README to specify the exception thrown for the known issue * Augment the Aspire README for more Docker notes for Ollama and Qdrant * Fix Microsoft.Extensions.Http.Resilience warnings with separate pinned versions * Update test baseline for: Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295) * Add --managed-identity to the template developer README * Apply the Ollama timeout recommendation in the template code * Call http.RemoveAllResilienceHandlers before adding the handler * Update template test baseline --------- Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: David Cantu <dacantu@microsoft.com>
* Merged PR 49569: Cherry pick Evaluation changes for 9.4.3 release * Update package-lock.json for Evaluations * Reset package-lock.json to same as main branch * Merged PR 49585: [9.4.3] [cherry pick] A couple of minor fixes A couple of minor fixes 1. Adds back tool tip for metrics which are useful in cases where the metric name is long and does not fit entirely in the card 2. Makes the size of the selection buttons on the left of cards consistent with the size of status icons on the right to make the alignment cleaner 3. Implement IEquatable for UrlCacheKey (per Copilot's suggestion) 4. Throw ArgumentException when the number of messages passed to ContentSafetyChatClient does not match expectations (also per Copilot's suggestion) * Add test for optional parameters being required with RequireAllProperties (#6265) * Add test for optional parameters being required with RequireAllProperties * Test both requireAllProperties values * Use AssertDeepEquals that logs the difference to other tests * Adding reference to an unsupported built-in tool on OpenAI Chat API no longer throws (#6276) * Update M.E.AI changelogs (#6269) * Augment UseDistributedCache XML docs (#6256) * Augment AIFunctionFactory.Create XML docs (#6255) * Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295) To align with the the base method on IEmbeddingGenerator * Augment FunctionInvokingChatClient's span with token counts (#6296) * Rename ChatThreadId to ConversationId (#6300) * In OpenAI responses client, use response ID as ChatThreadId * Rename ChatThreadId -> ConversationId * Related renames * Restore deleted members as obsolete (#6304) * Restore EmbeddingGeneratorExtensions members as obsolete * Restore ChatThreadId as obsolete * Restore ChatResponse.ChatThreadId and ChatResponseUpdate.ChatThreadId as obsolete. * Remove the tests for obsolete members * Remove the Embeddings tests for obsolete members * Support [FromKeyedServices] in AIFunctionFactory (#6310) * Utilize IServiceProviderIsService in AIFunctionFactory (#6317) Add AIFunctionFactoryOptions.Services, and use it when examining function parameters to determine whether they should be resolved by default from DI. * Remove AsChatClient/AsEmbeddingGenerator that were obsoleted in 9.4.0-preview.1.25207.5 (#6327) * Add ChatOptions.AllowMultipleToolCalls (#6326) * Add ChatOptions.AllowMultipleToolCalls * Use it in OpenAI adapter * Disable default required property schema generation and OpenAI strict mode. (#6285) * Disable default required property schema generation and OpenAI strict mode. * Default strictness to OpenAI client defaults. * Fix a few failing tests. * Undo a number of additional changes made by #6064 * Revert change to structured output defaults. * Incorporate more test fixes. * Address feedback. * Tweak strict mode signature, fix failing tests. * Roll back schemaIsStrict flag from ChatResponseFormat. * Merged PR 49624: [9.4.3] [cherry-pick] Update readmes (#6345) Includes name of new metric that was added to Quality package. Also updates some doc comments. * Bump version to 9.4.3 * Merged PR 49636: [9.4.3] [cherry-pick] Skip messages that have no text when rendering conversations as part of evaluation prompts (#6349) * Add test for optional parameters being required with RequireAllProperties (#6265) * Add test for optional parameters being required with RequireAllProperties * Test both requireAllProperties values * Use AssertDeepEquals that logs the difference to other tests * Adding reference to an unsupported built-in tool on OpenAI Chat API no longer throws (#6276) * Update M.E.AI changelogs (#6269) * Augment UseDistributedCache XML docs (#6256) * Augment AIFunctionFactory.Create XML docs (#6255) * Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295) To align with the the base method on IEmbeddingGenerator * Augment FunctionInvokingChatClient's span with token counts (#6296) * Rename ChatThreadId to ConversationId (#6300) * In OpenAI responses client, use response ID as ChatThreadId * Rename ChatThreadId -> ConversationId * Related renames * Restore deleted members as obsolete (#6304) * Restore EmbeddingGeneratorExtensions members as obsolete * Restore ChatThreadId as obsolete * Restore ChatResponse.ChatThreadId and ChatResponseUpdate.ChatThreadId as obsolete. * Remove the tests for obsolete members * Remove the Embeddings tests for obsolete members * Support [FromKeyedServices] in AIFunctionFactory (#6310) * Utilize IServiceProviderIsService in AIFunctionFactory (#6317) Add AIFunctionFactoryOptions.Services, and use it when examining function parameters to determine whether they should be resolved by default from DI. * Remove AsChatClient/AsEmbeddingGenerator that were obsoleted in 9.4.0-preview.1.25207.5 (#6327) * Add ChatOptions.AllowMultipleToolCalls (#6326) * Add ChatOptions.AllowMultipleToolCalls * Use it in OpenAI adapter * Disable default required property schema generation and OpenAI strict mode. (#6285) * Disable default required property schema generation and OpenAI strict mode. * Default strictness to OpenAI client defaults. * Fix a few failing tests. * Undo a number of additional changes made by #6064 * Revert change to structured output defaults. * Incorporate more test fixes. * Address feedback. * Tweak strict mode signature, fix failing tests. * Roll back schemaIsStrict flag from ChatResponseFormat. * Bump version to 9.4.3 * Merged PR 49636: [9.4.3] [cherry-pick] Skip messages that have no text when rendering conversations as part of evaluation prompts (#6349) * Update chat template dependencies, fix OpenAI/Aspire config, and address build warnings (#6280) * Update chat template dependencies * Update test snapshots * Update Aspire version * Revert Aspire + update CommunityToolkit.Aspire * Open README in VS after project creation * Add Known Issue to Aspire README for Qdrant * Update survey template URL * Set the Project Template package version to -preview.2 * Update template baseline * Update template pinned versions * Do not append template args to snapshot names * Fix vector store index in the README. Add an AzureAISearch template test. * Add a note to the Aspire README for trusting the development certificate * Use AddOpenAIClient for OpenAI and AddAzureOpenAIClient for Azure OpenAI * Remove duplicated using System.ClientModel * Update Aspire README to specify the exception thrown for the known issue * Augment the Aspire README for more Docker notes for Ollama and Qdrant * Fix Microsoft.Extensions.Http.Resilience warnings with separate pinned versions * Update test baseline for: Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods (#6295) * Add --managed-identity to the template developer README * Apply the Ollama timeout recommendation in the template code * Call http.RemoveAllResilienceHandlers before adding the handler * Update template test baseline --------- Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com> Co-authored-by: David Cantu <dacantu@microsoft.com> * Expose AIContent constructor (#6346) * Add PDF support to OpenAI AsIChatClient (#6344) * Add PDF support to OpenAI AsIChatClient * Add missing reference * Make CreateJsonSchema tolerate JSO inputs that don't have a resolver set. (#6348) * Update MEAI.Templates to use the just-built version of the libraries * Enhance Function Invocation Extensibility for Microsoft.Extensions.AI (#6325) --------- Co-authored-by: Peter Waldschmidt <Peter.Waldschmidt@microsoft.com> Co-authored-by: Peter Waldschmidt <pewaldsc@microsoft.com> Co-authored-by: Shyam Namboodiripad <Shyam.Namboodiripad@microsoft.com> Co-authored-by: David Cantú <dacantu@microsoft.com> Co-authored-by: Art Leonard <artl93@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Shay Rojansky <roji@roji.org> Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com> Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
To align with the the base method on IEmbeddingGenerator
Microsoft Reviewers: Open in CodeFlow