Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The asynchronous tool example adds raw tool arguments directly, so
{"a": "30", "b": "12"}produces3012; subtraction raisesTypeError. Convert both arguments to integers, matching the synchronous example's existing behavior from #443.Add an offline regression that executes the real example's
main()with scripted model responses and checks the complete conversation passed to the final model call. It covers string and integer inputs for both operations. Only the model client is mocked.This is a source-discovered follow-up, not a fix for an existing open issue. On unchanged main at 8785556, the new tests produce two expected failures and two passes; with the fix all four pass.
Validation on Python 3.12.14:
NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 uv run --with pytest --with pytest-httpserver pytest ollama tests -v: 124 passed, including doctests. Localhost bypass is needed for this machine's proxy setup.uvx ruff format --check: 47 files already formatted.uvx ruff check: all checks passed.uv lock --checkpasses;uv exportexactly matches committedrequirements.txt.git diff --checkpasses.The attempted
uvx hatch test tests/test_async_tools_example.py -vvcould not install its tooling because the download of theuvwheel timed out. The CI matrix commanduvx hatch test -acphas not run locally; the test and lint commands above ran successfully. No inference, model download, or API credentials were used. OpenAI Codex assisted with the patch and tests.