Skip to content
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

Generate tool call id if not present #1229

Merged
merged 8 commits into from
Mar 25, 2025
Merged

Generate tool call id if not present #1229

merged 8 commits into from
Mar 25, 2025

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Mar 24, 2025

Copy link

github-actions bot commented Mar 24, 2025

Docs Preview

commit: aabb323
Preview URL: https://c2557ea6-pydantic-ai-previews.pydantic.workers.dev

@Kludex Kludex force-pushed the add-tool-call-id branch from 211bd19 to ec41e95 Compare March 25, 2025 06:40
Copy link
Contributor

hyperlint-ai bot commented Mar 25, 2025

PR Change Summary

Implemented a mechanism to generate a tool call ID when it is not present, enhancing the tracking of tool calls across various components.

  • Updated multiple instances to assign a default tool call ID where it was previously set to None.
  • Modified test cases to utilize a string type for tool call IDs instead of None.
  • Ensured consistency in tool call ID assignment across different tool call parts.

Modified Files

  • docs/agents.md
  • docs/testing-evals.md
  • docs/tools.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

What is Hyperlint?

Hyperlint is an AI agent that helps you write, edit, and maintain your documentation.

Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation.

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

otherwise LGTM

@@ -198,9 +199,16 @@ def now_utc() -> datetime:
def guard_tool_call_id(
Copy link
Member

Choose a reason for hiding this comment

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

arguably this is no longer a type guard.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, should I just remove this? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

should be renamed or removed.

@Kludex Kludex merged commit f3be714 into main Mar 25, 2025
17 checks passed
@Kludex Kludex deleted the add-tool-call-id branch March 25, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssertionError: OpenAI requires tool_call_id
2 participants