Skip to content

Conversation

@TomeHirata
Copy link
Collaborator

  • Added support for using async tools within a running event loop by integrating nest-asyncio.
  • Updated pyproject.toml to include nest-asyncio as a test dependency.
  • Enhanced error handling to prompt installation of nest-asyncio if not found.
  • Added tests to verify async tool calls from a running event loop.

Copy link
Collaborator

@chenmoneygithub chenmoneygithub left a comment

Choose a reason for hiding this comment

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

I need to do some testing on this, as I remember the nest-asyncio was causing unexpected errors on async calling.

Btw, the uv.lock update seems wrong to me, it shouldn't change every line.

…loops

- Added nest-asyncio as a dependency to allow calling async tools from within a running event loop.
- Updated the Tool class to apply nest-asyncio when the event loop is already running.
- Enhanced syncify utility to raise an ImportError if nest-asyncio is not installed when needed.
- Added a new test case to verify async tool calls from a running event loop.

This change improves compatibility with environments like Jupyter notebooks where event loops are already active.

Signed-off-by: TomuHirata <tomu.hirata@gmail.com>
@TomeHirata
Copy link
Collaborator Author

@chenmoneygithub Yes please! Also updated uv.lock.

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.

2 participants