Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReAct function default args #2021

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

stantonius
Copy link

@stantonius stantonius commented Jan 7, 2025

Adds the ability to provide default args for function calling (TOPIC 2). Has worked well for my tests thus far.

Additionally, I added private_defaults that I found useful as a concept to avoid including the function args in the trajectory (in case they included sensitive info like credentials) while still passing them to the function execution.

Addresses TOPIC 02 in react.py about handling default arguments in the Tool class
Not super elegent, but seems effective in my testing
@stantonius stantonius changed the title React function default args ReAct function default args Jan 7, 2025
@okhat
Copy link
Collaborator

okhat commented Jan 9, 2025

This is super awesome! @stantonius Thanks a lot! Is this meant to be a draft for now?

I wonder if a slightly "cleaner" approach is possible, where we rely more on inspect or similar to do the work?

@stantonius
Copy link
Author

Sorry I left as a draft meaning to come right back to it (wasn't sure about the error handling of the private_defaults).

I can take a look at inspect as an alternative option

@stantonius stantonius marked this pull request as ready for review January 9, 2025 22:28
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