fabricatio 0.2.3.dev3__cp312-cp312-win_amd64.whl → 0.2.4__cp312-cp312-win_amd64.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 +18 -5
- fabricatio/_rust.cp312-win_amd64.pyd +0 -0
- fabricatio/actions/article.py +81 -0
- fabricatio/actions/output.py +21 -0
- fabricatio/actions/rag.py +25 -0
- fabricatio/capabilities/propose.py +55 -0
- fabricatio/capabilities/rag.py +193 -52
- fabricatio/capabilities/rating.py +12 -36
- fabricatio/capabilities/task.py +6 -23
- fabricatio/config.py +43 -2
- fabricatio/fs/__init__.py +24 -2
- fabricatio/fs/curd.py +14 -8
- fabricatio/fs/readers.py +5 -2
- fabricatio/models/action.py +19 -4
- fabricatio/models/events.py +36 -0
- fabricatio/models/extra.py +168 -0
- fabricatio/models/generic.py +218 -7
- fabricatio/models/kwargs_types.py +15 -0
- fabricatio/models/task.py +5 -37
- fabricatio/models/tool.py +3 -2
- fabricatio/models/usages.py +153 -184
- fabricatio/models/utils.py +19 -0
- fabricatio/parser.py +35 -8
- fabricatio/toolboxes/__init__.py +1 -3
- fabricatio/toolboxes/fs.py +15 -1
- fabricatio/workflows/articles.py +15 -0
- fabricatio/workflows/rag.py +11 -0
- fabricatio-0.2.4.data/scripts/tdown.exe +0 -0
- {fabricatio-0.2.3.dev3.dist-info → fabricatio-0.2.4.dist-info}/METADATA +66 -178
- fabricatio-0.2.4.dist-info/RECORD +40 -0
- fabricatio/actions/__init__.py +0 -5
- fabricatio/actions/communication.py +0 -15
- fabricatio/actions/transmission.py +0 -23
- fabricatio/toolboxes/task.py +0 -6
- fabricatio-0.2.3.dev3.data/scripts/tdown.exe +0 -0
- fabricatio-0.2.3.dev3.dist-info/RECORD +0 -37
- {fabricatio-0.2.3.dev3.dist-info → fabricatio-0.2.4.dist-info}/WHEEL +0 -0
- {fabricatio-0.2.3.dev3.dist-info → fabricatio-0.2.4.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fabricatio
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.4
|
4
4
|
Classifier: License :: OSI Approved :: MIT License
|
5
5
|
Classifier: Programming Language :: Rust
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -11,7 +11,6 @@ Classifier: Typing :: Typed
|
|
11
11
|
Requires-Dist: appdirs>=1.4.4
|
12
12
|
Requires-Dist: asyncio>=3.4.3
|
13
13
|
Requires-Dist: asyncstdlib>=3.13.0
|
14
|
-
Requires-Dist: gitpython>=3.1.44
|
15
14
|
Requires-Dist: litellm>=1.60.0
|
16
15
|
Requires-Dist: loguru>=0.7.3
|
17
16
|
Requires-Dist: magika>=0.5.1
|
@@ -37,13 +36,14 @@ Project-URL: Homepage, https://github.com/Whth/fabricatio
|
|
37
36
|
Project-URL: Repository, https://github.com/Whth/fabricatio
|
38
37
|
Project-URL: Issues, https://github.com/Whth/fabricatio/issues
|
39
38
|
|
40
|
-
|
41
39
|
# Fabricatio
|
42
40
|
|
43
41
|

|
44
42
|

|
45
43
|

|
46
44
|
|
45
|
+
## Overview
|
46
|
+
|
47
47
|
Fabricatio is a Python library designed for building LLM (Large Language Model) applications using an event-based agent structure. It integrates Rust for performance-critical tasks, utilizes Handlebars for templating, and employs PyO3 for Python bindings.
|
48
48
|
|
49
49
|
## Features
|
@@ -73,6 +73,7 @@ cd fabricatio
|
|
73
73
|
uv --with-editable . maturin develop --uv -r
|
74
74
|
```
|
75
75
|
|
76
|
+
|
76
77
|
### Building Distribution
|
77
78
|
|
78
79
|
For production builds:
|
@@ -82,50 +83,47 @@ For production builds:
|
|
82
83
|
make bdist
|
83
84
|
```
|
84
85
|
|
86
|
+
|
85
87
|
This will generate distribution files in the `dist` directory.
|
86
88
|
|
87
89
|
## Usage
|
88
90
|
|
89
91
|
### Basic Example
|
90
92
|
|
91
|
-
Below are some basic examples demonstrating how to use Fabricatio for different purposes.
|
92
|
-
|
93
93
|
#### Simple Hello World Program
|
94
94
|
|
95
95
|
```python
|
96
96
|
import asyncio
|
97
|
-
from fabricatio import Action, Role, Task, logger
|
98
|
-
|
97
|
+
from fabricatio import Action, Role, Task, logger, WorkFlow
|
98
|
+
from typing import Any
|
99
99
|
|
100
100
|
class Hello(Action):
|
101
|
-
|
102
|
-
|
103
|
-
name: str = "hello"
|
104
|
-
output_key: str = "task_output"
|
105
|
-
|
106
|
-
async def _execute(self, task_input: Task[str], **_) -> Any:
|
107
|
-
ret = "Hello fabricatio!"
|
108
|
-
logger.info("executing talk action")
|
109
|
-
return ret
|
101
|
+
name: str = "hello"
|
102
|
+
output_key: str = "task_output"
|
110
103
|
|
104
|
+
async def _execute(self, task_input: Task[str], **_) -> Any:
|
105
|
+
ret = "Hello fabricatio!"
|
106
|
+
logger.info("executing talk action")
|
107
|
+
return ret
|
111
108
|
|
112
109
|
async def main() -> None:
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
)
|
119
|
-
|
120
|
-
task = Task(name="say hello", goals="say hello", description="say hello to the world")
|
121
|
-
result = await task.delegate()
|
122
|
-
logger.success(f"Result: {result}")
|
110
|
+
role = Role(
|
111
|
+
name="talker",
|
112
|
+
description="talker role",
|
113
|
+
registry={Task.pending_label: WorkFlow(name="talk", steps=(Hello,))}
|
114
|
+
)
|
123
115
|
|
116
|
+
task = Task(name="say hello", goals="say hello", description="say hello to the world")
|
117
|
+
result = await task.delegate()
|
118
|
+
logger.success(f"Result: {result}")
|
124
119
|
|
125
120
|
if __name__ == "__main__":
|
126
|
-
|
121
|
+
asyncio.run(main())
|
127
122
|
```
|
128
123
|
|
124
|
+
|
125
|
+
### Advanced Examples
|
126
|
+
|
129
127
|
#### Writing and Dumping Code
|
130
128
|
|
131
129
|
```python
|
@@ -134,21 +132,14 @@ from fabricatio import Action, Event, PythonCapture, Role, Task, ToolBox, WorkFl
|
|
134
132
|
|
135
133
|
|
136
134
|
class WriteCode(Action):
|
137
|
-
"""Action that writes code based on a prompt."""
|
138
|
-
|
139
135
|
name: str = "write code"
|
140
136
|
output_key: str = "source_code"
|
141
137
|
|
142
138
|
async def _execute(self, task_input: Task[str], **_) -> str:
|
143
|
-
return await self.aask_validate(
|
144
|
-
task_input.briefing,
|
145
|
-
validator=PythonCapture.capture,
|
146
|
-
)
|
139
|
+
return await self.aask_validate(task_input.briefing, validator=PythonCapture.capture)
|
147
140
|
|
148
141
|
|
149
142
|
class DumpCode(Action):
|
150
|
-
"""Action that dumps code to the file system."""
|
151
|
-
|
152
143
|
name: str = "dump code"
|
153
144
|
description: str = "Dump code to file system"
|
154
145
|
toolboxes: set[ToolBox] = {fs_toolbox}
|
@@ -160,20 +151,18 @@ class DumpCode(Action):
|
|
160
151
|
|
161
152
|
|
162
153
|
async def main() -> None:
|
163
|
-
"""Main function."""
|
164
154
|
role = Role(
|
165
155
|
name="Coder",
|
166
156
|
description="A python coder who can write and document code",
|
167
157
|
registry={
|
168
158
|
Event.instantiate_from("coding.*").push("pending"): WorkFlow(
|
169
159
|
name="write code", steps=(WriteCode, DumpCode)
|
170
|
-
)
|
171
|
-
}
|
160
|
+
)
|
161
|
+
}
|
172
162
|
)
|
173
163
|
|
174
164
|
prompt = "write a Python CLI app which prints 'hello world' n times with detailed Google-style docstring. Write the source code to `cli.py`."
|
175
|
-
|
176
|
-
proposed_task = await role.propose(prompt)
|
165
|
+
proposed_task = await role.propose_task(prompt)
|
177
166
|
path = await proposed_task.move_to("coding").delegate()
|
178
167
|
logger.success(f"Code Path: {path}")
|
179
168
|
|
@@ -182,112 +171,8 @@ if __name__ == "__main__":
|
|
182
171
|
asyncio.run(main())
|
183
172
|
```
|
184
173
|
|
185
|
-
#### Proposing Tasks
|
186
|
-
|
187
|
-
```python
|
188
|
-
import asyncio
|
189
|
-
from typing import Any
|
190
|
-
|
191
|
-
from fabricatio import Action, Role, Task, WorkFlow, logger
|
192
|
-
|
193
|
-
|
194
|
-
class WriteDocumentation(Action):
|
195
|
-
"""Action that generates documentation for the code in markdown format."""
|
196
|
-
|
197
|
-
name: str = "write documentation"
|
198
|
-
description: str = "Write detailed documentation for the provided code."
|
199
|
-
output_key: str = "task_output"
|
200
|
-
|
201
|
-
async def _execute(self, task_input: Task[str], **_) -> str:
|
202
|
-
return await self.aask(task_input.briefing)
|
203
|
-
|
204
|
-
|
205
|
-
async def main() -> None:
|
206
|
-
"""Main function."""
|
207
|
-
role = Role(
|
208
|
-
name="Documenter",
|
209
|
-
description="Role responsible for writing documentation.",
|
210
|
-
registry={
|
211
|
-
"doc.*": WorkFlow(name="write documentation", steps=(WriteDocumentation,))
|
212
|
-
}
|
213
|
-
)
|
214
|
-
|
215
|
-
prompt = "write a Rust clap CLI that downloads an HTML page"
|
216
|
-
proposed_task = await role.propose(prompt)
|
217
|
-
documentation = await proposed_task.move_to("doc").delegate()
|
218
|
-
logger.success(f"Documentation:\n{documentation}")
|
219
|
-
|
220
|
-
|
221
|
-
if __name__ == "__main__":
|
222
|
-
asyncio.run(main())
|
223
|
-
```
|
224
|
-
|
225
|
-
#### Complex Workflow Handling
|
226
|
-
|
227
|
-
```python
|
228
|
-
import asyncio
|
229
|
-
from fabricatio import Action, Event, Role, Task, WorkFlow, logger
|
230
|
-
|
231
|
-
|
232
|
-
class WriteCode(Action):
|
233
|
-
"""Action that writes code based on a prompt."""
|
234
|
-
|
235
|
-
name: str = "write code"
|
236
|
-
output_key: str = "source_code"
|
237
|
-
|
238
|
-
async def _execute(self, task_input: Task[str], **_) -> str:
|
239
|
-
return await self.aask_validate(
|
240
|
-
task_input.briefing,
|
241
|
-
validator=PythonCapture.capture,
|
242
|
-
)
|
243
|
-
|
244
|
-
|
245
|
-
class WriteDocumentation(Action):
|
246
|
-
"""Action that generates documentation for the code in markdown format."""
|
247
|
-
|
248
|
-
name: str = "write documentation"
|
249
|
-
description: str = "Write detailed documentation for the provided code."
|
250
|
-
output_key: str = "task_output"
|
251
|
-
|
252
|
-
async def _execute(self, task_input: Task[str], **_) -> str:
|
253
|
-
return await self.aask(task_input.briefing)
|
254
|
-
|
255
|
-
|
256
|
-
async def main() -> None:
|
257
|
-
"""Main function."""
|
258
|
-
role = Role(
|
259
|
-
name="Developer",
|
260
|
-
description="A developer who can write code and documentation.",
|
261
|
-
registry={
|
262
|
-
Event.instantiate_from("coding.*").push("pending"): WorkFlow(
|
263
|
-
name="write code", steps=(WriteCode,)
|
264
|
-
),
|
265
|
-
Event.instantiate_from("doc.*").push("pending"): WorkFlow(
|
266
|
-
name="write documentation", steps=(WriteDocumentation,)
|
267
|
-
),
|
268
|
-
}
|
269
|
-
)
|
270
|
-
|
271
|
-
# Propose a coding task
|
272
|
-
code_task_prompt = "write a Python CLI app which adds numbers from a file."
|
273
|
-
proposed_task = await role.propose(code_task_prompt)
|
274
|
-
code = await proposed_task.move_to("coding").delegate()
|
275
|
-
logger.success(f"Code:\n{code}")
|
276
|
-
|
277
|
-
# Propose a documentation task
|
278
|
-
doc_task_prompt = f"{code}\n\nwrite Readme.md file for the above code."
|
279
|
-
proposed_doc_task = await role.propose(doc_task_prompt)
|
280
|
-
documentation = await proposed_doc_task.move_to("doc").delegate()
|
281
|
-
logger.success(f"Documentation:\n{documentation}")
|
282
|
-
|
283
|
-
|
284
|
-
if __name__ == "__main__":
|
285
|
-
asyncio.run(main())
|
286
|
-
```
|
287
|
-
|
288
|
-
### Advanced Examples
|
289
174
|
|
290
|
-
|
175
|
+
### Template Management and Rendering
|
291
176
|
|
292
177
|
```python
|
293
178
|
from fabricatio._rust_instances import template_manager
|
@@ -303,7 +188,8 @@ rendered_template = template_manager.render_template(template_name, data)
|
|
303
188
|
print(rendered_template)
|
304
189
|
```
|
305
190
|
|
306
|
-
|
191
|
+
|
192
|
+
### Handling Security Vulnerabilities
|
307
193
|
|
308
194
|
```python
|
309
195
|
from fabricatio.models.usages import ToolBoxUsage
|
@@ -311,21 +197,21 @@ from fabricatio.models.task import Task
|
|
311
197
|
|
312
198
|
toolbox_usage = ToolBoxUsage()
|
313
199
|
|
314
|
-
|
315
200
|
async def handle_security_vulnerabilities():
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
201
|
+
task = Task(
|
202
|
+
name="Security Check",
|
203
|
+
goals=["Identify security vulnerabilities"],
|
204
|
+
description="Perform a thorough security review on the project.",
|
205
|
+
dependencies=["./src/main.py"]
|
206
|
+
)
|
207
|
+
|
208
|
+
vulnerabilities = await toolbox_usage.gather_tools_fine_grind(task)
|
209
|
+
for vulnerability in vulnerabilities:
|
210
|
+
print(f"Found vulnerability: {vulnerability.name}")
|
326
211
|
```
|
327
212
|
|
328
|
-
|
213
|
+
|
214
|
+
### Managing CTF Challenges
|
329
215
|
|
330
216
|
```python
|
331
217
|
import asyncio
|
@@ -335,25 +221,24 @@ from fabricatio.models.task import Task
|
|
335
221
|
|
336
222
|
toolbox_usage = ToolBoxUsage()
|
337
223
|
|
338
|
-
|
339
224
|
async def solve_ctf_challenge(challenge_name: str, challenge_description: str, files: list[str]):
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
solution = await toolbox_usage.gather_tools_fine_grind(task)
|
348
|
-
print(f"Challenge Solved: {solution}")
|
225
|
+
task = Task(
|
226
|
+
name=challenge_name,
|
227
|
+
goals=[f"Solve {challenge_name} challenge"],
|
228
|
+
description=challenge_description,
|
229
|
+
dependencies=files
|
230
|
+
)
|
349
231
|
|
232
|
+
solution = await toolbox_usage.gather_tools_fine_grind(task)
|
233
|
+
print(f"Challenge Solved: {solution}")
|
350
234
|
|
351
235
|
if __name__ == "__main__":
|
352
|
-
|
353
|
-
|
236
|
+
asyncio.run(
|
237
|
+
solve_ctf_challenge("Binary Exploitation", "CTF Binary Exploitation Challenge", ["./challenges/binary_exploit"]))
|
354
238
|
```
|
355
239
|
|
356
|
-
|
240
|
+
|
241
|
+
## Configuration
|
357
242
|
|
358
243
|
The configuration for Fabricatio is managed via environment variables or TOML files. The default configuration file (`config.toml`) can be overridden by specifying a custom path.
|
359
244
|
|
@@ -374,7 +259,8 @@ stream = false
|
|
374
259
|
max_tokens = 8192
|
375
260
|
```
|
376
261
|
|
377
|
-
|
262
|
+
|
263
|
+
## Development Setup
|
378
264
|
|
379
265
|
To set up a development environment for Fabricatio:
|
380
266
|
|
@@ -384,22 +270,26 @@ To set up a development environment for Fabricatio:
|
|
384
270
|
cd fabricatio
|
385
271
|
```
|
386
272
|
|
273
|
+
|
387
274
|
2. **Install Dependencies**:
|
388
275
|
```bash
|
389
276
|
uv --with-editable . maturin develop --uv -r
|
390
277
|
```
|
391
278
|
|
279
|
+
|
392
280
|
3. **Run Tests**:
|
393
281
|
```bash
|
394
282
|
make test
|
395
283
|
```
|
396
284
|
|
285
|
+
|
397
286
|
4. **Build Documentation**:
|
398
287
|
```bash
|
399
288
|
make docs
|
400
289
|
```
|
401
290
|
|
402
|
-
|
291
|
+
|
292
|
+
## Contributing
|
403
293
|
|
404
294
|
Contributions are welcome! Please follow these guidelines when contributing:
|
405
295
|
|
@@ -409,15 +299,13 @@ Contributions are welcome! Please follow these guidelines when contributing:
|
|
409
299
|
4. Push to the branch (`git push origin feature/new-feature`).
|
410
300
|
5. Create a new Pull Request.
|
411
301
|
|
412
|
-
|
302
|
+
## License
|
413
303
|
|
414
304
|
Fabricatio is licensed under the MIT License. See [LICENSE](LICENSE) for more details.
|
415
305
|
|
416
|
-
|
306
|
+
## Acknowledgments
|
417
307
|
|
418
308
|
Special thanks to the contributors and maintainers of:
|
419
309
|
- [PyO3](https://github.com/PyO3/pyo3)
|
420
310
|
- [Maturin](https://github.com/PyO3/maturin)
|
421
|
-
- [Handlebars.rs](https://github.com/sunng87/handlebars-rust)
|
422
|
-
|
423
|
-
|
311
|
+
- [Handlebars.rs](https://github.com/sunng87/handlebars-rust)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
fabricatio-0.2.4.dist-info/METADATA,sha256=u9UxbmvL17O9aduo1zWnZUCJXrX72swuqTL0Gy9wIsg,8856
|
2
|
+
fabricatio-0.2.4.dist-info/WHEEL,sha256=tpW5AN9B-9qsM9WW2FXG2r193YXiqexDadpKp0A2daI,96
|
3
|
+
fabricatio-0.2.4.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
4
|
+
fabricatio/actions/article.py,sha256=PFO7QJw0SXryReA2kGJgd35NeIxCodpudNQxlXNg8xA,2785
|
5
|
+
fabricatio/actions/output.py,sha256=RWXulsfN_qrCFik0B6lGwXf6MMtgK3CaF1ENbK0l85o,684
|
6
|
+
fabricatio/actions/rag.py,sha256=lZfw9SZ8oxbWPK_bvWsEpVkWJbGP8HUnlNbxLh11Wdg,821
|
7
|
+
fabricatio/capabilities/propose.py,sha256=nahXjB6_nP0Fru880oh_9oINrjrL0Qs-SLHA-d3CFUE,1769
|
8
|
+
fabricatio/capabilities/rag.py,sha256=AQTtFPDluTByl5NXYZZIvAw2qFKpnulzxL7fmStJD0w,15547
|
9
|
+
fabricatio/capabilities/rating.py,sha256=PcUpKxPfVO-vitgA6py1xg9iLJZdf7Fru--18ZUFKKA,14026
|
10
|
+
fabricatio/capabilities/task.py,sha256=s6FiC9Wg_l-qSa2LgsoKV9f6wXZN6Q_FlWn3XbSnrys,4618
|
11
|
+
fabricatio/config.py,sha256=va0jB0STiaYKazLq05WDFy8nApx1QKUhR1wUuNxreTg,13830
|
12
|
+
fabricatio/core.py,sha256=VQ_JKgUGIy2gZ8xsTBZCdr_IP7wC5aPg0_bsOmjQ588,6458
|
13
|
+
fabricatio/decorators.py,sha256=uzsP4tFKQNjDHBkofsjjoJA0IUAaYOtt6YVedoyOqlo,6551
|
14
|
+
fabricatio/fs/curd.py,sha256=m9ulUM95vF1OY4ogCugVSSvquG_0IUvZF7p2JnkZTQs,4146
|
15
|
+
fabricatio/fs/readers.py,sha256=Jw3NQ1AFMy_tZvGomTSu37kMojUoDeaZQS91w-xbNX0,1214
|
16
|
+
fabricatio/fs/__init__.py,sha256=YzCKEE1f_dvll3HnxKhq-bo8igkwTlA1A-GYm4bobj8,548
|
17
|
+
fabricatio/journal.py,sha256=siqimKF0M_QaaOCMxtjr_BJVNyUIAQWILzE9Q4T6-7c,781
|
18
|
+
fabricatio/models/action.py,sha256=tQtYrifGLEUAN9lAxvPVN16RpCFb-OR0G_IO_MVUu2s,6493
|
19
|
+
fabricatio/models/events.py,sha256=pt-WkFhhA5SXmp6-3Vb_o_7I5xbKoTCJ22GAK7YYwpA,4101
|
20
|
+
fabricatio/models/extra.py,sha256=1vmtnE0n15ZSRVKmPmtChA34y0y-G07uTywXek_oGzs,7463
|
21
|
+
fabricatio/models/generic.py,sha256=GxocstE-V05kofBra55ps9JFDPb82IsSTalWxwaJbzE,12530
|
22
|
+
fabricatio/models/kwargs_types.py,sha256=S5yrjx98QYVo2EzlOUKmL_EN3WQXAVzcR9229DVbX7o,1825
|
23
|
+
fabricatio/models/role.py,sha256=gYvleTeKUGDUNKPAC5B0EPMLC4jZ4vHsFHmHiVXkU6c,1830
|
24
|
+
fabricatio/models/task.py,sha256=sbC0EAZC4rPL2GCJ9i9GlFcZUJ96g39SQ2QP8bbgdqs,10492
|
25
|
+
fabricatio/models/tool.py,sha256=JdpldDqlXZ0TZc9eh6IrdHB3FAldEPxsSxeSm4naJhA,7025
|
26
|
+
fabricatio/models/usages.py,sha256=AcOpsInEmIDorTEYNvcyiAE2fsEuWfJwhNSZ2mrRf_g,26865
|
27
|
+
fabricatio/models/utils.py,sha256=QI3bYrKBbzLbKvyzVrZXGcWq3trOOTE-hQAC_WNvjMg,4457
|
28
|
+
fabricatio/parser.py,sha256=qNYshYtuwbZHZG1kQKYYHZOzYhDO4DZJJYh2k4Imz3s,4911
|
29
|
+
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
+
fabricatio/toolboxes/arithmetic.py,sha256=WLqhY-Pikv11Y_0SGajwZx3WhsLNpHKf9drzAqOf_nY,1369
|
31
|
+
fabricatio/toolboxes/fs.py,sha256=xOhmb1PcCBbc5V9EQtr624DKe0M4QzajA5dz_0cu1fI,688
|
32
|
+
fabricatio/toolboxes/__init__.py,sha256=KBJi5OG_pExscdlM7Bnt_UF43j4I3Lv6G71kPVu4KQU,395
|
33
|
+
fabricatio/workflows/articles.py,sha256=RebdC_BzSXC-xsck5I9ccC_XIgfhtoeM8FZuhtVDn3U,580
|
34
|
+
fabricatio/workflows/rag.py,sha256=-YYp2tlE9Vtfgpg6ROpu6QVO8j8yVSPa6yDzlN3qVxs,520
|
35
|
+
fabricatio/_rust.pyi,sha256=0wCqtwWkVxxoqprvk8T27T8QYKIAKHS7xgsmdMNjQKc,1756
|
36
|
+
fabricatio/_rust_instances.py,sha256=dl0-yZ4UvT5g20tQgnPJpmqtkjFGXNG_YK4eLfi_ugQ,279
|
37
|
+
fabricatio/__init__.py,sha256=tLyQcHKnV3OVWY2_WzBlhLxOv3VCSCm8p8TCYLbu8Mk,1870
|
38
|
+
fabricatio/_rust.cp312-win_amd64.pyd,sha256=KLw3DrIjQrCuiWreHHMO9eiEaada433KWIc2KhWY8_s,1275904
|
39
|
+
fabricatio-0.2.4.data/scripts/tdown.exe,sha256=J2gYOfNCxIYyTnIoq_NzD9H6c0i8TwTWlvaUqFY81MQ,3392000
|
40
|
+
fabricatio-0.2.4.dist-info/RECORD,,
|
fabricatio/actions/__init__.py
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
"""Actions that involve communication with the user."""
|
2
|
-
|
3
|
-
from fabricatio.models.action import Action
|
4
|
-
from fabricatio.models.task import Task
|
5
|
-
|
6
|
-
|
7
|
-
class Examining(Action):
|
8
|
-
"""Action that examines the input data."""
|
9
|
-
|
10
|
-
name: str = "talk"
|
11
|
-
output_key: str = "examine_pass"
|
12
|
-
|
13
|
-
async def _execute(self, exam_target: Task[str], to_examine: str, **_) -> bool:
|
14
|
-
"""Examine the input data."""
|
15
|
-
# TODO
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"""Actions for transmitting tasks to targets."""
|
2
|
-
|
3
|
-
from typing import List
|
4
|
-
|
5
|
-
from fabricatio.journal import logger
|
6
|
-
from fabricatio.models.action import Action
|
7
|
-
from fabricatio.models.events import EventLike
|
8
|
-
from fabricatio.models.task import Task
|
9
|
-
|
10
|
-
|
11
|
-
class PublishTask(Action):
|
12
|
-
"""An action that publishes a task to a list of targets."""
|
13
|
-
|
14
|
-
name: str = "publish_task"
|
15
|
-
"""The name of the action."""
|
16
|
-
description: str = "Publish a task to a list of targets."
|
17
|
-
"""The description of the action."""
|
18
|
-
|
19
|
-
async def _execute(self, send_targets: List[EventLike], send_task: Task, **_) -> None:
|
20
|
-
"""Execute the action by sending the task to the specified targets."""
|
21
|
-
logger.info(f"Sending task {send_task.name} to {send_targets}")
|
22
|
-
for target in send_targets:
|
23
|
-
await send_task.move_to(target).publish()
|
fabricatio/toolboxes/task.py
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
"""This module contains the toolbox for tasks management."""
|
2
|
-
|
3
|
-
from fabricatio.models.task import Task
|
4
|
-
from fabricatio.models.tool import ToolBox
|
5
|
-
|
6
|
-
task_toolbox = ToolBox(name="TaskToolBox", description="A toolbox for tasks management.").add_tool(Task.simple_task)
|
Binary file
|
@@ -1,37 +0,0 @@
|
|
1
|
-
fabricatio-0.2.3.dev3.dist-info/METADATA,sha256=_1gGVl7M89bTO5_yTp9V1Tc9GAAlgcB-QY5q-IhUUUQ,12296
|
2
|
-
fabricatio-0.2.3.dev3.dist-info/WHEEL,sha256=tpW5AN9B-9qsM9WW2FXG2r193YXiqexDadpKp0A2daI,96
|
3
|
-
fabricatio-0.2.3.dev3.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
4
|
-
fabricatio/actions/communication.py,sha256=NZxIIncKgJSDyBrqNebUtH_haqtxHa8ld2TZxT3CMdU,429
|
5
|
-
fabricatio/actions/transmission.py,sha256=xpvKqbXqgpi1BWy-vUUvmd8NZ1GhRNfsYUBp-l2jLyk,862
|
6
|
-
fabricatio/actions/__init__.py,sha256=eFmFVPQvtNgFynIXBVr3eP-vWQDWCPng60YY5LXvZgg,115
|
7
|
-
fabricatio/capabilities/rag.py,sha256=zUOxpX-MV1HVQ2iSjk2j5jMf0ZqAgqB42DbSBML5KGQ,9484
|
8
|
-
fabricatio/capabilities/rating.py,sha256=zmTUvsUfxFgovRQzy4djL2zKRYTHmN6JY7A4lyT5uVQ,14907
|
9
|
-
fabricatio/capabilities/task.py,sha256=d2xtrwQxXWI40UskQCR5YhHarY7ST0ppr8TjY12uWQE,5327
|
10
|
-
fabricatio/config.py,sha256=9ZgPn1GJMgDSGt31Xt6oPD10s2o-ssxbGHBc5PD_drs,12222
|
11
|
-
fabricatio/core.py,sha256=VQ_JKgUGIy2gZ8xsTBZCdr_IP7wC5aPg0_bsOmjQ588,6458
|
12
|
-
fabricatio/decorators.py,sha256=uzsP4tFKQNjDHBkofsjjoJA0IUAaYOtt6YVedoyOqlo,6551
|
13
|
-
fabricatio/fs/curd.py,sha256=faMstgGUiQ4k2AW3OXfvvWWTldTtKXco7QINYaMjmyA,3981
|
14
|
-
fabricatio/fs/readers.py,sha256=Pz1-cdZYtmqr032dsroImlkFXAd0kCYY_9qVpD4UrG4,1045
|
15
|
-
fabricatio/fs/__init__.py,sha256=lWcKYg0v3mv2LnnSegOQaTtlVDODU0vtw_s6iKU5IqQ,122
|
16
|
-
fabricatio/journal.py,sha256=siqimKF0M_QaaOCMxtjr_BJVNyUIAQWILzE9Q4T6-7c,781
|
17
|
-
fabricatio/models/action.py,sha256=NpklAVUHYO5JIY9YLwYowZ-U8R9CFf5aC10DhLF7gxQ,5924
|
18
|
-
fabricatio/models/events.py,sha256=mrihNEFgQ5o7qFWja1z_qX8dnaTLwPBoJdVlzxQV5oM,2719
|
19
|
-
fabricatio/models/generic.py,sha256=WEjZ96rTyBjaBjkM6e8E4Pg_Naot4xWRvGJteqBiCCI,5133
|
20
|
-
fabricatio/models/kwargs_types.py,sha256=a-e7rdMZJi8xTBL_RLmTC9OPzI-Js7rlS689PR03VvA,1401
|
21
|
-
fabricatio/models/role.py,sha256=gYvleTeKUGDUNKPAC5B0EPMLC4jZ4vHsFHmHiVXkU6c,1830
|
22
|
-
fabricatio/models/task.py,sha256=M6jeDFE3jX6cNV9bdOwhjHqgBHI3FKtFLWcmlqhYgcs,11419
|
23
|
-
fabricatio/models/tool.py,sha256=WTFnpF6xZ1nJbmIOonLsGQcM-kkDCeZiAFqyil9xg2U,6988
|
24
|
-
fabricatio/models/usages.py,sha256=bzsTDrAekiQyIwKeWds5YdgsXk8qiZkD7OZdno1Q_Ck,28213
|
25
|
-
fabricatio/models/utils.py,sha256=mXea76bd4r2jy_zx74GM4t5kCvkMu0JTOaw_VGvTCxk,3952
|
26
|
-
fabricatio/parser.py,sha256=uLabsvF07wRKW1PoTGuGEENCx3P4mhmuO8JkmOEkKko,3522
|
27
|
-
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
|
-
fabricatio/toolboxes/arithmetic.py,sha256=WLqhY-Pikv11Y_0SGajwZx3WhsLNpHKf9drzAqOf_nY,1369
|
29
|
-
fabricatio/toolboxes/fs.py,sha256=YkNgon5-bvCiPVEND9971W-6wj8btKNL6nGry2otn9I,498
|
30
|
-
fabricatio/toolboxes/task.py,sha256=kU4a501awIDV7GwNDuSlK3_Ym-5OhCp5sS-insTmUmQ,269
|
31
|
-
fabricatio/toolboxes/__init__.py,sha256=b13KmASO8q5fBLwew964fn9oH86ER5g-S1PgA4fZ_xs,482
|
32
|
-
fabricatio/_rust.pyi,sha256=0wCqtwWkVxxoqprvk8T27T8QYKIAKHS7xgsmdMNjQKc,1756
|
33
|
-
fabricatio/_rust_instances.py,sha256=dl0-yZ4UvT5g20tQgnPJpmqtkjFGXNG_YK4eLfi_ugQ,279
|
34
|
-
fabricatio/__init__.py,sha256=5MAnDTbECGJUBwv2_Hg40zCuWgPVTFR34wzu9EqrwXc,1246
|
35
|
-
fabricatio/_rust.cp312-win_amd64.pyd,sha256=EedusrQbVZW1_gQ8NhTCcyNdhopSOEJOKAxU9hB6AWU,1264128
|
36
|
-
fabricatio-0.2.3.dev3.data/scripts/tdown.exe,sha256=19y_6dFzSkW1wYvplySjLMz6KqUgV6-nZzl2smJkyXQ,3397632
|
37
|
-
fabricatio-0.2.3.dev3.dist-info/RECORD,,
|
File without changes
|
File without changes
|