Closed Undertone0809 closed 7 months ago
Can you do that? @Hizeros
Now we should use function type declaration to build Tool.
ref: https://undertone0809.github.io/promptulate/#/modules/tools/custom_tool_usage?id=custom-tool
🚀 Feature Request
Add file operator like langchain file operator.
We seem need the following tools:
WriteFileTool AppendFileTool # Attach information to an existing file ReadFileTool DeleteFileTool ListDirectoryTool CopyFileTool MoveFileTool
ToolKit maybe a better solution if you want to use multiple tools at once.
ref: https://python.langchain.com/docs/integrations/tools/filesystem
Example Usage
Here is a possible way to use it.
from promptulate.tools.file import WriteFileTool, ReadFileTool from promptulate.agent import ToolAgent def main(): tools = [WriteFileTool(), ReadFileTool()] agent = ToolAgent(tools=tools) agent.run("Please help me write a poetry in poetry.txt")
Challenges
- initialize work directory.
Goal
- ToolAgent can use file operator
- Provide relevant docs
- Add a example
- Add relevant unittest
The upper proposal is banned. Now Promptulate use function declaration to define custom tool. We should build a function type tool for File Operation.
🚀 Feature Request
Add file operator like langchain file operator.
We seem need the following tools:
ToolKit maybe a better solution if you want to use multiple tools at once.
ref: https://python.langchain.com/docs/integrations/tools/filesystem
A Possible Example Usage
Here is a possible way to use it.
Challenges
Goal