-
Notifications
You must be signed in to change notification settings - Fork 827
Add FunctionInvokingChatClient.AdditionalTools #6661
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
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 support for additional tools to the FunctionInvokingChatClient
through a new AdditionalTools
property. This allows the client to invoke tools that weren't provided in the ChatOptions.Tools
collection but are available through pre-configured additional tools.
- Introduces the
AdditionalTools
property toFunctionInvokingChatClient
- Updates function lookup logic to search both
ChatOptions.Tools
andAdditionalTools
- Adds comprehensive tests to verify the new functionality and tool precedence
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
FunctionInvokingChatClient.cs |
Adds the AdditionalTools property and updates tool lookup logic to search both tool collections |
FunctionInvokingChatClientTests.cs |
Adds tests for the new AdditionalTools functionality and tool precedence behavior |
Microsoft.Extensions.AI.json |
Adds the new AdditionalTools property to the API surface |
Microsoft.Extensions.AI.Tests.csproj |
Suppresses an additional analyzer warning (S104) |
src/Libraries/Microsoft.Extensions.AI/ChatCompletion/FunctionInvokingChatClient.cs
Outdated
Show resolved
Hide resolved
…nvokingChatClient.cs Co-authored-by: Copilot <[email protected]>
Microsoft Reviewers: Open in CodeFlow