-
Notifications
You must be signed in to change notification settings - Fork 3k
add more built-in tools #40697
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
base: main
Are you sure you want to change the base?
add more built-in tools #40697
Conversation
Thank you for your contribution @stevepon! We will review the pull request and get back to you soon. |
@stevepon please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
2 similar comments
@stevepon please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@stevepon please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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 pull request adds support for two new built-in tools ("azure_ai_search" and "fabric_dataagent") by updating the tool call conversion logic and the corresponding service definitions.
- Extended the break_tool_call_into_messages function to handle the new tool types for both input arguments and output conversion.
- Updated built-in tool constants, tool descriptions, and parameter definitions accordingly in _ai_services.py.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_models.py | Added branches for handling azure_ai_search and fabric_dataagent tool calls. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_ai_services.py | Registered new tool constants, descriptions, and parameter definitions for the new tools. |
@@ -191,6 +191,10 @@ def break_tool_call_into_messages(tool_call: ToolCall, run_id: str) -> List[Mess | |||
arguments = { | |||
"ranking_options": {"ranker": options["ranker"], "score_threshold": options["score_threshold"]} | |||
} | |||
elif tool_call.details["type"] == "azure_ai_search": |
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.
There is an inconsistent access pattern when retrieving the tool type value. In this branch, the code uses subscript access (tool_call.details["type"]) while later branches use attribute access (tool_call.details.type). Standardizing the access method would enhance clarity and reduce the risk of runtime issues.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
elif tool_call.details.type == "azure_ai_search": | ||
output = tool_call.details.azure_ai_search["output"] | ||
elif tool_call.details.type == "fabric_dataagent": |
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.
The use of attribute access for obtaining the tool type here contrasts with the subscript access used earlier. Consider unifying this pattern across all branches for consistency in handling tool details.
elif tool_call.details.type == "azure_ai_search": | |
output = tool_call.details.azure_ai_search["output"] | |
elif tool_call.details.type == "fabric_dataagent": | |
elif tool_call.details["type"] == "azure_ai_search": | |
output = tool_call.details.azure_ai_search["output"] | |
elif tool_call.details["type"] == "fabric_dataagent": |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
API change check API changes are not detected in this pull request. |
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines