- Notifications
You must be signed in to change notification settings - Fork845
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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 theFunctionInvokingChatClient through a newAdditionalTools property. This allows the client to invoke tools that weren't provided in theChatOptions.Tools collection but are available through pre-configured additional tools.
- Introduces the
AdditionalToolsproperty toFunctionInvokingChatClient - Updates function lookup logic to search both
ChatOptions.ToolsandAdditionalTools - 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 theAdditionalTools property and updates tool lookup logic to search both tool collections |
FunctionInvokingChatClientTests.cs | Adds tests for the newAdditionalTools functionality and tool precedence behavior |
Microsoft.Extensions.AI.json | Adds the newAdditionalTools property to the API surface |
Microsoft.Extensions.AI.Tests.csproj | Suppresses an additional analyzer warning (S104) |
src/Libraries/Microsoft.Extensions.AI/ChatCompletion/FunctionInvokingChatClient.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…nvokingChatClient.csCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cb57095 intodotnet:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Microsoft Reviewers:Open in CodeFlow