Skip to content

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Jul 2, 2025

We've had a bunch of requests to be able to customize how function invocation is handled, and while it's already possible today by deriving from FunctionInvokingChatClient and overriding its InvokeFunctionAsync, there's a lot of ceremony involved in that. By having a property on the client instance, that behavior can instead be configured as part of a UseFunctionInvocation call.

Microsoft Reviewers: Open in CodeFlow

We've had a bunch of requests to be able to customize how function invocation is handled, and while it's already possible today by deriving from FunctionInvokingChatClient and overriding its InvokeFunctionAsync, there's a lot of ceremony involved in that. By having a property on the client instance, that behavior can instead be configured as part of a UseFunctionInvocation call.
@stephentoub stephentoub requested a review from a team as a code owner July 2, 2025 03:21
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Jul 2, 2025
@stephentoub stephentoub merged commit 9344962 into dotnet:main Jul 2, 2025
7 checks passed
@stephentoub stephentoub deleted the functioninvokerdelegate branch July 2, 2025 17:27
joperezr pushed a commit that referenced this pull request Jul 8, 2025
We've had a bunch of requests to be able to customize how function invocation is handled, and while it's already possible today by deriving from FunctionInvokingChatClient and overriding its InvokeFunctionAsync, there's a lot of ceremony involved in that. By having a property on the client instance, that behavior can instead be configured as part of a UseFunctionInvocation call.
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 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.

2 participants