Skip to content

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

Closed

Conversation

stevepon
Copy link
Contributor

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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@Copilot Copilot AI review requested due to automatic review settings April 23, 2025 22:46
@stevepon stevepon requested a review from a team as a code owner April 23, 2025 22:46
@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Evaluation Issues related to the client library for Azure AI Evaluation labels Apr 23, 2025
Copy link

Thank you for your contribution @stevepon! We will review the pull request and get back to you soon.

Copy link
Contributor

@Copilot Copilot AI left a 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":
Copy link
Preview

Copilot AI Apr 23, 2025

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 uses AI. Check for mistakes.

Comment on lines +238 to +240
elif tool_call.details.type == "azure_ai_search":
output = tool_call.details.azure_ai_search["output"]
elif tool_call.details.type == "fabric_dataagent":
Copy link
Preview

Copilot AI Apr 23, 2025

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.

Suggested change
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 uses AI. Check for mistakes.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

elif tool_call.details["type"] == "azure_ai_search":
arguments = {"input": tool_call.details["azure_ai_search"]["input"]}
elif tool_call.details["type"] == "fabric_dataagent":
arguments = {"input": tool_call.details["fabric_dataagent"]["input"]}
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use the new constants here?

Copy link

github-actions bot commented Jul 4, 2025

Hi @stevepon. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Jul 4, 2025
Copy link

Hi @stevepon. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions bot closed this Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Evaluation Issues related to the client library for Azure AI Evaluation no-recent-activity There has been no recent activity on this issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants