Repository navigation
Conversation
|
@pei711 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
|
|
Hi @pei711, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Hi @pei711, just a friendly reminder: this PR is still in draft because the Contributor License Agreement (CLA) hasn't been signed yet. We'd love to review your contribution! Please sign the CLA via the link in the |
Related Issues
No existing issue found for dataclass field annotations. This complements #12739, which resolves postponed function parameter annotations. Reproduced on main at
87dba65.Proposed Changes
ComponentToolcannot generate a schema for a dataclass whose string field annotations mention a nested dataclass orAnnotated. This includes dataclasses in modules usingfrom __future__ import annotations; construction raisesSchemaGenerationErrorbefore the Agent can call the tool.Resolve dataclass field hints in the defining class's namespace with
include_extras=True, then apply the existing schema conversion. Keep recursive references asForwardRefback-edges so previously supported recursive dataclasses still work. Public tool signatures and serialization formats are unchanged.How did you test it?
Annotatedconstraint, serialization round trips, and sync/async public tool invocation.hatch run test:unit test/tools test/core/test_type_utils.py test/core/component test/components/agents -q --no-cov: 1750 passed, 18 deselected.hatch run test:types haystack/tools/parameters_schema_utils.py test/tools/test_component_tool.py: no issues found.git diff --checkpasses.Agentexecutes the component tool through bothrun()andrun_async(). Only the chat generator is scripted withMockChatGenerator; no provider API is called.Checks ran on Windows with Python 3.13 through Hatch. The broader suite reports two existing warnings about
_delegate_defaultnot being JSON serializable. Cross-version CI is pending.Checklist
This PR was fully generated with OpenAI Codex, including the implementation, tests, and description. Codex reviewed the changes and ran the checks listed above; no human review is claimed.