file_tools
langroid/agent/tools/file_tools.py
ReadFileTool
¶
Bases: ToolMessage
create(get_curr_dir)
classmethod
¶
Create a subclass of ReadFileTool for a specific directory
Parameters:
Name | Type | Description | Default |
---|---|---|---|
get_curr_dir |
callable
|
A function that returns the current directory. |
required |
Returns:
Type | Description |
---|---|
Type[ReadFileTool]
|
Type[ReadFileTool]: A subclass of the ReadFileTool class, specifically for the current directory. |
Source code in langroid/agent/tools/file_tools.py
WriteFileTool
¶
Bases: XMLToolMessage
create(get_curr_dir, get_git_repo)
classmethod
¶
Create a subclass of WriteFileTool with the current directory and git repo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
get_curr_dir |
callable
|
A function that returns the current directory. |
required |
get_git_repo |
callable
|
A function that returns the git repo. |
required |
Returns:
Type | Description |
---|---|
Type[WriteFileTool]
|
Type[WriteFileTool]: A subclass of the WriteFileTool class, specifically for the current directory and git repo. |
Source code in langroid/agent/tools/file_tools.py
ListDirTool
¶
Bases: ToolMessage
create(get_curr_dir)
classmethod
¶
Create a subclass of ListDirTool for a specific directory
Parameters:
Name | Type | Description | Default |
---|---|---|---|
get_curr_dir |
callable
|
A function that returns the current directory. |
required |
Returns:
Type | Description |
---|---|
Type[ReadFileTool]
|
Type[ReadFileTool]: A subclass of the ReadFileTool class, specifically for the current directory. |