Skip to main content

A Python library providing foundational actions for file system operations and output management in LLM applications.

Project description

fabricatio-actions

A Python library providing foundational actions for file system operations and output management in LLM applications.

📦 Installation

This package is part of the fabricatio monorepo and can be installed as an optional dependency:

pip install fabricatio[actions]

Or install all components:

pip install fabricatio[full]

🔍 Overview

Provides essential tools for:

  • File system operations (read/write, path handling)
  • Output formatting and display
  • Basic task execution building blocks

Designed to work seamlessly with Fabricatio's agent framework and other modules like fabricatio-core, fabricatio-capabilities, and fabricatio-improve.

🧩 Usage Example

from fabricatio.actions import ReadText
from fabricatio import Role, Event, Task, WorkFlow
import asyncio

(Role(name="file_reader", description="file reader role")
 .register_workflow(Event.quick_instantiate("read_text"), WorkFlow(steps=(ReadText().to_task_output(),))
                    ))


async def main():
    ret: str = await Task(name="read_file", goals=["read file"], description="read file").update_init_context(
        read_path="path/to/file"
    ).delegate("read_text")
    print(ret)


asyncio.run(main())

📁 Structure

fabricatio-actions/
├── actions/          - Action implementations
│   ├── fs.py         - File system operations
│   └── output.py     - Output formatting and display
├── models/           - Data models
│   └── generic.py    - Shared type definitions
└── __init__.py       - Package entry point

🔗 Dependencies

Core dependencies:

  • fabricatio-core - Core interfaces and utilities
  • fabricatio-capabilities - Base capability patterns

📄 License

MIT – see LICENSE

GitHub: github.com/Whth/fabricatio

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabricatio_actions-0.1.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file fabricatio_actions-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fabricatio_actions-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ebfbb39a5dbe1c35e2f46ca4ca431840c2c3da362d821835f8c1ec1bc81baff2
MD5 995cd8861b0b9578aea98b00cb66edf7
BLAKE2b-256 b056d3e8fa011cf64f348ec6d75d5c4fb0c7ec7220a0e74ed428cbffe9a9088a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page