fabricatio 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fabricatio/__init__.py +24 -18
- fabricatio/config.py +93 -15
- fabricatio/core.py +165 -148
- fabricatio/{logger.py → journal.py} +7 -2
- fabricatio/models/action.py +77 -9
- fabricatio/models/events.py +26 -28
- fabricatio/models/generic.py +277 -121
- fabricatio/models/role.py +44 -8
- fabricatio/models/task.py +224 -0
- fabricatio/models/tool.py +101 -80
- fabricatio/models/utils.py +10 -15
- fabricatio/parser.py +66 -0
- fabricatio/toolboxes/__init__.py +7 -0
- fabricatio/toolboxes/task.py +4 -0
- {fabricatio-0.1.0.dist-info → fabricatio-0.1.2.dist-info}/METADATA +84 -3
- fabricatio-0.1.2.dist-info/RECORD +19 -0
- fabricatio/fs.py +0 -1
- fabricatio-0.1.0.dist-info/RECORD +0 -16
- {fabricatio-0.1.0.dist-info → fabricatio-0.1.2.dist-info}/WHEEL +0 -0
- {fabricatio-0.1.0.dist-info → fabricatio-0.1.2.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fabricatio
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: A LLM multi-agent framework.
|
5
5
|
Author-email: Whth <zettainspector@foxmail.com>
|
6
6
|
License: MIT License
|
@@ -25,6 +25,7 @@ License: MIT License
|
|
25
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
26
|
SOFTWARE.
|
27
27
|
License-File: LICENSE
|
28
|
+
Keywords: agents,ai,llm,multi-agent
|
28
29
|
Classifier: Framework :: AsyncIO
|
29
30
|
Classifier: Framework :: Pydantic :: 2
|
30
31
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -36,11 +37,91 @@ Requires-Dist: aiohttp>=3.11.11
|
|
36
37
|
Requires-Dist: aiomultiprocess>=0.9.1
|
37
38
|
Requires-Dist: appdirs>=1.4.4
|
38
39
|
Requires-Dist: asyncio>=3.4.3
|
40
|
+
Requires-Dist: gitpython>=3.1.44
|
39
41
|
Requires-Dist: litellm>=1.60.0
|
40
42
|
Requires-Dist: loguru>=0.7.3
|
43
|
+
Requires-Dist: orjson>=3.10.15
|
41
44
|
Requires-Dist: pydantic-settings>=2.7.1
|
42
45
|
Requires-Dist: pydantic>=2.10.6
|
43
46
|
Requires-Dist: pymitter>=1.0.0
|
47
|
+
Requires-Dist: regex>=2024.11.6
|
44
48
|
Requires-Dist: rich>=13.9.4
|
45
|
-
|
46
|
-
|
49
|
+
Requires-Dist: shutilwhich>=1.1.0
|
50
|
+
Description-Content-Type: text/markdown
|
51
|
+
|
52
|
+
## Usage
|
53
|
+
|
54
|
+
### Defining a Task
|
55
|
+
|
56
|
+
```python
|
57
|
+
from fabricatio.models.task import Task
|
58
|
+
|
59
|
+
task = Task(name="say hello", goal="say hello", description="say hello to the world")
|
60
|
+
```
|
61
|
+
|
62
|
+
|
63
|
+
### Creating an Action
|
64
|
+
|
65
|
+
```python
|
66
|
+
from fabricatio import Action, logger
|
67
|
+
from fabricatio.models.task import Task
|
68
|
+
|
69
|
+
class Talk(Action):
|
70
|
+
async def _execute(self, task_input: Task[str], **_) -> Any:
|
71
|
+
ret = "Hello fabricatio!"
|
72
|
+
logger.info("executing talk action")
|
73
|
+
return ret
|
74
|
+
```
|
75
|
+
|
76
|
+
|
77
|
+
### Assigning a Role
|
78
|
+
|
79
|
+
```python
|
80
|
+
from fabricatio.models.role import Role
|
81
|
+
from fabricatio.models.action import WorkFlow
|
82
|
+
|
83
|
+
class TestWorkflow(WorkFlow):
|
84
|
+
pass
|
85
|
+
|
86
|
+
role = Role(name="Test Role", actions=[TestWorkflow()])
|
87
|
+
```
|
88
|
+
|
89
|
+
|
90
|
+
### Logging
|
91
|
+
|
92
|
+
Fabricatio uses Loguru for logging. You can configure the log level and file in the `config.py` file.
|
93
|
+
|
94
|
+
```python
|
95
|
+
from fabricatio.config import DebugConfig
|
96
|
+
|
97
|
+
debug_config = DebugConfig(log_level="DEBUG", log_file="fabricatio.log")
|
98
|
+
```
|
99
|
+
|
100
|
+
|
101
|
+
## Configuration
|
102
|
+
|
103
|
+
Fabricatio uses Pydantic for configuration management. You can define your settings in the `config.py` file.
|
104
|
+
|
105
|
+
```python
|
106
|
+
from fabricatio.config import Settings
|
107
|
+
|
108
|
+
settings = Settings(llm=LLMConfig(api_endpoint="https://api.example.com"))
|
109
|
+
```
|
110
|
+
|
111
|
+
|
112
|
+
## Testing
|
113
|
+
|
114
|
+
Fabricatio includes a set of tests to ensure the framework works as expected. You can run the tests using `pytest`.
|
115
|
+
|
116
|
+
```bash
|
117
|
+
pytest
|
118
|
+
```
|
119
|
+
|
120
|
+
|
121
|
+
## Contributing
|
122
|
+
|
123
|
+
Contributions to Fabricatio are welcome! Please submit a pull request with your changes.
|
124
|
+
|
125
|
+
## License
|
126
|
+
|
127
|
+
Fabricatio is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
fabricatio/__init__.py,sha256=nFPtohqceECRYzU-WlVT6o4oSaKN0vGok-w9JIaiJfs,644
|
2
|
+
fabricatio/config.py,sha256=EOlVkuEBAHESAlrGtolGwEG2YrTaJPhEGPKS7QDxrx0,6995
|
3
|
+
fabricatio/core.py,sha256=B6KBIfBRF023HF0UUaUprEkQd6sT7G_pexGXQ9btJnE,5788
|
4
|
+
fabricatio/journal.py,sha256=CW9HePtgTiboOyPTExq9GjG5BseZcbc-S6lxDXrpmv0,667
|
5
|
+
fabricatio/parser.py,sha256=On_YUCvOuA0FA_NtDVNJqKp7KEO_sUE89oO_WnkEhQ4,2314
|
6
|
+
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
+
fabricatio/models/action.py,sha256=M-12dc-nQiNJU6Y9j-dr4Ef3642vRvzHlzxekBepzaU,3358
|
8
|
+
fabricatio/models/events.py,sha256=0p42QmNDzmC76DhMwW1H_Mlg15MQ_XjEqkCJc8UkIB8,2055
|
9
|
+
fabricatio/models/generic.py,sha256=Sxpx0BO0t85YF5Lwks6F165N6TJsDe7xym28dQG5Mqs,17681
|
10
|
+
fabricatio/models/role.py,sha256=jdabuYRXwgvpYoNwvazygDiZHGGQApUIIKltniu78O8,2151
|
11
|
+
fabricatio/models/task.py,sha256=0oQeGQ6Rvd_x6ZM5ImtcN2vr0ojFmF6EiWBAMOjledI,6865
|
12
|
+
fabricatio/models/tool.py,sha256=UkEp1Nzbl5wZX21q_Z2VkpiJmVDSdoGDzINQniO8hSY,3536
|
13
|
+
fabricatio/models/utils.py,sha256=2mgXla9_K3dnRrz6hIKzmltTYPmvDk0MBjjEBkCXTdg,2474
|
14
|
+
fabricatio/toolboxes/__init__.py,sha256=bjefmPd7wBaWhbZzdMPXvrjMTeRzlUh_Dev2PUAc124,158
|
15
|
+
fabricatio/toolboxes/task.py,sha256=xgyPetm2R_HlQwpzE8YPnBN7QOYLd0-T8E6QPZG1PPQ,204
|
16
|
+
fabricatio-0.1.2.dist-info/METADATA,sha256=JoHDaag_cV_OOthFdXHGJyBKlJpyUg4C30lBOvAVA_U,3797
|
17
|
+
fabricatio-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
18
|
+
fabricatio-0.1.2.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
19
|
+
fabricatio-0.1.2.dist-info/RECORD,,
|
fabricatio/fs.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# TODO: fs capabilities impl
|
@@ -1,16 +0,0 @@
|
|
1
|
-
fabricatio/__init__.py,sha256=eyBnyKBsNZJOuHwVoDNCpLNdTj3a_B2raHtHh8dsgSg,420
|
2
|
-
fabricatio/config.py,sha256=aYvBVyJ3TBA6neDYJroxRKNEGgPA1Q8ncKE1YMH7jKU,3605
|
3
|
-
fabricatio/core.py,sha256=XVvhpgR4BNDkhWnxTDouw8qyT0v--xKeRjp2BiRMO4E,5194
|
4
|
-
fabricatio/fs.py,sha256=EBcqgSmsVWAKDm0ceiJ4IYYGPgP_qlO7tNl1O4tYUBk,30
|
5
|
-
fabricatio/logger.py,sha256=NwfIbSvFnhOrkCREyU_WDC80c3DTJr9NA4OH8oZmrXE,581
|
6
|
-
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
fabricatio/models/action.py,sha256=6KAeG5MWnWQzsj_SrQAKkIMduTv1Ry4Bc_v7LRXfjfM,585
|
8
|
-
fabricatio/models/events.py,sha256=0VtavawE3H60ICOFa1eb-t2Iunl0zhvq0PikzGCE1rw,1978
|
9
|
-
fabricatio/models/generic.py,sha256=3CUCgXRVx_qKj-jTKh6GJ2jggRPHRwRXlNcOe_c6wlM,10624
|
10
|
-
fabricatio/models/role.py,sha256=0OZX724IsQwmjdVecJxst0TSo_UcJKI_rlJBEFOgD9o,410
|
11
|
-
fabricatio/models/tool.py,sha256=_Cj5yG447M5dQNFSu08bMuyVLmA7QZGvtAziyeNqJa0,2871
|
12
|
-
fabricatio/models/utils.py,sha256=TT4m7CymJXSVc_bqI9k6Inymj3AHbz7bh2tVgw4LW7Y,2491
|
13
|
-
fabricatio-0.1.0.dist-info/METADATA,sha256=ltTqOsOFVwkaRV8HIvrGuBf21wt9P-EyfmFMSIHEnkw,2082
|
14
|
-
fabricatio-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
-
fabricatio-0.1.0.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
16
|
-
fabricatio-0.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|