Skip to content

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Nov 6, 2024

  • Renames UseChatOptions / UseEmbeddingGenerationOptions to be ConfigureOptions
  • Changes the delegate to just be Action<XxOptions> rather than Func<XxOptions?, XxOptions?>
  • The delegate is now always invoked with a clone of the original options (or a new instance if none was provided) so that the callback can simply mutate / configure the options instance.
Microsoft Reviewers: Open in CodeFlow

The callbacks now configure the supplied instance.
@stephentoub stephentoub changed the title Update README to include a section on UseChatOptions Rework UseChatOptions as ConfigureOptions Nov 7, 2024
@stephentoub
Copy link
Member Author

@glennc, FYI

Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stephentoub stephentoub merged commit 8b320e2 into dotnet:main Nov 7, 2024
6 checks passed
@stephentoub stephentoub deleted the readmechatoptions branch November 7, 2024 19:08
stephentoub added a commit to stephentoub/extensions that referenced this pull request Nov 19, 2024
* Update README to include a section on UseChatOptions

* Rework UseChat/EmbeddingGenerationOptions to always clone

The callbacks now configure the supplied instance.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2024
@jeffhandley jeffhandley added the area-ai Microsoft.Extensions.AI libraries label Mar 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-ai Microsoft.Extensions.AI libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants