-
Notifications
You must be signed in to change notification settings - Fork 841
Add copy constructors to option types (ChatOptions, etc.) #6882
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
To enable the Clone methods to support derivation and to enable decorators to pass down cloneable state. This also fixes a bug that EmbeddingGenerationOptions.Clone and SpeechToTextOptions.Clone were not cloning raw representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds protected copy constructors to the AI option types (ChatOptions, EmbeddingGenerationOptions, ImageGenerationOptions, SpeechToTextOptions) to enable proper hierarchy cloning for derived types. It also fixes a bug where some Clone methods weren't copying the RawRepresentationFactory property.
Key changes:
- Added protected copy constructors to all AI option types that handle null checking and shallow copying of all properties
- Replaced Clone method implementations to use the new copy constructors
- Added comprehensive test coverage for hierarchy cloning scenarios
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatOptions.cs |
Added protected copy constructor and updated Clone method to use constructor pattern |
src/Libraries/Microsoft.Extensions.AI.Abstractions/Embeddings/EmbeddingGenerationOptions.cs |
Added protected copy constructor, updated Clone method, and fixed missing RawRepresentationFactory cloning |
src/Libraries/Microsoft.Extensions.AI.Abstractions/Image/ImageGenerationOptions.cs |
Added protected copy constructor and updated Clone method to use constructor pattern |
src/Libraries/Microsoft.Extensions.AI.Abstractions/SpeechToText/SpeechToTextOptions.cs |
Added protected copy constructor, updated Clone method, and fixed missing RawRepresentationFactory cloning |
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyChatOptions.cs |
Refactored from primary constructor to regular constructor and added copy constructor support |
test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/ChatCompletion/ChatOptionsTests.cs |
Added comprehensive tests for hierarchy cloning and null copy constructor scenarios |
test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/Embeddings/EmbeddingGenerationOptionsTests.cs |
Added tests for RawRepresentationFactory cloning and hierarchy scenarios |
test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/Image/ImageGenerationOptionsTests.cs |
Added tests for hierarchy cloning scenarios |
test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/SpeechToText/SpeechToTextOptionsTests.cs |
Added tests for RawRepresentationFactory cloning and hierarchy scenarios |
...ibraries/Microsoft.Extensions.AI.Abstractions.Tests/SpeechToText/SpeechToTextOptionsTests.cs
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/Image/ImageGenerationOptionsTests.cs
Outdated
Show resolved
Hide resolved
...ies/Microsoft.Extensions.AI.Abstractions.Tests/Embeddings/EmbeddingGenerationOptionsTests.cs
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/ChatCompletion/ChatOptionsTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
…9.10.0 (#55) Updated [Microsoft.Extensions.Http.Resilience](https://github.com/dotnet/extensions) from 9.4.0 to 9.10.0. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Http.Resilience's releases](https://github.com/dotnet/extensions/releases)._ ## 9.10.0 ## What's Changed * Branding updates for 9.10 by @Copilot in dotnet/extensions#6769 * Doc improvements by @gewarren in dotnet/extensions#6794 * Bump vite from 6.3.5 to 6.3.6 in /src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript by @dependabot[bot] in dotnet/extensions#6793 * Updated changelogs for AI libs by @stephentoub in dotnet/extensions#6787 * Update MCP server template by @jeffkl in dotnet/extensions#6772 * Add support for using ConversationID for AzureOpenAI and OpenAI by @ViveliDuCh in dotnet/extensions#6770 * Merging internal commits by @joperezr in dotnet/extensions#6801 * Merge changes from release/9.9 branch by @joperezr in dotnet/extensions#6803 * Support keyed HybridCache with keyed DistributedCaches and named options by @kelly-yinn in dotnet/extensions#6694 * Inventory as code by @wtgodbe in dotnet/extensions#6820 * Increase output token limit for EquivalenceEvaluator by @shyamnamboodiripad in dotnet/extensions#6835 * Fix KeyNotFoundException on HttpRequestLatencyListener.OnEventWritten for uknown event sources by @ssmelov in dotnet/extensions#6821 * Add project name normalization to match aspire's code generator logic by @ViveliDuCh in dotnet/extensions#6818 * Disable really noisy analyzers, part 1 by @stephentoub in dotnet/extensions#6837 * Fix `KeyNotFoundException` in `HttpRequestLatencyListener.OnEventWritten` by @pentp in dotnet/extensions#6823 * Update global.json to use .NET 9.0.0 stable instead of RC 1 by @Copilot in dotnet/extensions#6846 * Add measures and tags with mediator object to the HttpClientLatencyLogEnricher by @rainsxng in dotnet/extensions#6783 * Add comprehensive .github/copilot-instructions.md for dotnet/extensions repository by @Copilot in dotnet/extensions#6792 * Update to .NET 10 SDK by @eerhardt in dotnet/extensions#6863 * Update Microsoft.Extensions.AI changelog files with current NuGet versions by @Copilot in dotnet/extensions#6849 * Fix GenerateImagesAsync_SingleImageGeneration integration test by @stephentoub in dotnet/extensions#6843 * Re-enable IDE0032 by @stephentoub in dotnet/extensions#6866 * Add OpenTelemetrySpeechToTextClient and friends by @stephentoub in dotnet/extensions#6845 * Update `ModelContextProtocol` version in MCP template by @MackinnonBuck in dotnet/extensions#6870 * Scope Ollama resilience settings to Web/Program.cs and restore ServiceDefaults by @ViveliDuCh in dotnet/extensions#6850 * Update Aspire by @Varorbc in dotnet/extensions#6858 * Update MCP template for new registry specification by @Copilot in dotnet/extensions#6796 * Add support for `HostApplicationBuilder` in AmbientMetadata extension by @eduherminio in dotnet/extensions#6867 * Fix mcpserver test baselines by @jeffhandley in dotnet/extensions#6874 * Move Microsoft.Extensions.ServiceDiscovery to dotnet/extensions by @eerhardt in dotnet/extensions#6868 * Add copy constructors to option types (ChatOptions, etc.) by @stephentoub in dotnet/extensions#6882 * Fix ChatMessage.CreatedAt being always overwritten by the latest timestamp. by @Copilot in dotnet/extensions#6885 * Small doc fixes by @gewarren in dotnet/extensions#6887 * Update AI changelogs with some recent additions by @stephentoub in dotnet/extensions#6886 * Fix Assistants IChatClient handling of unrelated tool calls in history by @stephentoub in dotnet/extensions#6891 * Fix duplication between OpenAI Assistants pre-configured tools by @stephentoub in dotnet/extensions#6896 * Update MCP Server Template to adhere to 2025-09-29 server.json schema by @joelverhagen in dotnet/extensions#6888 * Remove Azure.AI.OpenAI dependency from templates and tests by @Copilot in dotnet/extensions#6873 * Remove UnsafeRelaxedJsonEscaping by @peterwald in dotnet/extensions#6899 * Fix bug to yield remaining buffered FCC by @westey-m in dotnet/extensions#6903 * Fix serialization of [Experimental] AIContent-derived types by @stephentoub in dotnet/extensions#6900 ## New Contributors * @westey-m made their first contribution in dotnet/extensions#6745 * @jeffkl made their first contribution in dotnet/extensions#6772 * @ViveliDuCh made their first contribution in dotnet/extensions#6770 * @kelly-yinn made their first contribution in dotnet/extensions#6694 * @ssmelov made their first contribution in dotnet/extensions#6821 * @Varorbc made their first contribution in dotnet/extensions#6858 ... (truncated) ## 9.9.0 ## Highlights ### AI - Abstractions for **remote MCP servers**; response/approval flow support via new experimental types - **Function approvals** via new experimental types (e.g., `ApprovalRequiredAIFunction`, user input/approval request & response content). - **Reasoning text streaming** for OpenAI Responses ChatClient streaming. - **`AIFunction` split** into a base class to improve extensibility. - **`IChatReducer` moved** to `Microsoft.Extensions.AI.Abstractions`. - Updated to **OpenAI 2.4.0** and **genai standard convention 1.37**. - Coalescing logic now treats **`ChatMessage.Role` changes** as new messages. - **`GetResponseAsync<T>`** now reads only the **last** message (bug fix). - OpenTelemetry ChatClient/EmbeddingGenerator logs **raw additional properties** (no key mangling). - Fixed **empty annotated text chunk** handling in streaming with OpenAI Assistants. ### Telemetry & Diagnostics - HTTP diagnostics log **query string params** with proper redaction (emitted on `url.query`). - `server.address` telemetry emits **host only** (per OpenTelemetry semantic conventions). - Heuristics added to detect **well-known model hosts**. - Resource monitoring can consider **`Environment.CpuUsage`**. ## New Contributors * @ykumashev made their first contribution in dotnet/extensions#6696 **Full Changelog**: dotnet/extensions@v9.8.0...v9.9.0 ## 9.8.0 ## What's Changed * Align EventId generation with M.E.Logging source-gen by @xakep139 in dotnet/extensions#6566 * Add resiliency mechanism to CPU and memory utilization checks by @amadeuszl in dotnet/extensions#6528 * Suppress flaky test until fixed by @joelverhagen in dotnet/extensions#6568 * Create a project template for an MCP server by @joelverhagen in dotnet/extensions#6547 * Use dnx instead of dotnet tool exec in MCP server template README by @joelverhagen in dotnet/extensions#6571 * Add reporting tests that show NLP results. by @peterwald in dotnet/extensions#6574 * Branding updates for 9.8.0 by @joperezr in dotnet/extensions#6573 * Fix `ConfigureEvaluationTests.ps1` script when `$ConfigRoot` is not supplied by @peterwald in dotnet/extensions#6575 * Refactor Resource Monitoring by @evgenyfedorov2 in dotnet/extensions#6554 * Update McpServer template for 0.3.0-preview.2 by @stephentoub in dotnet/extensions#6578 * Add container.cpu.time metric by @evgenyfedorov2 in dotnet/extensions#5806 * Add netstandard2.0 compatibility to Microsoft.Extensions.Diagnostics.Testing and dependencies by @bdovaz in dotnet/extensions#6219 * Add netstandard2.0 compatibility to Microsoft.Extensions.Telemetry and dependencies by @bdovaz in dotnet/extensions#6218 * Simplify Http.Diagnostics by @pentp in dotnet/extensions#6174 * Add netstandard2.0 compatibility to Microsoft.Extensions.Http.Resilience and dependencies by @bdovaz in dotnet/extensions#6582 * Ingore null loggers returned by LogProviders in ELoggerFactory by @petrroll in dotnet/extensions#6585 * Merging changes from internal by @joperezr in dotnet/extensions#6588 * [Logging] Fixes LogProperties and LogPropertyIgnore attributes to work if an object being logged resides in a different assembly than the logging method by @iliar-turdushev in dotnet/extensions#6600 * Add memory usage metric by @evgenyfedorov2 in dotnet/extensions#6586 * Add schema version to server.json in MCP template by @joelverhagen in dotnet/extensions#6606 * Merge release/9.7 into main by @joperezr in dotnet/extensions#6589 * Update MCP server template readme to show both VS Code and Visual Studio notes by @Copilot in dotnet/extensions#6591 * Update Azure Open AI package referenced by eval integration tests by @shyamnamboodiripad in dotnet/extensions#6609 * Target .NET 8 for more stable runtime requirement by @joelverhagen in dotnet/extensions#6617 * Add support for new Azure AI Foundry project type for Safety evals by @shyamnamboodiripad in dotnet/extensions#6621 * M.E.AI.AzureAIInference - Azure.AI.Inference Package Bump by @rogerbarreto in dotnet/extensions#6624 * Add DataContent.Name property by @stephentoub in dotnet/extensions#6616 * Fix handling of multiple responses messages by @stephentoub in dotnet/extensions#6627 * Expose additional chat model conversion helpers by @stephentoub in dotnet/extensions#6629 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/extensions#6633 * [Http.Resilience] The DisableFor method should try to retrieve the request object from the resilience context by @iliar-turdushev in dotnet/extensions#6618 * Bump Package validation baseline version to 9.7.0 by @Copilot in dotnet/extensions#6650 * Fix internal package version detection for project templates by @MackinnonBuck in dotnet/extensions#6651 * Remove `Microsoft.Extensions.AI.Ollama` by @MackinnonBuck in dotnet/extensions#6655 * Fix M.E.AI package refs by @stephentoub in dotnet/extensions#6654 * Add [Description] to DataContent.Uri by @stephentoub in dotnet/extensions#6615 * Fix duplicate solution file when creating an AI Chat Web app from VS by @MackinnonBuck in dotnet/extensions#6653 * Add ChatMessage.CreatedAt by @stephentoub in dotnet/extensions#6657 * Add TextContent.Annotations by @stephentoub in dotnet/extensions#6619 * Add FunctionInvokingChatClient.AdditionalTools by @stephentoub in dotnet/extensions#6661 * Fix unintentional test env var change by @stephentoub in dotnet/extensions#6660 * Add more openai conversion helpers by @stephentoub in dotnet/extensions#6662 * Add OriginalRepoCommitHash to assemblies by @BrennanConroy in dotnet/extensions#6667 * Include a trivial items keyword if missing. by @eiriktsarpalis in dotnet/extensions#6669 * Add resolution of function parameter level data annotation attributes. by @eiriktsarpalis in dotnet/extensions#6671 * Fix issue with NetSourceIndexStage1 for dependency conflict versions by @joperezr in dotnet/extensions#6672 * Expose streaming conversion utility methods by @stephentoub in dotnet/extensions#6636 * Couple of fixes for MEAI.Evaluation by @shyamnamboodiripad in dotnet/extensions#6673 * Fix one more version conflict on the docs transport package by @joperezr in dotnet/extensions#6675 ... (truncated) ## 9.7.2 ## Packages Released * [Microsoft.Extensions.AI.Templates 9.7.2-preview.3.25366.2](https://www.nuget.org/packages/Microsoft.Extensions.AI.Templates/9.7.2-preview.3.25366.2) ## What's Changed * Target .NET 8 for more stable runtime requirement by @joelverhagen in #6617 **Full Changelog**: dotnet/extensions@v9.7.1...v9.7.2 ## 9.7.1 ## Packages Released * [Microsoft.Extensions.AI 9.7.1](https://www.nuget.org/packages/Microsoft.Extensions.AI/9.7.1) * [Microsoft.Extensions.AI.Abstractions 9.7.1](https://www.nuget.org/packages/Microsoft.Extensions.AI.Abstractions/9.7.1) * [Microsoft.Extensions.AI.OpenAI 9.7.1-preview.1.25365.4](https://www.nuget.org/packages/Microsoft.Extensions.AI.OpenAI/9.7.1-preview.1.25365.4) * [Microsoft.Extensions.AI.AzureAIInference 9.7.1-preview.1.25365.4](https://www.nuget.org/packages/Microsoft.Extensions.AI.AzureAIInference/9.7.1-preview.1.25365.4) * [Microsoft.Extensions.AI.Templates 9.7.1-preview.3.25365.4](https://www.nuget.org/packages/Microsoft.Extensions.AI.Templates/9.7.1-preview.3.25365.4) ## What's Changed * Merging changes from internal by @joperezr in #6588 * Bump FunctionInvokingChatClient.MaximumIterationsPerRequest from 10 to 40 by @stephentoub in #6599 * Expose M.E.AI.OpenAI input message conversions by @stephentoub in #6601 * Add schema version to server.json in MCP template by @joelverhagen in #6606 * Update MCP server template readme to show both VS Code and Visual Studio notes by @jeffhandley in #6591 * Fix schema generation for Nullable<T> function parameters. by @eiriktsarpalis in #6596 * Branding updates for 9.7.1 by @joperezr in dotnet/extensions#6611 * Add DelegatingAIFunction by @stephentoub in dotnet/extensions#6565 * Add FunctionInvokingChatClient.FunctionInvoker delegate by @stephentoub in dotnet/extensions#6564 * Enable specifying "strict" for OpenAI clients via ChatOptions by @stephentoub in dotnet/extensions#6552 * AIFunctionFactory: tolerate JSON string function parameters. by @eiriktsarpalis in dotnet/extensions#6572 * AIFunctionFactory: add test coverage for JSON comments. by @eiriktsarpalis in dotnet/extensions#6576 * Update M.E.AI.OpenAI for latest OpenAI release by @stephentoub in dotnet/extensions#6577 * Update OpenTelemetry semantic conventions version from 1.35 to 1.36 by @Copilot in dotnet/extensions#6579 * AIFunctionFactory: add a flag for disabling return schema generation. by @eiriktsarpalis in dotnet/extensions#6551 * Bump FunctionInvokingChatClient.MaximumIterationsPerRequest from 10 to 40 by @stephentoub in dotnet/extensions#6599 * Expose M.E.AI.OpenAI input message conversions by @stephentoub in dotnet/extensions#6601 * Fix schema generation for Nullable<T> function parameters. by @eiriktsarpalis in dotnet/extensions#6596 **Full Changelog**: dotnet/extensions@v9.7.0...v9.7.1 ## 9.7.0 ## What's Changed * Branding updates for 9.7 by @joperezr in dotnet/extensions#6495 * Fix name of genai input/output tokens tag by @stephentoub in dotnet/extensions#6494 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/extensions#6503 * Improve handling of RawRepresentation in OpenAI{Response}ChatClient by @stephentoub in dotnet/extensions#6500 * Bring back AsIChatClient for OpenAI AssistantClient by @stephentoub in dotnet/extensions#6501 * Add resiliency to Resource Monitoring in Linux by @amadeuszl in dotnet/extensions#6489 * Merging changes from the internal fork by @joperezr in dotnet/extensions#6508 * Workaround OpenAI assistant's RunCreationOption's tools override by @stephentoub in dotnet/extensions#6512 * Add ChatOptions.Instructions by @stephentoub in dotnet/extensions#6505 * Introduce evaluators for agentic workflows by @shyamnamboodiripad in dotnet/extensions#6514 * Allow a CachingChatClient to control per-request caching by @stephentoub in dotnet/extensions#6524 * Tweak OpenAI JSON schema transforms by @stephentoub in dotnet/extensions#6523 * Merging changes from release/9.6 branch by @joperezr in dotnet/extensions#6516 * Augment AIJsonUtilities.CreateJsonSchema for more types and annotations by @stephentoub in dotnet/extensions#6540 * Added conversions from AIFunction to various OpenAI tools by @KrzysztofCwalina in dotnet/extensions#6539 * Add SpeechToTextResponse.Usage by @stephentoub in dotnet/extensions#6546 * Implement BLEU score evaluation for NLP tests by @peterwald in dotnet/extensions#6537 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/extensions#6553 * #5962 Change to early return of OS instead of throwing by @juliankock in dotnet/extensions#5963 * Mark log sampling & buffering API as stable by @evgenyfedorov2 in dotnet/extensions#6534 * Update GenAI otel impl for v1.35 by @stephentoub in dotnet/extensions#6557 * Implement GLEU and F1 NLP evaluators by @peterwald in dotnet/extensions#6555 * Update tokenizer algorithm to use is [..] by @peterwald in dotnet/extensions#6561 * Rename some constants to match convention by @shyamnamboodiripad in dotnet/extensions#6562 * Add DistributedCachingChatClient/EmbeddingGenerator.AdditionalCacheKeyValues by @stephentoub in dotnet/extensions#6558 ## New Contributors * @KrzysztofCwalina made their first contribution in dotnet/extensions#6539 * @juliankock made their first contribution in dotnet/extensions#5963 **Full Changelog**: dotnet/extensions@v9.6.0...v9.7.0 ## 9.6.0 ## What's Changed * Branding updates for 9.6.0 by @joperezr in dotnet/extensions#6399 * Add log buffering info to README.md by @evgenyfedorov2 in dotnet/extensions#6403 * Fix dynamic config update for log buffering by @evgenyfedorov2 in dotnet/extensions#6435 * Remove unused select param from CreateRecordsForDocumentAsync by @jongalloway in dotnet/extensions#6341 * Merge internal changes by @joperezr in dotnet/extensions#6437 * Reduce per-lookup overhead from key validation in HybridCache by @MihaZupan in dotnet/extensions#6441 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro in dotnet/extensions#6443 * Merge release/9.5 into main by @joperezr in dotnet/extensions#6448 * Fix up comments in eval API json files by @shyamnamboodiripad in dotnet/extensions#6452 * Remove preview tag on Azure DevOps extension by @peterwald in dotnet/extensions#6456 * Bump PackageValidation against 9.5.0 and enable for stable MEAI packages by @joperezr in dotnet/extensions#6458 * Fix paramref tag by @gewarren in dotnet/extensions#6459 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro in dotnet/extensions#6462 * Add a script to diff the contents of folders that match a specific pattern across two branches by @shyamnamboodiripad in dotnet/extensions#6453 * Remove `title` and `description` keywords from root-level schemas in AIFunctionFactory. by @eiriktsarpalis in dotnet/extensions#6465 * Replace JSON vector store with SQLite by @MackinnonBuck in dotnet/extensions#6438 * Update chat template `Microsoft.SemanticKernel` dependency to 1.53.0 by @MackinnonBuck in dotnet/extensions#6470 * Update chat template external dependencies by @MackinnonBuck in dotnet/extensions#6471 * Exclude provider URI from cache key computation by default by @shyamnamboodiripad in dotnet/extensions#6473 * Make hashing stable w.r.t. indentation settings and property ordering. by @eiriktsarpalis in dotnet/extensions#6476 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro in dotnet/extensions#6481 * Add default value for namedArg in Microsoft.Gen.Metrics.parser by @BowenYang666 in dotnet/extensions#6238 * Update OpenTelemetryChatClient to 1.34 by @stephentoub in dotnet/extensions#6466 * Delete M.E.AI changelog files by @stephentoub in dotnet/extensions#6467 * Add comma to remarks by @gewarren in dotnet/extensions#6485 * Implement disk io metrics for linux by @makazeu in dotnet/extensions#6374 * Add `AIFunction.ReturnJsonSchema` by @eiriktsarpalis in dotnet/extensions#6447 ## New Contributors * @MihaZupan made their first contribution in dotnet/extensions#6441 * @BowenYang666 made their first contribution in dotnet/extensions#6238 **Full Changelog**: dotnet/extensions@v9.5.0...v9.6.0 ## 9.5.0 ## What's Changed * Add TextReasoningContent by @stephentoub in dotnet/extensions#6222 * Use ErrorContent in OpenAIResponseChatClient by @stephentoub in dotnet/extensions#6231 * OpenAI: Parse detail additional property by @jozkee in dotnet/extensions#6225 * Branding updates for 9.5 by @joperezr in dotnet/extensions#6233 * In telemetry, treat AdditionalProperties as sensitive by @SteveSandersonMS in dotnet/extensions#6239 * Use SHA384 and make key more explicit by @SteveSandersonMS in dotnet/extensions#6237 * Disable STJ default reflection and fix a number of failing tests. by @eiriktsarpalis in dotnet/extensions#6241 * Add button to report to download dataset as JSON by @peterwald in dotnet/extensions#6243 * Introduce Content Safety evaluators by @shyamnamboodiripad in dotnet/extensions#6223 * Bump vite from 6.2.4 to 6.2.5 in /src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript by @dependabot in dotnet/extensions#6249 * Only display tags from the latest execution by @shyamnamboodiripad in dotnet/extensions#6251 * Avoid duplicate data in downloaded report file by @shyamnamboodiripad in dotnet/extensions#6252 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro in dotnet/extensions#6253 * Remove use of ConfigureAwait from Microsoft.Extensions.AI.dll for AIFunction invocations by @stephentoub in dotnet/extensions#6250 * Update dev-server data import to reflect runtime import quirks by @peterwald in dotnet/extensions#6257 * [release/9.2] Merging internal changes by @joperezr in dotnet/extensions#6263 * Merging release/9.4 changes by @joperezr in dotnet/extensions#6264 * Add logging buffering by @evgenyfedorov2 in dotnet/extensions#5635 * [main] Update dependencies from dotnet/arcade by @dotnet-maestro in dotnet/extensions#6270 * Add test for optional parameters being required with RequireAllProperties by @jozkee in dotnet/extensions#6265 * Add fuzzy filtering to the evaluation reports by @peterwald in dotnet/extensions#6262 * Updating package validation version to 9.4.0 by @joperezr in dotnet/extensions#6272 * Adding reference to an unsupported built-in tool on OpenAI Chat API no longer throws by @artl93 in dotnet/extensions#6276 * Update M.E.AI changelogs by @stephentoub in dotnet/extensions#6269 * Add missing reference to M.E.AI.OpenAI in chat template by @MackinnonBuck in dotnet/extensions#6275 * Fix two paramref tags by @gewarren in dotnet/extensions#6281 * Support response caching for safety evaluators by @shyamnamboodiripad in dotnet/extensions#6277 * Bump vite from 6.2.5 to 6.2.6 in /src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript by @dependabot in dotnet/extensions#6287 * Display images in conversation for report by @shyamnamboodiripad in dotnet/extensions#6286 * Augment UseDistributedCache XML docs by @stephentoub in dotnet/extensions#6256 * Update README.md with keyless auth guidance by @jmatthiesen in dotnet/extensions#6261 * Augment AIFunctionFactory.Create XML docs by @stephentoub in dotnet/extensions#6255 * Rename EmbeddingGeneratorExtensions.GenerateEmbedding extension methods by @roji in dotnet/extensions#6295 * Augment FunctionInvokingChatClient's span with token counts by @stephentoub in dotnet/extensions#6296 * Rename ChatThreadId to ConversationId by @SteveSandersonMS in dotnet/extensions#6300 * Repackage azure-devops-extensions-api to fix Azure DevOps report plugin by @peterwald in dotnet/extensions#6299 * Fix build error by @shyamnamboodiripad in dotnet/extensions#6301 * Add note on extending timeout for Ollama client by @jongalloway in dotnet/extensions#6258 * Improve CPU metrics calculations for CgroupV2 by @nivebb8 in dotnet/extensions#6289 * Restore deleted members as obsolete by @jeffhandley in dotnet/extensions#6304 * move to AwesomeAssertions by @danmoseley in dotnet/extensions#6308 * Update chat template dependencies, fix OpenAI/Aspire config, and address build warnings by @MackinnonBuck in dotnet/extensions#6280 * Support [FromKeyedServices] in AIFunctionFactory by @stephentoub in dotnet/extensions#6310 * Introduce Context property on EvaluationMetric by @shyamnamboodiripad in dotnet/extensions#6316 * Utilize IServiceProviderIsService in AIFunctionFactory by @stephentoub in dotnet/extensions#6317 * Fix Process Metric calculation in CgroupsV2 by @nivebb8 in dotnet/extensions#6321 * Remove the abstraction for token counting from the main evaluation API by @shyamnamboodiripad in dotnet/extensions#6320 * Remove AsChatClient/AsEmbeddingGenerator APIs by @jeffhandley in dotnet/extensions#6327 * Add ChatOptions.AllowMultipleToolCalls by @SteveSandersonMS in dotnet/extensions#6326 ... (truncated) Commits viewable in [compare view](dotnet/extensions@v9.4.0...v9.10.0). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rene Bentes Pinto <[email protected]>
To enable the Clone methods to support derivation and to enable decorators to pass down cloneable state.
This also fixes a bug that EmbeddingGenerationOptions.Clone and SpeechToTextOptions.Clone were not cloning raw representation.
Microsoft Reviewers: Open in CodeFlow