Repository navigation
Conversation
|
@WhyTan00 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
|
|
Hi @WhyTan00, 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 |
| args = get_args(_type) | ||
|
|
||
| if origin is Annotated: | ||
| return Annotated[_resolve_type(args[0]), *args[1:]] |
There was a problem hiding this comment.
#13516 was merged and adds a converting keyword to _resolve_type. Could you rebase on main and pass it through here? Without it, dataclasses that refer to each other only through Annotated fields recurse until RecursionError.
| return Annotated[_resolve_type(args[0]), *args[1:]] | |
| return Annotated[_resolve_type(args[0], converting=converting), *args[1:]] |
|
Hi @WhyTan00, this PR is still waiting for the Contributor License Agreement (CLA) to be signed. Please note that if the CLA isn't signed within the next 4 days, this PR will be automatically closed as stale. Signing only takes a minute via the link in the |
|
Hi @WhyTan00, this PR is still waiting for the Contributor License Agreement (CLA) to be signed. Please note that if the CLA isn't signed within the next 24 hours, this PR will be automatically closed. Signing only takes a minute via the link in the |
|
Hi @WhyTan00, we're closing this PR because the Contributor License Agreement (CLA) wasn't signed within 48 hours. Thanks a lot for your interest in contributing to Haystack! If you'd still like to see this change merged, please sign the CLA and reopen this PR — it will then automatically be marked ready for review. |
Related Issues
Independently reproduced on main at c6c46c6. No matching issue, PR, or commit was found in the targeted searches before implementation.
Proposed Changes
A component accepting
Annotated[list[ChatMessage], ...]currently advertises private_roleand_contentfields instead of the public serialized message shape. Invoking its ComponentTool with messages produced byChatMessage.to_dict()raises ToolInvocationError because the Annotated wrapper prevents the existing dataclass conversion from running.Resolve the type inside Annotated while retaining its metadata for schema generation. For plain and optional annotated dataclass/list inputs, insert automatic conversion beneath the original annotation validators, preserving their ordering and constraints. BeforeValidator and WrapValidator still receive the original input. The placement of Optional still determines whether those validators observe None. Primitive annotations and broader Annotated unions retain their previous validation paths; this patch does not add automatic conversion to broader unions.
How did you test it?
Tests ran through Hatch on Python 3.12.14 with a temporary local Hatch configuration containing focused test dependencies. That configuration is excluded from the change. The full repository and live integration suites were not run.
Notes for the reviewer
This PR was fully generated with an AI assistant. The assistant ran the listed regression and quality checks. Contributor review and any required CLA completion remain with the submitter; no human-review claim or agreement acceptance is implied.
Checklist
fix:title.