fabricatio 0.2.0.dev10__cp312-cp312-manylinux_2_34_x86_64.whl → 0.2.0.dev11__cp312-cp312-manylinux_2_34_x86_64.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 +1 -4
- fabricatio/_rust_instances.py +4 -0
- fabricatio/models/task.py +6 -4
- {fabricatio-0.2.0.dev10.dist-info → fabricatio-0.2.0.dev11.dist-info}/METADATA +3 -2
- {fabricatio-0.2.0.dev10.dist-info → fabricatio-0.2.0.dev11.dist-info}/RECORD +8 -7
- {fabricatio-0.2.0.dev10.data → fabricatio-0.2.0.dev11.data}/scripts/tdown +0 -0
- {fabricatio-0.2.0.dev10.dist-info → fabricatio-0.2.0.dev11.dist-info}/WHEEL +0 -0
- {fabricatio-0.2.0.dev10.dist-info → fabricatio-0.2.0.dev11.dist-info}/licenses/LICENSE +0 -0
fabricatio/__init__.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
"""Fabricatio is a Python library for building llm app using event-based agent structure."""
|
2
2
|
|
3
|
-
from fabricatio.
|
4
|
-
from fabricatio.config import configs
|
3
|
+
from fabricatio._rust_instances import template_manager
|
5
4
|
from fabricatio.core import env
|
6
5
|
from fabricatio.fs import magika
|
7
6
|
from fabricatio.journal import logger
|
@@ -13,8 +12,6 @@ from fabricatio.models.tool import ToolBox
|
|
13
12
|
from fabricatio.models.utils import Message, Messages
|
14
13
|
from fabricatio.parser import Capture, CodeBlockCapture, JsonCapture, PythonCapture
|
15
14
|
|
16
|
-
template_manager = TemplateManager(configs.code2prompt.template_dir)
|
17
|
-
|
18
15
|
__all__ = [
|
19
16
|
"Action",
|
20
17
|
"Capture",
|
fabricatio/models/task.py
CHANGED
@@ -7,6 +7,7 @@ from asyncio import Queue
|
|
7
7
|
from enum import Enum
|
8
8
|
from typing import Any, List, Optional, Self
|
9
9
|
|
10
|
+
from fabricatio._rust_instances import template_manager
|
10
11
|
from fabricatio.core import env
|
11
12
|
from fabricatio.journal import logger
|
12
13
|
from fabricatio.models.events import Event, EventLike
|
@@ -273,11 +274,12 @@ class ProposeTask(LLMUsage, WithBriefing):
|
|
273
274
|
logger.error(f"Failed to parse task from JSON: {e}")
|
274
275
|
return None
|
275
276
|
|
277
|
+
template_data = {
|
278
|
+
"prompt": prompt,
|
279
|
+
"json_example": Task.json_example()
|
280
|
+
}
|
276
281
|
return await self.aask_validate(
|
277
|
-
|
278
|
-
f"you need to construct a task to satisfy that requirement in JSON format "
|
279
|
-
f"written like this: \n\n```json\n{Task.json_example()}\n```\n\n"
|
280
|
-
f"No extra explanation needed. ",
|
282
|
+
template_manager.render_template("propose_task", template_data),
|
281
283
|
_validate_json,
|
282
284
|
system_message=f"# your personal briefing: \n{self.briefing}",
|
283
285
|
)
|
@@ -1,7 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fabricatio
|
3
|
-
Version: 0.2.0.
|
3
|
+
Version: 0.2.0.dev11
|
4
4
|
Classifier: License :: OSI Approved :: MIT License
|
5
|
+
Classifier: Programming Language :: Rust
|
5
6
|
Classifier: Programming Language :: Python :: 3.12
|
6
7
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
7
8
|
Classifier: Framework :: AsyncIO
|
@@ -23,7 +24,7 @@ Requires-Dist: regex>=2024.11.6
|
|
23
24
|
Requires-Dist: rich>=13.9.4
|
24
25
|
License-File: LICENSE
|
25
26
|
Summary: A LLM multi-agent framework.
|
26
|
-
Keywords: ai,agents,multi-agent,llm
|
27
|
+
Keywords: ai,agents,multi-agent,llm,pyo3
|
27
28
|
Author-email: Whth <zettainspector@foxmail.com>
|
28
29
|
Requires-Python: >=3.12
|
29
30
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
@@ -1,28 +1,29 @@
|
|
1
|
-
fabricatio-0.2.0.
|
2
|
-
fabricatio-0.2.0.
|
3
|
-
fabricatio-0.2.0.
|
1
|
+
fabricatio-0.2.0.dev11.dist-info/METADATA,sha256=5XdMpp40bDU_ulMm0r4EfK6wTERGc1Uiz56lzpIMCPM,5824
|
2
|
+
fabricatio-0.2.0.dev11.dist-info/WHEEL,sha256=RIvmwLDYujv60MYBx2jxyP4vdn1DD7X0kBgz1TQvZuc,108
|
3
|
+
fabricatio-0.2.0.dev11.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
|
4
4
|
fabricatio/fs/__init__.py,sha256=bYE9r8uR0dtknzbg_YaGv_6Wwa27ntkQt0Tl7Kb3HFI,117
|
5
5
|
fabricatio/fs/readers.py,sha256=E219Pef7gknltkHjL9iZXwjI841_EPFpNvDG9KBUG3g,118
|
6
6
|
fabricatio/toolboxes/__init__.py,sha256=8gd8yPhhQBO0A37w1zqVLfbOG-pyCPrveEtO0MX042A,151
|
7
7
|
fabricatio/toolboxes/task.py,sha256=G_nNYT8Sy5ll6YmXES458MUmgJnDSBNwlozyJewdnzY,200
|
8
|
-
fabricatio/__init__.py,sha256=
|
8
|
+
fabricatio/__init__.py,sha256=5z3QgwOGRzH7EIxKNWsZ_A6Ytfcu23nl-r6prZ-Z4cw,880
|
9
9
|
fabricatio/core.py,sha256=apwXgI94DCWpGujGlsmXsTZQvJOQMB9llmuUo7ohd-4,5771
|
10
10
|
fabricatio/config.py,sha256=Or_PzOzXy_4Rqje1r788sID4bxILXhNC3r7eelcZJy0,7852
|
11
11
|
fabricatio/decorators.py,sha256=Y2F5JuN3K5Pas_JPBLQrB_Np0s1U8k2lPvrdtCHtcRE,1799
|
12
12
|
fabricatio/journal.py,sha256=u6YTKrD9EoebbR8guvAe5zSqWV1nS-BGyKxZR_Sw2ik,684
|
13
13
|
fabricatio/models/generic.py,sha256=1S5guUWnHSpoyNi1D1t4q14e6YNIovI4Goc3kizHd8M,15698
|
14
14
|
fabricatio/models/action.py,sha256=PNcm4t34fSaI03ECIOZ8ezvB6PlZkNhJtZFEhtU0Gec,4916
|
15
|
-
fabricatio/models/task.py,sha256=
|
15
|
+
fabricatio/models/task.py,sha256=Li66mMYM4xF3vGH0FHNZv02YQ2KhcU67CSTTcqTrGVU,9124
|
16
16
|
fabricatio/models/role.py,sha256=1vhpHRKJ6f7PDBLl6jYRZbxTJyrVhNN3FEEh_HAwU3o,990
|
17
17
|
fabricatio/models/tool.py,sha256=jzH34UHIgqEwYdXOQ3Jz_TN0cyj_jLTVBVs0qGl9tQU,3299
|
18
18
|
fabricatio/models/events.py,sha256=S0E7l5iQoJYdUn0pSSziHdXqPzIvvLy8ifVPQxXeAho,2570
|
19
19
|
fabricatio/models/utils.py,sha256=u-eR_v-o0BSFSmCprP3mOyAO-WOyg_P68jjzLjyit_w,2457
|
20
20
|
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
+
fabricatio/_rust_instances.py,sha256=c3aB95D7qKrA1AxDHD94lYinklAmK5EL6_DDJUEzPB0,153
|
21
22
|
fabricatio/actions/__init__.py,sha256=eLa_5ACZ-FqdrLtOfCHk5nQBxzhIs1kgMIXWmkm2P8Y,110
|
22
23
|
fabricatio/actions/communication.py,sha256=4hNzyv5_j4HU291dDuBmBEb66VihQPI9SLRVZrxWu1Y,412
|
23
24
|
fabricatio/actions/transmission.py,sha256=gLLKoi4keL64uaEkHDxwVrBGciheupQrO2fW3GkjfEw,1156
|
24
25
|
fabricatio/_rust.pyi,sha256=EwMPoCZFOCYZ5h_9PZLvO3YrgBEG0Hwae0ux0hcBabM,1487
|
25
26
|
fabricatio/parser.py,sha256=2wFvkyAIlFyB_dj8txr6shc-0ik5cz0mUy_Yj_GrqcI,2355
|
26
27
|
fabricatio/_rust.cpython-312-x86_64-linux-gnu.so,sha256=zSQ7Y-Hp7TDAzKenBEEWirLdaVturuUyGbNn1oXtRYs,1191136
|
27
|
-
fabricatio-0.2.0.
|
28
|
-
fabricatio-0.2.0.
|
28
|
+
fabricatio-0.2.0.dev11.data/scripts/tdown,sha256=jyItwd3z9dBoOT6EEA3niK0e7AXhhBnL87-T0IBRkYk,4540840
|
29
|
+
fabricatio-0.2.0.dev11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|