Skip to content

handle openapi tools #40238

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
wants to merge 1 commit into from
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 March 26, 2025 23:50
@stevepon stevepon requested a review from a team as a code owner March 26, 2025 23:50
@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 Mar 26, 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 PR adds support for handling OpenAPI tool calls in the evaluation SDK by introducing new conversion logic for openapi-based messages. Key changes include:

  • Defining a new constant (_OPENAPI_FUNCTION) for openapi functions.
  • Extending the break_tool_call_into_messages function to process openapi tool calls for both message creation and output conversion.
  • Adding an early return if the output is None to simplify subsequent processing.
Comments suppressed due to low confidence (2)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_models.py:183

  • For consistency, consider replacing the literal "openapi" with the _OPENAPI_FUNCTION constant defined earlier.
elif tool_call.details.type == "openapi":

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_models.py:188

  • [nitpick] Consider using a consistent access pattern (either dot notation or dictionary indexing) for the 'function' property to improve code readability.
"name": tool_call.details["function"]["name"],

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-evaluation

@annatisch annatisch removed customer-reported Issues that are reported by GitHub users external to the Azure organization. Community Contribution Community members are working on the issue labels Apr 2, 2025
Copy link

github-actions bot commented Jun 6, 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 Jun 6, 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 Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants