vercel / modelfusion

The TypeScript library for building AI applications.
https://modelfusion.dev
MIT License
1.1k stars 78 forks source link

Code execution tool #137

Open sahanxdissanayake opened 10 months ago

sahanxdissanayake commented 10 months ago

Hi there,

Is it possible to build something similar to PythonREPLTool() (Langchain) to JS/Nodejs ecosystem?

lgrammel commented 10 months ago

great idea!

bigrig2212 commented 10 months ago

+1

mattapperson commented 9 months ago

Perhaps one using @e2b-dev ?

lgrammel commented 9 months ago

Reopening for tracking. @sahanxdissanayake please unsubscribe if you don't want to follow.

@mattapperson yes - e2b is one of the options. Ideally there would be multiple tools that could be extensions. In core, I'd only implement a JS execution tool - and even for that I'm not sure if it should be in core bc of security, reliability, prompts, etc.

mattapperson commented 9 months ago

I agree with that thinking. Even just for package bloat. it would be nice imho to have a convention for tool naming / tags in npm as people make and share their own tools rather then perpetuating the practice of all tools needing to be in the same repo as perpetuated by some other popular llm libraries

lgrammel commented 9 months ago

@mattapperson 💯

Tools are pretty easy (TM) to implement, at east from the ModelFusion interface side, see e.g. https://github.com/lgrammel/modelfusion/tree/main/extensions/google-custom-search-tool

A naming convention would be nice. Maybe I need to write up more on how to create and publish a custom tool to make it easier.