Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
sjrl
commented
Mar 26, 2026
Comment on lines
+424
to
+428
| # Inject the live State object for any parameter annotated as State | ||
| for param_name, param_type in ToolInvoker._get_func_params(tool).items(): | ||
| if param_type is State: | ||
| final_args[param_name] = state | ||
|
|
Contributor
Author
There was a problem hiding this comment.
@anakin87 the additional code to skip State in the function params isn't too much but I realize now with the pre-built tools we don't even need it since I directly create their parameter schemas.
sjrl
commented
Mar 26, 2026
haystack/tools/from_function.py
Outdated
Comment on lines
+145
to
+147
| # Skip State-typed parameters — ToolInvoker injects them at runtime, hidden from the LLM | ||
| if param.annotation is State: | ||
| continue |
Contributor
Author
There was a problem hiding this comment.
Same comment as here https://github.com/deepset-ai/haystack/pull/10936/changes#r2994730712
Member
|
Thank you for working on this! The POC looks nice and clean. Would it be worth getting a second opinion? Quick point: I'm not sure if we want to explicitly refer to skills here, unless we have broader support for them, like also reading from skills files, etc. WDYT? |
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.
Related Issues
Stateobject to aToolif it's in its function signature #10868Proposed Changes:
Example script
Example output
How did you test it?
Notes for the reviewer
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.