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

made it possible to pass additional tools to CodeInterpreterSession #20

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

Valian
Copy link
Contributor

@Valian Valian commented Jul 18, 2023

This PR includes:

  • a small change to session, making it accept arbitrary tools
  • an example how these tools could be used

It's useful for me and I think it might be useful for others, hopefully you'll decide to include that feature.

Closes #18

Copy link
Owner

@shroominic shroominic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its recommended to use StructuredTools for the OpenAIFunctionsAgent because it needs some kind of functions schema and a StructuredTool forces this schema to be available.
Without this schema I encountered a lot of bugs and decreased performance because the current implementation to get around not having schemas is really hacky.
Maybe you can look into this part again and do some changes or convince me why your solution is right :)

@Valian
Copy link
Contributor Author

Valian commented Jul 18, 2023

StructuredTool is a Tool as well, but almost all lang-chain provided tools are not structured tools (yet). So making it a Tool allows to use these provided tools, even if it occasionally causes bugs with a function agent. We don't lose anything, but we gain ability to use some of these tools.

Another possible choice is to do not use function agent. It shines when functions have multiple parameters, but for code interpreter it's not the case.

@shroominic shroominic merged commit 841c3cb into shroominic:main Jul 18, 2023
@shroominic
Copy link
Owner

Okay nice lgtm :)

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.

Additional tools
3 participants