ReadFileTool
org.llm4s.toolapi.builtin.filesystem.ReadFileTool
object ReadFileTool
Tool for reading file contents.
Features:
- Configurable size limits
- Path restrictions for security
- Optional line limit
- Encoding detection
Attributes
- Example
-
import org.llm4s.toolapi.builtin.filesystem._ val readTool = ReadFileTool.create(FileConfig( maxFileSize = 512 * 1024, allowedPaths = Some(Seq("/tmp", "/home/user/workspace")) )) val tools = new ToolRegistry(Seq(readTool)) agent.run("Read the contents of /tmp/data.txt", tools) - Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ReadFileTool.type
Members list
In this article