mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-07 20:46:31 +00:00
* fix: Raise error when async function is passed to Tool - Added validation in Tool.__post_init__ to check if function is async - Added validation in create_tool_from_function for early error detection - Updated docstring to clarify that functions must be synchronous - Added tests for both Tool init and @tool decorator with async functions Closes #9580 * fix: Remove redundant async check from create_tool_from_function Per reviewer feedback, the async validation is only needed in the Tool class itself, since create_tool_from_function creates a Tool. - Remove async check from create_tool_from_function - Update docstrings to remove async-related notes - Remove redundant tests for async functions in from_function tests - Add release note 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add docstring note and tests for async function validation - Updated Tool class docstring to indicate function must be synchronous - Added test_from_function_async_raises_error test - Added test_tool_decorator_async_raises_error test 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>