fabricatio_actions.actions.fs
A module for file system utilities.
Classes
Read text from a file. |
|
Dump text to a file. |
|
Read text from a file using LLM. |
|
Dump text to a file using LLM. |
Module Contents
- class fabricatio_actions.actions.fs.ReadText(/, **data: Any)
Bases:
fabricatio_core.models.action.Action,fabricatio_actions.models.generic.FromMappingRead text from a file.
- output_key: str = 'read_text'
The key used to store this action’s output in the context dictionary.
- read_path: str | pathlib.Path | None = None
Path to the file to read.
- classmethod from_mapping(mapping: Mapping[str, str | pathlib.Path], **kwargs: Any) List[Self]
Create a list of ReadText actions from a mapping of output_key to read_path.
- class fabricatio_actions.actions.fs.DumpText(/, **data: Any)
Bases:
fabricatio_core.models.action.Action,fabricatio_actions.models.generic.FromMappingDump text to a file.
- dump_path: str | pathlib.Path | None = None
Path to the file to dump.
- classmethod from_mapping(mapping: Mapping[str, str | pathlib.Path], **kwargs: Any) List[Self]
Create a list of DumpText actions from a mapping of output_key to dump_path.
- class fabricatio_actions.actions.fs.SmartReadText(/, **data: Any)
Bases:
ReadText,fabricatio_core.capabilities.usages.UseLLMRead text from a file using LLM.
- class fabricatio_actions.actions.fs.SmartDumpText(/, **data: Any)
Bases:
DumpText,fabricatio_core.capabilities.usages.UseLLMDump text to a file using LLM.