fabricatio 0.2.6.dev0__cp312-cp312-win_amd64.whl → 0.2.6.dev1__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 +6 -6
- fabricatio/_rust.cp312-win_amd64.pyd +0 -0
- fabricatio/_rust_instances.py +1 -1
- fabricatio/capabilities/correct.py +103 -0
- fabricatio/capabilities/rag.py +3 -3
- fabricatio/capabilities/rating.py +8 -8
- fabricatio/capabilities/review.py +53 -16
- fabricatio/capabilities/task.py +2 -2
- fabricatio/config.py +14 -5
- fabricatio/fs/__init__.py +2 -2
- fabricatio/fs/readers.py +1 -1
- fabricatio/journal.py +0 -7
- fabricatio/models/action.py +2 -2
- fabricatio/models/generic.py +14 -6
- fabricatio/models/kwargs_types.py +2 -2
- fabricatio/models/role.py +2 -2
- fabricatio/models/task.py +2 -2
- fabricatio/models/usages.py +26 -6
- fabricatio/models/utils.py +21 -0
- fabricatio/parser.py +13 -5
- {fabricatio-0.2.6.dev0.data → fabricatio-0.2.6.dev1.data}/scripts/tdown.exe +0 -0
- {fabricatio-0.2.6.dev0.dist-info → fabricatio-0.2.6.dev1.dist-info}/METADATA +3 -3
- fabricatio-0.2.6.dev1.dist-info/RECORD +42 -0
- fabricatio-0.2.6.dev0.dist-info/RECORD +0 -41
- {fabricatio-0.2.6.dev0.dist-info → fabricatio-0.2.6.dev1.dist-info}/WHEEL +0 -0
- {fabricatio-0.2.6.dev0.dist-info → fabricatio-0.2.6.dev1.dist-info}/licenses/LICENSE +0 -0
fabricatio/__init__.py
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
from importlib.util import find_spec
|
4
4
|
|
5
5
|
from fabricatio._rust import BibManager
|
6
|
-
from fabricatio._rust_instances import
|
6
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
7
7
|
from fabricatio.actions.article import ExtractArticleEssence, GenerateArticleProposal, GenerateOutline
|
8
8
|
from fabricatio.actions.output import DumpFinalizedOutput
|
9
9
|
from fabricatio.core import env
|
10
|
-
from fabricatio.fs import
|
10
|
+
from fabricatio.fs import MAGIKA, safe_json_read, safe_text_read
|
11
11
|
from fabricatio.journal import logger
|
12
12
|
from fabricatio.models.action import Action, WorkFlow
|
13
13
|
from fabricatio.models.events import Event
|
@@ -16,21 +16,23 @@ from fabricatio.models.role import Role
|
|
16
16
|
from fabricatio.models.task import Task
|
17
17
|
from fabricatio.models.tool import ToolBox
|
18
18
|
from fabricatio.models.utils import Message, Messages
|
19
|
-
from fabricatio.parser import Capture,
|
19
|
+
from fabricatio.parser import Capture, GenericCapture, JsonCapture, PythonCapture
|
20
20
|
from fabricatio.toolboxes import arithmetic_toolbox, basic_toolboxes, fs_toolbox
|
21
21
|
from fabricatio.workflows.articles import WriteOutlineWorkFlow
|
22
22
|
|
23
23
|
__all__ = [
|
24
|
+
"MAGIKA",
|
25
|
+
"TEMPLATE_MANAGER",
|
24
26
|
"Action",
|
25
27
|
"ArticleEssence",
|
26
28
|
"BibManager",
|
27
29
|
"Capture",
|
28
|
-
"CodeBlockCapture",
|
29
30
|
"DumpFinalizedOutput",
|
30
31
|
"Event",
|
31
32
|
"ExtractArticleEssence",
|
32
33
|
"GenerateArticleProposal",
|
33
34
|
"GenerateOutline",
|
35
|
+
"GenericCapture",
|
34
36
|
"JsonCapture",
|
35
37
|
"Message",
|
36
38
|
"Messages",
|
@@ -45,10 +47,8 @@ __all__ = [
|
|
45
47
|
"env",
|
46
48
|
"fs_toolbox",
|
47
49
|
"logger",
|
48
|
-
"magika",
|
49
50
|
"safe_json_read",
|
50
51
|
"safe_text_read",
|
51
|
-
"template_manager",
|
52
52
|
]
|
53
53
|
|
54
54
|
|
Binary file
|
fabricatio/_rust_instances.py
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
from fabricatio._rust import TemplateManager
|
4
4
|
from fabricatio.config import configs
|
5
5
|
|
6
|
-
|
6
|
+
TEMPLATE_MANAGER = TemplateManager(
|
7
7
|
template_dirs=configs.templates.template_dir,
|
8
8
|
suffix=configs.templates.template_suffix,
|
9
9
|
active_loading=configs.templates.active_loading,
|
@@ -0,0 +1,103 @@
|
|
1
|
+
"""Correct capability module providing advanced review and validation functionality.
|
2
|
+
|
3
|
+
This module implements the Correct capability, which extends the Review functionality
|
4
|
+
to provide mechanisms for reviewing, validating, and correcting various objects and tasks
|
5
|
+
based on predefined criteria and templates.
|
6
|
+
"""
|
7
|
+
|
8
|
+
from typing import Optional, Unpack
|
9
|
+
|
10
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
11
|
+
from fabricatio.capabilities.review import Review, ReviewResult
|
12
|
+
from fabricatio.config import configs
|
13
|
+
from fabricatio.models.generic import Display, ProposedAble, WithBriefing
|
14
|
+
from fabricatio.models.kwargs_types import ReviewKwargs
|
15
|
+
from fabricatio.models.task import Task
|
16
|
+
|
17
|
+
|
18
|
+
class Correct(Review):
|
19
|
+
"""Correct capability for reviewing, validating, and improving objects.
|
20
|
+
|
21
|
+
This class enhances the Review capability with specialized functionality for
|
22
|
+
correcting and improving objects based on review feedback. It can process
|
23
|
+
various inputs including tasks, strings, and generic objects that implement
|
24
|
+
the required interfaces, applying corrections based on templated review processes.
|
25
|
+
"""
|
26
|
+
|
27
|
+
async def correct_obj[M: ProposedAble](
|
28
|
+
self, obj: M, **kwargs: Unpack[ReviewKwargs[ReviewResult[str]]]
|
29
|
+
) -> Optional[M]:
|
30
|
+
"""Review and correct an object based on defined criteria and templates.
|
31
|
+
|
32
|
+
This method first conducts a review of the given object, then uses the review results
|
33
|
+
to generate a corrected version of the object using appropriate templates.
|
34
|
+
|
35
|
+
Args:
|
36
|
+
obj (M): The object to be reviewed and corrected. Must implement ProposedAble.
|
37
|
+
**kwargs: Review configuration parameters including criteria and review options.
|
38
|
+
|
39
|
+
Returns:
|
40
|
+
Optional[M]: A corrected version of the input object, or None if correction fails.
|
41
|
+
|
42
|
+
Raises:
|
43
|
+
TypeError: If the provided object doesn't implement Display or WithBriefing interfaces.
|
44
|
+
"""
|
45
|
+
if not isinstance(obj, (Display, WithBriefing)):
|
46
|
+
raise TypeError(f"Expected Display or WithBriefing, got {type(obj)}")
|
47
|
+
review_res = await self.review_obj(obj, **kwargs)
|
48
|
+
await review_res.supervisor_check()
|
49
|
+
if "default" in kwargs:
|
50
|
+
kwargs["default"] = None
|
51
|
+
return await self.propose(
|
52
|
+
obj.__class__,
|
53
|
+
TEMPLATE_MANAGER.render_template(
|
54
|
+
configs.templates.correct_template,
|
55
|
+
{
|
56
|
+
"content": obj.display() if isinstance(obj, Display) else obj.briefing,
|
57
|
+
"review": review_res.display(),
|
58
|
+
},
|
59
|
+
),
|
60
|
+
**kwargs,
|
61
|
+
)
|
62
|
+
|
63
|
+
async def correct_string(self, input_text: str, **kwargs: Unpack[ReviewKwargs[ReviewResult[str]]]) -> Optional[str]:
|
64
|
+
"""Review and correct a string based on defined criteria and templates.
|
65
|
+
|
66
|
+
This method applies the review process to the input text and generates
|
67
|
+
a corrected version based on the review results.
|
68
|
+
|
69
|
+
Args:
|
70
|
+
input_text (str): The text content to be reviewed and corrected.
|
71
|
+
**kwargs: Review configuration parameters including criteria and review options.
|
72
|
+
|
73
|
+
Returns:
|
74
|
+
Optional[str]: The corrected text content, or None if correction fails.
|
75
|
+
"""
|
76
|
+
review_res = await self.review_string(input_text, **kwargs)
|
77
|
+
await review_res.supervisor_check()
|
78
|
+
|
79
|
+
if "default" in kwargs:
|
80
|
+
kwargs["default"] = None
|
81
|
+
return await self.ageneric_string(
|
82
|
+
TEMPLATE_MANAGER.render_template(
|
83
|
+
configs.templates.correct_template, {"content": input_text, "review": review_res.display()}
|
84
|
+
),
|
85
|
+
**kwargs,
|
86
|
+
)
|
87
|
+
|
88
|
+
async def correct_task[T](
|
89
|
+
self, task: Task[T], **kwargs: Unpack[ReviewKwargs[ReviewResult[str]]]
|
90
|
+
) -> Optional[Task[T]]:
|
91
|
+
"""Review and correct a task object based on defined criteria.
|
92
|
+
|
93
|
+
This is a specialized version of correct_obj specifically for Task objects,
|
94
|
+
applying the same review and correction process to task definitions.
|
95
|
+
|
96
|
+
Args:
|
97
|
+
task (Task[T]): The task to be reviewed and corrected.
|
98
|
+
**kwargs: Review configuration parameters including criteria and review options.
|
99
|
+
|
100
|
+
Returns:
|
101
|
+
Optional[Task[T]]: The corrected task, or None if correction fails.
|
102
|
+
"""
|
103
|
+
return await self.correct_obj(task, **kwargs)
|
fabricatio/capabilities/rag.py
CHANGED
@@ -10,7 +10,7 @@ from os import PathLike
|
|
10
10
|
from pathlib import Path
|
11
11
|
from typing import Any, Callable, Dict, List, Optional, Self, Union, Unpack, cast, overload
|
12
12
|
|
13
|
-
from fabricatio._rust_instances import
|
13
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
14
14
|
from fabricatio.config import configs
|
15
15
|
from fabricatio.journal import logger
|
16
16
|
from fabricatio.models.kwargs_types import (
|
@@ -306,7 +306,7 @@ class RAG(EmbeddingUsage):
|
|
306
306
|
similarity_threshold=similarity_threshold,
|
307
307
|
)
|
308
308
|
|
309
|
-
rendered =
|
309
|
+
rendered = TEMPLATE_MANAGER.render_template(configs.templates.retrieved_display_template, {"docs": docs[::-1]})
|
310
310
|
|
311
311
|
logger.debug(f"Retrieved Documents: \n{rendered}")
|
312
312
|
return await self.aask(
|
@@ -326,7 +326,7 @@ class RAG(EmbeddingUsage):
|
|
326
326
|
List[str]: A list of refined questions.
|
327
327
|
"""
|
328
328
|
return await self.aliststr(
|
329
|
-
|
329
|
+
TEMPLATE_MANAGER.render_template(
|
330
330
|
configs.templates.refined_query_template,
|
331
331
|
{"question": [question] if isinstance(question, str) else question},
|
332
332
|
),
|
@@ -4,7 +4,7 @@ from itertools import permutations
|
|
4
4
|
from random import sample
|
5
5
|
from typing import Dict, List, Optional, Set, Tuple, Union, Unpack, overload
|
6
6
|
|
7
|
-
from fabricatio._rust_instances import
|
7
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
8
8
|
from fabricatio.config import configs
|
9
9
|
from fabricatio.journal import logger
|
10
10
|
from fabricatio.models.generic import WithBriefing
|
@@ -53,7 +53,7 @@ class GiveRating(WithBriefing, LLMUsage):
|
|
53
53
|
logger.info(f"Rating for {to_rate}")
|
54
54
|
return await self.aask_validate(
|
55
55
|
question=(
|
56
|
-
|
56
|
+
TEMPLATE_MANAGER.render_template(
|
57
57
|
configs.templates.rate_fine_grind_template,
|
58
58
|
{
|
59
59
|
"to_rate": to_rate,
|
@@ -65,7 +65,7 @@ class GiveRating(WithBriefing, LLMUsage):
|
|
65
65
|
)
|
66
66
|
if isinstance(to_rate, str)
|
67
67
|
else [
|
68
|
-
|
68
|
+
TEMPLATE_MANAGER.render_template(
|
69
69
|
configs.templates.rate_fine_grind_template,
|
70
70
|
{
|
71
71
|
"to_rate": item,
|
@@ -150,7 +150,7 @@ class GiveRating(WithBriefing, LLMUsage):
|
|
150
150
|
|
151
151
|
return await self.aask_validate(
|
152
152
|
question=(
|
153
|
-
|
153
|
+
TEMPLATE_MANAGER.render_template(
|
154
154
|
configs.templates.draft_rating_manual_template,
|
155
155
|
{
|
156
156
|
"topic": topic,
|
@@ -180,7 +180,7 @@ class GiveRating(WithBriefing, LLMUsage):
|
|
180
180
|
"""
|
181
181
|
return await self.aask_validate(
|
182
182
|
question=(
|
183
|
-
|
183
|
+
TEMPLATE_MANAGER.render_template(
|
184
184
|
configs.templates.draft_rating_criteria_template,
|
185
185
|
{
|
186
186
|
"topic": topic,
|
@@ -230,7 +230,7 @@ class GiveRating(WithBriefing, LLMUsage):
|
|
230
230
|
reasons = flatten(
|
231
231
|
await self.aask_validate(
|
232
232
|
question=[
|
233
|
-
|
233
|
+
TEMPLATE_MANAGER.render_template(
|
234
234
|
configs.templates.extract_reasons_from_examples_template,
|
235
235
|
{
|
236
236
|
"topic": topic,
|
@@ -250,7 +250,7 @@ class GiveRating(WithBriefing, LLMUsage):
|
|
250
250
|
# extract certain mount of criteria from reasons according to their importance and frequency
|
251
251
|
return await self.aask_validate(
|
252
252
|
question=(
|
253
|
-
|
253
|
+
TEMPLATE_MANAGER.render_template(
|
254
254
|
configs.templates.extract_criteria_from_reasons_template,
|
255
255
|
{
|
256
256
|
"topic": topic,
|
@@ -290,7 +290,7 @@ class GiveRating(WithBriefing, LLMUsage):
|
|
290
290
|
# get the importance multiplier indicating how important is second criterion compared to the first one
|
291
291
|
relative_weights = await self.aask_validate(
|
292
292
|
question=[
|
293
|
-
|
293
|
+
TEMPLATE_MANAGER.render_template(
|
294
294
|
configs.templates.draft_rating_weights_klee_template,
|
295
295
|
{
|
296
296
|
"topic": topic,
|
@@ -2,15 +2,17 @@
|
|
2
2
|
|
3
3
|
from typing import List, Optional, Self, Set, Unpack, cast
|
4
4
|
|
5
|
-
from fabricatio import
|
5
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
6
6
|
from fabricatio.capabilities.propose import Propose
|
7
7
|
from fabricatio.capabilities.rating import GiveRating
|
8
8
|
from fabricatio.config import configs
|
9
9
|
from fabricatio.models.generic import Base, Display, ProposedAble, WithBriefing
|
10
10
|
from fabricatio.models.kwargs_types import ReviewKwargs, ValidateKwargs
|
11
11
|
from fabricatio.models.task import Task
|
12
|
-
from
|
13
|
-
from
|
12
|
+
from fabricatio.models.utils import ask_edit
|
13
|
+
from questionary import Choice, checkbox, text
|
14
|
+
from questionary import print as q_print
|
15
|
+
from rich import print as r_print
|
14
16
|
|
15
17
|
|
16
18
|
class ProblemSolutions(Base):
|
@@ -53,6 +55,25 @@ class ProblemSolutions(Base):
|
|
53
55
|
self.solutions = solutions
|
54
56
|
return self
|
55
57
|
|
58
|
+
async def edit_problem(self) -> Self:
|
59
|
+
"""Interactively edit the problem description using a prompt.
|
60
|
+
|
61
|
+
Returns:
|
62
|
+
Self: The current instance with updated problem description.
|
63
|
+
"""
|
64
|
+
self.problem = await text("Please edit the problem below:", default=self.problem).ask_async()
|
65
|
+
return self
|
66
|
+
|
67
|
+
async def edit_solutions(self) -> Self:
|
68
|
+
"""Interactively edit the list of potential solutions using a prompt.
|
69
|
+
|
70
|
+
Returns:
|
71
|
+
Self: The current instance with updated solutions.
|
72
|
+
"""
|
73
|
+
q_print(self.problem, style="bold cyan")
|
74
|
+
self.solutions = await ask_edit(self.solutions)
|
75
|
+
return self
|
76
|
+
|
56
77
|
|
57
78
|
class ReviewResult[T](ProposedAble, Display):
|
58
79
|
"""Represents the outcome of a review process with identified problems and solutions.
|
@@ -110,7 +131,7 @@ class ReviewResult[T](ProposedAble, Display):
|
|
110
131
|
"""
|
111
132
|
return self._ref
|
112
133
|
|
113
|
-
async def supervisor_check(self, check_solutions: bool =
|
134
|
+
async def supervisor_check(self, check_solutions: bool = True) -> Self:
|
114
135
|
"""Perform an interactive review session to filter problems and solutions.
|
115
136
|
|
116
137
|
Presents an interactive prompt allowing a supervisor to select which
|
@@ -132,23 +153,25 @@ class ReviewResult[T](ProposedAble, Display):
|
|
132
153
|
else:
|
133
154
|
raise TypeError(f"Unsupported type for review: {type(self._ref)}")
|
134
155
|
# Choose the problems to retain
|
135
|
-
|
156
|
+
r_print(display)
|
136
157
|
chosen_ones: List[ProblemSolutions] = await checkbox(
|
137
158
|
f"Please choose the problems you want to retain.(Default: retain all)\n\t`{self.review_topic}`",
|
138
159
|
choices=[Choice(p.problem, p, checked=True) for p in self.problem_solutions],
|
139
160
|
).ask_async()
|
161
|
+
self.problem_solutions = [await p.edit_problem() for p in chosen_ones]
|
140
162
|
if not check_solutions:
|
141
|
-
self.problem_solutions = chosen_ones
|
142
163
|
return self
|
143
164
|
|
144
165
|
# Choose the solutions to retain
|
145
|
-
for to_exam in
|
166
|
+
for to_exam in self.problem_solutions:
|
146
167
|
to_exam.update_solutions(
|
147
168
|
await checkbox(
|
148
169
|
f"Please choose the solutions you want to retain.(Default: retain all)\n\t`{to_exam.problem}`",
|
149
170
|
choices=[Choice(s, s, checked=True) for s in to_exam.solutions],
|
150
171
|
).ask_async()
|
151
172
|
)
|
173
|
+
await to_exam.edit_solutions()
|
174
|
+
|
152
175
|
return self
|
153
176
|
|
154
177
|
|
@@ -181,7 +204,7 @@ class Review(GiveRating, Propose):
|
|
181
204
|
|
182
205
|
async def review_string(
|
183
206
|
self,
|
184
|
-
|
207
|
+
input_text: str,
|
185
208
|
topic: str,
|
186
209
|
criteria: Optional[Set[str]] = None,
|
187
210
|
**kwargs: Unpack[ValidateKwargs[ReviewResult[str]]],
|
@@ -192,7 +215,7 @@ class Review(GiveRating, Propose):
|
|
192
215
|
based on the given topic and criteria.
|
193
216
|
|
194
217
|
Args:
|
195
|
-
|
218
|
+
input_text (str): The text content to be reviewed.
|
196
219
|
topic (str): The subject topic for the review criteria.
|
197
220
|
criteria (Optional[Set[str]], optional): A set of criteria for the review.
|
198
221
|
If not provided, criteria will be drafted automatically. Defaults to None.
|
@@ -202,18 +225,32 @@ class Review(GiveRating, Propose):
|
|
202
225
|
ReviewResult[str]: A review result containing identified problems and proposed solutions,
|
203
226
|
with a reference to the original text.
|
204
227
|
"""
|
205
|
-
|
206
|
-
|
207
|
-
|
228
|
+
default = None
|
229
|
+
if "default" in kwargs:
|
230
|
+
default = kwargs.pop("default")
|
231
|
+
|
232
|
+
criteria = criteria or (await self.draft_rating_criteria(topic, **kwargs))
|
233
|
+
if not criteria:
|
234
|
+
raise ValueError("No criteria provided for review.")
|
235
|
+
manual = await self.draft_rating_manual(topic, criteria, **kwargs)
|
236
|
+
|
237
|
+
if default is not None:
|
238
|
+
kwargs["default"] = default
|
239
|
+
res = await self.propose(
|
208
240
|
ReviewResult,
|
209
|
-
|
210
|
-
configs.templates.review_string_template,
|
241
|
+
TEMPLATE_MANAGER.render_template(
|
242
|
+
configs.templates.review_string_template,
|
243
|
+
{"text": input_text, "topic": topic, "criteria_manual": manual},
|
211
244
|
),
|
212
245
|
**kwargs,
|
213
246
|
)
|
214
|
-
|
247
|
+
if not res:
|
248
|
+
raise ValueError("Failed to generate review result.")
|
249
|
+
return res.update_ref(input_text).update_topic(topic)
|
215
250
|
|
216
|
-
async def review_obj[M: (Display, WithBriefing)](
|
251
|
+
async def review_obj[M: (Display, WithBriefing)](
|
252
|
+
self, obj: M, **kwargs: Unpack[ReviewKwargs[ReviewResult[str]]]
|
253
|
+
) -> ReviewResult[M]:
|
217
254
|
"""Review an object that implements Display or WithBriefing interface.
|
218
255
|
|
219
256
|
This method extracts displayable text from the object and performs a review
|
fabricatio/capabilities/task.py
CHANGED
@@ -4,7 +4,7 @@ from types import CodeType
|
|
4
4
|
from typing import Any, Dict, List, Optional, Tuple, Unpack, cast
|
5
5
|
|
6
6
|
import orjson
|
7
|
-
from fabricatio._rust_instances import
|
7
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
8
8
|
from fabricatio.capabilities.propose import Propose
|
9
9
|
from fabricatio.config import configs
|
10
10
|
from fabricatio.journal import logger
|
@@ -66,7 +66,7 @@ class HandleTask(WithBriefing, ToolBoxUsage):
|
|
66
66
|
|
67
67
|
return None
|
68
68
|
|
69
|
-
q =
|
69
|
+
q = TEMPLATE_MANAGER.render_template(
|
70
70
|
configs.templates.draft_tool_usage_code_template,
|
71
71
|
{
|
72
72
|
"data_module_name": configs.toolbox.data_module_name,
|
fabricatio/config.py
CHANGED
@@ -19,8 +19,6 @@ from pydantic import (
|
|
19
19
|
)
|
20
20
|
from pydantic_settings import (
|
21
21
|
BaseSettings,
|
22
|
-
DotEnvSettingsSource,
|
23
|
-
EnvSettingsSource,
|
24
22
|
PydanticBaseSettingsSource,
|
25
23
|
PyprojectTomlConfigSettingsSource,
|
26
24
|
SettingsConfigDict,
|
@@ -228,6 +226,12 @@ class TemplateConfig(BaseModel):
|
|
228
226
|
review_string_template: str = Field(default="review_string")
|
229
227
|
"""The name of the review string template which will be used to review a string."""
|
230
228
|
|
229
|
+
generic_string_template: str = Field(default="generic_string")
|
230
|
+
"""The name of the generic string template which will be used to review a string."""
|
231
|
+
|
232
|
+
correct_template: str = Field(default="correct")
|
233
|
+
"""The name of the correct template which will be used to correct a string."""
|
234
|
+
|
231
235
|
|
232
236
|
class MagikaConfig(BaseModel):
|
233
237
|
"""Magika configuration class."""
|
@@ -370,6 +374,9 @@ class Settings(BaseSettings):
|
|
370
374
|
) -> tuple[PydanticBaseSettingsSource, ...]:
|
371
375
|
"""Customize settings sources.
|
372
376
|
|
377
|
+
This method customizes the settings sources used by the application. It returns a tuple of settings sources, including
|
378
|
+
the dotenv settings source, environment settings source, a custom TomlConfigSettingsSource, and a custom
|
379
|
+
|
373
380
|
Args:
|
374
381
|
settings_cls (type[BaseSettings]): The settings class.
|
375
382
|
init_settings (PydanticBaseSettingsSource): Initial settings source.
|
@@ -381,10 +388,12 @@ class Settings(BaseSettings):
|
|
381
388
|
tuple[PydanticBaseSettingsSource, ...]: A tuple of settings sources.
|
382
389
|
"""
|
383
390
|
return (
|
384
|
-
|
385
|
-
|
386
|
-
|
391
|
+
init_settings,
|
392
|
+
dotenv_settings,
|
393
|
+
env_settings,
|
394
|
+
file_secret_settings,
|
387
395
|
PyprojectTomlConfigSettingsSource(settings_cls),
|
396
|
+
TomlConfigSettingsSource(settings_cls),
|
388
397
|
)
|
389
398
|
|
390
399
|
|
fabricatio/fs/__init__.py
CHANGED
@@ -11,9 +11,10 @@ from fabricatio.fs.curd import (
|
|
11
11
|
move_file,
|
12
12
|
tree,
|
13
13
|
)
|
14
|
-
from fabricatio.fs.readers import
|
14
|
+
from fabricatio.fs.readers import MAGIKA, safe_json_read, safe_text_read
|
15
15
|
|
16
16
|
__all__ = [
|
17
|
+
"MAGIKA",
|
17
18
|
"absolute_path",
|
18
19
|
"copy_file",
|
19
20
|
"create_directory",
|
@@ -21,7 +22,6 @@ __all__ = [
|
|
21
22
|
"delete_file",
|
22
23
|
"dump_text",
|
23
24
|
"gather_files",
|
24
|
-
"magika",
|
25
25
|
"move_file",
|
26
26
|
"safe_json_read",
|
27
27
|
"safe_text_read",
|
fabricatio/fs/readers.py
CHANGED
@@ -9,7 +9,7 @@ from magika import Magika
|
|
9
9
|
from fabricatio.config import configs
|
10
10
|
from fabricatio.journal import logger
|
11
11
|
|
12
|
-
|
12
|
+
MAGIKA = Magika(model_dir=configs.magika.model_dir)
|
13
13
|
|
14
14
|
|
15
15
|
def safe_text_read(path: Path | str) -> str:
|
fabricatio/journal.py
CHANGED
@@ -19,10 +19,3 @@ logger.add(
|
|
19
19
|
logger.add(sys.stderr, level=configs.debug.log_level)
|
20
20
|
|
21
21
|
__all__ = ["logger"]
|
22
|
-
if __name__ == "__main__":
|
23
|
-
logger.debug("This is a trace message.")
|
24
|
-
logger.info("This is an information message.")
|
25
|
-
logger.success("This is a success message.")
|
26
|
-
logger.warning("This is a warning message.")
|
27
|
-
logger.error("This is an error message.")
|
28
|
-
logger.critical("This is a critical message.")
|
fabricatio/models/action.py
CHANGED
@@ -5,7 +5,7 @@ from abc import abstractmethod
|
|
5
5
|
from asyncio import Queue, create_task
|
6
6
|
from typing import Any, Dict, Self, Tuple, Type, Union, final
|
7
7
|
|
8
|
-
from fabricatio.capabilities.
|
8
|
+
from fabricatio.capabilities.correct import Correct
|
9
9
|
from fabricatio.capabilities.task import HandleTask, ProposeTask
|
10
10
|
from fabricatio.journal import logger
|
11
11
|
from fabricatio.models.generic import WithBriefing
|
@@ -14,7 +14,7 @@ from fabricatio.models.usages import ToolBoxUsage
|
|
14
14
|
from pydantic import Field, PrivateAttr
|
15
15
|
|
16
16
|
|
17
|
-
class Action(HandleTask, ProposeTask,
|
17
|
+
class Action(HandleTask, ProposeTask, Correct):
|
18
18
|
"""Class that represents an action to be executed in a workflow."""
|
19
19
|
|
20
20
|
name: str = Field(default="")
|
fabricatio/models/generic.py
CHANGED
@@ -6,9 +6,9 @@ from typing import Any, Callable, Dict, Iterable, List, Optional, Self, Union, f
|
|
6
6
|
|
7
7
|
import orjson
|
8
8
|
from fabricatio._rust import blake3_hash
|
9
|
-
from fabricatio._rust_instances import
|
9
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
10
10
|
from fabricatio.config import configs
|
11
|
-
from fabricatio.fs.readers import
|
11
|
+
from fabricatio.fs.readers import MAGIKA, safe_text_read
|
12
12
|
from fabricatio.journal import logger
|
13
13
|
from fabricatio.parser import JsonCapture
|
14
14
|
from pydantic import (
|
@@ -40,6 +40,14 @@ class Display(Base):
|
|
40
40
|
"""
|
41
41
|
return self.model_dump_json(indent=1)
|
42
42
|
|
43
|
+
def compact(self) -> str:
|
44
|
+
"""Display the model in a compact JSON string.
|
45
|
+
|
46
|
+
Returns:
|
47
|
+
str: The compact JSON string of the model.
|
48
|
+
"""
|
49
|
+
return self.model_dump_json()
|
50
|
+
|
43
51
|
|
44
52
|
class Named(Base):
|
45
53
|
"""Class that includes a name attribute."""
|
@@ -118,12 +126,12 @@ class CreateJsonObjPrompt(WithFormatedJsonSchema):
|
|
118
126
|
str: The prompt for creating a JSON object with given requirement.
|
119
127
|
"""
|
120
128
|
if isinstance(requirement, str):
|
121
|
-
return
|
129
|
+
return TEMPLATE_MANAGER.render_template(
|
122
130
|
configs.templates.create_json_obj_template,
|
123
131
|
{"requirement": requirement, "json_schema": cls.formated_json_schema()},
|
124
132
|
)
|
125
133
|
return [
|
126
|
-
|
134
|
+
TEMPLATE_MANAGER.render_template(
|
127
135
|
configs.templates.create_json_obj_template,
|
128
136
|
{"requirement": r, "json_schema": cls.formated_json_schema()},
|
129
137
|
)
|
@@ -247,13 +255,13 @@ class WithDependency(Base):
|
|
247
255
|
Returns:
|
248
256
|
str: The generated prompt for the task.
|
249
257
|
"""
|
250
|
-
return
|
258
|
+
return TEMPLATE_MANAGER.render_template(
|
251
259
|
configs.templates.dependencies_template,
|
252
260
|
{
|
253
261
|
(pth := Path(p)).name: {
|
254
262
|
"path": pth.as_posix(),
|
255
263
|
"exists": pth.exists(),
|
256
|
-
"description": (identity :=
|
264
|
+
"description": (identity := MAGIKA.identify_path(pth)).output.description,
|
257
265
|
"size": f"{pth.stat().st_size / (1024 * 1024) if pth.exists() and pth.is_file() else 0:.3f} MB",
|
258
266
|
"content": (text := safe_text_read(pth)),
|
259
267
|
"lines": len(text.splitlines()),
|
@@ -12,7 +12,7 @@ class CollectionSimpleConfigKwargs(TypedDict, total=False):
|
|
12
12
|
These arguments are typically used when configuring connections to vector databases.
|
13
13
|
"""
|
14
14
|
|
15
|
-
dimension: int|None
|
15
|
+
dimension: int | None
|
16
16
|
timeout: float
|
17
17
|
|
18
18
|
|
@@ -23,7 +23,7 @@ class FetchKwargs(TypedDict, total=False):
|
|
23
23
|
and result limiting parameters.
|
24
24
|
"""
|
25
25
|
|
26
|
-
collection_name: str|None
|
26
|
+
collection_name: str | None
|
27
27
|
similarity_threshold: float
|
28
28
|
result_per_query: int
|
29
29
|
|
fabricatio/models/role.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from typing import Any, Self, Set
|
4
4
|
|
5
|
-
from fabricatio.capabilities.
|
5
|
+
from fabricatio.capabilities.correct import Correct
|
6
6
|
from fabricatio.capabilities.task import HandleTask, ProposeTask
|
7
7
|
from fabricatio.core import env
|
8
8
|
from fabricatio.journal import logger
|
@@ -12,7 +12,7 @@ from fabricatio.models.tool import ToolBox
|
|
12
12
|
from pydantic import Field
|
13
13
|
|
14
14
|
|
15
|
-
class Role(ProposeTask, HandleTask,
|
15
|
+
class Role(ProposeTask, HandleTask, Correct):
|
16
16
|
"""Class that represents a role with a registry of events and workflows."""
|
17
17
|
|
18
18
|
registry: dict[Event | str, WorkFlow] = Field(default_factory=dict)
|
fabricatio/models/task.py
CHANGED
@@ -6,7 +6,7 @@ It includes methods to manage the task's lifecycle, such as starting, finishing,
|
|
6
6
|
from asyncio import Queue
|
7
7
|
from typing import Any, List, Optional, Self
|
8
8
|
|
9
|
-
from fabricatio._rust_instances import
|
9
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
10
10
|
from fabricatio.config import configs
|
11
11
|
from fabricatio.core import env
|
12
12
|
from fabricatio.journal import logger
|
@@ -253,7 +253,7 @@ class Task[T](WithBriefing, ProposedAble, WithDependency):
|
|
253
253
|
Returns:
|
254
254
|
str: The briefing of the task.
|
255
255
|
"""
|
256
|
-
return
|
256
|
+
return TEMPLATE_MANAGER.render_template(
|
257
257
|
configs.templates.task_briefing_template,
|
258
258
|
self.model_dump(),
|
259
259
|
)
|
fabricatio/models/usages.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Callable, Dict, Iterable, List, Optional, Self, Sequence, Set
|
|
5
5
|
|
6
6
|
import asyncstdlib
|
7
7
|
import litellm
|
8
|
-
from fabricatio._rust_instances import
|
8
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
9
9
|
from fabricatio.config import configs
|
10
10
|
from fabricatio.journal import logger
|
11
11
|
from fabricatio.models.generic import ScopedConfig, WithBriefing
|
@@ -13,7 +13,7 @@ from fabricatio.models.kwargs_types import ChooseKwargs, EmbeddingKwargs, Genera
|
|
13
13
|
from fabricatio.models.task import Task
|
14
14
|
from fabricatio.models.tool import Tool, ToolBox
|
15
15
|
from fabricatio.models.utils import Messages
|
16
|
-
from fabricatio.parser import JsonCapture
|
16
|
+
from fabricatio.parser import GenericCapture, JsonCapture
|
17
17
|
from litellm import Router, stream_chunk_builder
|
18
18
|
from litellm.types.router import Deployment, LiteLLM_Params, ModelInfo
|
19
19
|
from litellm.types.utils import (
|
@@ -30,6 +30,7 @@ from pydantic import Field, NonNegativeInt, PositiveInt
|
|
30
30
|
if configs.cache.enabled and configs.cache.type:
|
31
31
|
litellm.enable_cache(type=configs.cache.type, **configs.cache.params)
|
32
32
|
logger.success(f"{configs.cache.type.name} Cache enabled")
|
33
|
+
|
33
34
|
ROUTER = Router(
|
34
35
|
routing_strategy="usage-based-routing-v2",
|
35
36
|
allowed_fails=configs.routing.allowed_fails,
|
@@ -301,7 +302,7 @@ class LLMUsage(ScopedConfig):
|
|
301
302
|
List[str]: The validated response as a list of strings.
|
302
303
|
"""
|
303
304
|
return await self.aask_validate(
|
304
|
-
|
305
|
+
TEMPLATE_MANAGER.render_template(
|
305
306
|
configs.templates.liststr_template,
|
306
307
|
{"requirement": requirement, "k": k},
|
307
308
|
),
|
@@ -320,7 +321,7 @@ class LLMUsage(ScopedConfig):
|
|
320
321
|
List[str]: The validated response as a list of strings.
|
321
322
|
"""
|
322
323
|
return await self.aliststr(
|
323
|
-
|
324
|
+
TEMPLATE_MANAGER.render_template(
|
324
325
|
configs.templates.pathstr_template,
|
325
326
|
{"requirement": requirement},
|
326
327
|
),
|
@@ -345,6 +346,25 @@ class LLMUsage(ScopedConfig):
|
|
345
346
|
)
|
346
347
|
).pop()
|
347
348
|
|
349
|
+
async def ageneric_string(self, requirement: str, **kwargs: Unpack[ValidateKwargs[str]]) -> str:
|
350
|
+
"""Asynchronously generates a generic string based on a given requirement.
|
351
|
+
|
352
|
+
Args:
|
353
|
+
requirement (str): The requirement for the string.
|
354
|
+
**kwargs (Unpack[GenerateKwargs]): Additional keyword arguments for the LLM usage.
|
355
|
+
|
356
|
+
Returns:
|
357
|
+
str: The generated string.
|
358
|
+
"""
|
359
|
+
return await self.aask_validate(
|
360
|
+
TEMPLATE_MANAGER.render_template(
|
361
|
+
configs.templates.generic_string_template,
|
362
|
+
{"requirement": requirement, "language": GenericCapture.capture_type},
|
363
|
+
),
|
364
|
+
validator=lambda resp: GenericCapture.capture(resp),
|
365
|
+
**kwargs,
|
366
|
+
)
|
367
|
+
|
348
368
|
async def achoose[T: WithBriefing](
|
349
369
|
self,
|
350
370
|
instruction: str,
|
@@ -371,7 +391,7 @@ class LLMUsage(ScopedConfig):
|
|
371
391
|
if dup := duplicates_everseen(choices, key=lambda x: x.name):
|
372
392
|
logger.error(err := f"Redundant choices: {dup}")
|
373
393
|
raise ValueError(err)
|
374
|
-
prompt =
|
394
|
+
prompt = TEMPLATE_MANAGER.render_template(
|
375
395
|
configs.templates.make_choice_template,
|
376
396
|
{
|
377
397
|
"instruction": instruction,
|
@@ -444,7 +464,7 @@ class LLMUsage(ScopedConfig):
|
|
444
464
|
bool: The judgment result (True or False) based on the AI's response.
|
445
465
|
"""
|
446
466
|
return await self.aask_validate(
|
447
|
-
question=
|
467
|
+
question=TEMPLATE_MANAGER.render_template(
|
448
468
|
configs.templates.make_judgment_template,
|
449
469
|
{"prompt": prompt, "affirm_case": affirm_case, "deny_case": deny_case},
|
450
470
|
),
|
fabricatio/models/utils.py
CHANGED
@@ -4,6 +4,7 @@ from enum import Enum
|
|
4
4
|
from typing import Any, Dict, List, Literal, Optional, Self
|
5
5
|
|
6
6
|
from pydantic import BaseModel, ConfigDict, Field
|
7
|
+
from questionary import text
|
7
8
|
|
8
9
|
|
9
10
|
class Message(BaseModel):
|
@@ -144,3 +145,23 @@ class TaskStatus(Enum):
|
|
144
145
|
Finished = "finished"
|
145
146
|
Failed = "failed"
|
146
147
|
Cancelled = "cancelled"
|
148
|
+
|
149
|
+
|
150
|
+
async def ask_edit(
|
151
|
+
text_seq: List[str],
|
152
|
+
) -> List[str]:
|
153
|
+
"""Asks the user to edit a list of texts.
|
154
|
+
|
155
|
+
Args:
|
156
|
+
text_seq (List[str]): A list of texts to be edited.
|
157
|
+
|
158
|
+
Returns:
|
159
|
+
List[str]: A list of edited texts.
|
160
|
+
If the user does not edit a text, it will not be included in the returned list.
|
161
|
+
"""
|
162
|
+
res = []
|
163
|
+
for i, t in enumerate(text_seq):
|
164
|
+
edited = await text(f"[{i}] ", default=t).ask_async()
|
165
|
+
if edited:
|
166
|
+
res.append(edited)
|
167
|
+
return res
|
fabricatio/parser.py
CHANGED
@@ -35,7 +35,7 @@ class Capture(BaseModel):
|
|
35
35
|
"""Initialize the compiled pattern."""
|
36
36
|
self._compiled = compile(self.pattern, self.flags)
|
37
37
|
|
38
|
-
def fix[T](self, text: str | Iterable[str]|T) -> str | List[str]|T:
|
38
|
+
def fix[T](self, text: str | Iterable[str] | T) -> str | List[str] | T:
|
39
39
|
"""Fix the text using the pattern.
|
40
40
|
|
41
41
|
Args:
|
@@ -47,8 +47,8 @@ class Capture(BaseModel):
|
|
47
47
|
match self.capture_type:
|
48
48
|
case "json":
|
49
49
|
if isinstance(text, str):
|
50
|
-
return repair_json(text,ensure_ascii=False)
|
51
|
-
return [repair_json(item) for item in text]
|
50
|
+
return repair_json(text, ensure_ascii=False)
|
51
|
+
return [repair_json(item, ensure_ascii=False) for item in text]
|
52
52
|
case _:
|
53
53
|
return text
|
54
54
|
|
@@ -134,8 +134,16 @@ class Capture(BaseModel):
|
|
134
134
|
"""
|
135
135
|
return cls(pattern=f"```{language}\n(.*?)\n```", capture_type=language)
|
136
136
|
|
137
|
+
@classmethod
|
138
|
+
def capture_generic_block(cls, language: str) -> Self:
|
139
|
+
"""Capture the first occurrence of a generic code block in the given text.
|
140
|
+
|
141
|
+
Returns:
|
142
|
+
Self: The instance of the class with the captured code block.
|
143
|
+
"""
|
144
|
+
return cls(pattern=f"--- Start of {language} ---\n(.*?)\n--- end of {language} ---", capture_type=language)
|
145
|
+
|
137
146
|
|
138
147
|
JsonCapture = Capture.capture_code_block("json")
|
139
148
|
PythonCapture = Capture.capture_code_block("python")
|
140
|
-
|
141
|
-
CodeBlockCapture = Capture(pattern="```.*?\n(.*?)\n```")
|
149
|
+
GenericCapture = Capture.capture_generic_block("String")
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fabricatio
|
3
|
-
Version: 0.2.6.
|
3
|
+
Version: 0.2.6.dev1
|
4
4
|
Classifier: License :: OSI Approved :: MIT License
|
5
5
|
Classifier: Programming Language :: Rust
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -176,7 +176,7 @@ if __name__ == "__main__":
|
|
176
176
|
### Template Management and Rendering
|
177
177
|
|
178
178
|
```python
|
179
|
-
from fabricatio._rust_instances import
|
179
|
+
from fabricatio._rust_instances import TEMPLATE_MANAGER
|
180
180
|
|
181
181
|
template_name = "claude-xml.hbs"
|
182
182
|
data = {
|
@@ -185,7 +185,7 @@ data = {
|
|
185
185
|
"files": [{"path": "file1.py", "code": "print('Hello')"}],
|
186
186
|
}
|
187
187
|
|
188
|
-
rendered_template =
|
188
|
+
rendered_template = TEMPLATE_MANAGER.render_template(template_name, data)
|
189
189
|
print(rendered_template)
|
190
190
|
```
|
191
191
|
|
@@ -0,0 +1,42 @@
|
|
1
|
+
fabricatio-0.2.6.dev1.dist-info/METADATA,sha256=BSySyhuAwgYRJFDSx2zlSSpAICPoplPXW3G4tHd0JnA,8896
|
2
|
+
fabricatio-0.2.6.dev1.dist-info/WHEEL,sha256=tpW5AN9B-9qsM9WW2FXG2r193YXiqexDadpKp0A2daI,96
|
3
|
+
fabricatio-0.2.6.dev1.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
4
|
+
fabricatio/actions/article.py,sha256=yzRwgc203vI3MW_oWyFybDxTz6kaBBvUgN2zOJJ9Amc,2825
|
5
|
+
fabricatio/actions/output.py,sha256=KSSLvEvXsA10ACN2mbqGo98QwKLVUAoMUJNKYk6HhGc,645
|
6
|
+
fabricatio/actions/rag.py,sha256=GpT7YlqOYznZyaT-6Y84_33HtZGT-5s71ZK8iroQA9g,813
|
7
|
+
fabricatio/capabilities/correct.py,sha256=QslmBYcpblSykZmjxr0vLgyfU0uGKOcwRxUYJZ9-jBc,4527
|
8
|
+
fabricatio/capabilities/propose.py,sha256=y3kge5g6bb8HYuV8e9h4MdqOMTlsfAIZpqE_cagWPTY,1593
|
9
|
+
fabricatio/capabilities/rag.py,sha256=OebdGps8LGniN_HkRAOuwZd1ZQsyQe3WrduNAmBSxLM,15773
|
10
|
+
fabricatio/capabilities/rating.py,sha256=R9otyZVE2E3kKxrOCTZMeesBCPbC-fSb7bXgZPMQzfU,14406
|
11
|
+
fabricatio/capabilities/review.py,sha256=XYzpSnFCT9HS2XytQT8HDgV4SjXehexoJgucZFMx6P8,11102
|
12
|
+
fabricatio/capabilities/task.py,sha256=nVsC8smZRM5kGnIDiQtgP9kiGkz5KB1S9NXhMvwY2CQ,4607
|
13
|
+
fabricatio/config.py,sha256=bpj8i0KT8HQ9ka2kX3lcILBWh4S5_PenCas9wu_Ueg0,16302
|
14
|
+
fabricatio/core.py,sha256=VQ_JKgUGIy2gZ8xsTBZCdr_IP7wC5aPg0_bsOmjQ588,6458
|
15
|
+
fabricatio/decorators.py,sha256=uzsP4tFKQNjDHBkofsjjoJA0IUAaYOtt6YVedoyOqlo,6551
|
16
|
+
fabricatio/fs/curd.py,sha256=N6l2MncjrFfnXBRtteRouXp5Rjy8EAKC_i29_G-zz98,4618
|
17
|
+
fabricatio/fs/readers.py,sha256=EZKN_AZdrp8DggJECP53QHw3uHeSDf-AwCAA_V7fNKU,1202
|
18
|
+
fabricatio/fs/__init__.py,sha256=PCf0s_9KDjVfNw7AfPoJzGt3jMq4gJOfbcT4pb0D0ZY,588
|
19
|
+
fabricatio/journal.py,sha256=stnEP88aUBA_GmU9gfTF2EZI8FS2OyMLGaMSTgK4QgA,476
|
20
|
+
fabricatio/models/action.py,sha256=25kaph3csV0VQtxVPQCyRAusgwp6E1R1g4KBs7H9T2c,6448
|
21
|
+
fabricatio/models/events.py,sha256=QvlnS8FEELg6KNabcJMeh2GV_y0ZBzKOPphcteKYWYU,4183
|
22
|
+
fabricatio/models/extra.py,sha256=O8ncZVsaNmlR5f8c_b2HJc-yVZQ2YhB6ddDbfT0Ysh4,7412
|
23
|
+
fabricatio/models/generic.py,sha256=IdPJMf3qxZFq8yqd6OuAYKfCM0wBlJkozgxvxQZVEEc,14025
|
24
|
+
fabricatio/models/kwargs_types.py,sha256=jTXgCti-3AyPJwea7g4FxBdsbIwD7jnusi0VhhEhSGo,4286
|
25
|
+
fabricatio/models/role.py,sha256=7S3HSjFLaSTZ5bzgTJLeZ3PpAQDEGBxPhou5Mp8ONpQ,1842
|
26
|
+
fabricatio/models/task.py,sha256=8NaR7ojQWyM740EDTqt9stwHKdrD6axCRpLKo0QzS-I,10492
|
27
|
+
fabricatio/models/tool.py,sha256=4b-v4WIC_LuLOKzzXL9bvKXr8vmGZ8O2uAFv5-1KRA0,7052
|
28
|
+
fabricatio/models/usages.py,sha256=hR4OU4sjQ2jKaH5_kkN83vG58n3kcKnt9osND0BYi0Q,28634
|
29
|
+
fabricatio/models/utils.py,sha256=1bCqeB6za7ecCAM3cU1raNWuN56732m45rXtlIlc3I4,5017
|
30
|
+
fabricatio/parser.py,sha256=SzyVzbKj5L_0IcI5Z5ILpopJxE-1hGhmomskTWdcc68,6194
|
31
|
+
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
+
fabricatio/toolboxes/arithmetic.py,sha256=WLqhY-Pikv11Y_0SGajwZx3WhsLNpHKf9drzAqOf_nY,1369
|
33
|
+
fabricatio/toolboxes/fs.py,sha256=l4L1CVxJmjw9Ld2XUpIlWfV0_Fu_2Og6d3E13I-S4aE,736
|
34
|
+
fabricatio/toolboxes/__init__.py,sha256=KBJi5OG_pExscdlM7Bnt_UF43j4I3Lv6G71kPVu4KQU,395
|
35
|
+
fabricatio/workflows/articles.py,sha256=RebdC_BzSXC-xsck5I9ccC_XIgfhtoeM8FZuhtVDn3U,580
|
36
|
+
fabricatio/workflows/rag.py,sha256=-YYp2tlE9Vtfgpg6ROpu6QVO8j8yVSPa6yDzlN3qVxs,520
|
37
|
+
fabricatio/_rust.pyi,sha256=pI747rOciunGuQZDvfC3O0A6pLyOiaHSa3A5kHuQO0E,3169
|
38
|
+
fabricatio/_rust_instances.py,sha256=2GwF8aVfYNemRI2feBzH1CZfBGno-XJJE5imJokGEYw,314
|
39
|
+
fabricatio/__init__.py,sha256=wTPzKLGztMr7orV-KizHRXJFhPGncvAHE7BPeSmBVDU,1926
|
40
|
+
fabricatio/_rust.cp312-win_amd64.pyd,sha256=j7ToedGSthvqB4_o2rPN970MQxbmlgQ07zZ6JAKT0eI,1815552
|
41
|
+
fabricatio-0.2.6.dev1.data/scripts/tdown.exe,sha256=aq0eF5FWu3Dxz2_8_RDa-lR5HrgGL01nLFWkfcuKSSI,3395072
|
42
|
+
fabricatio-0.2.6.dev1.dist-info/RECORD,,
|
@@ -1,41 +0,0 @@
|
|
1
|
-
fabricatio-0.2.6.dev0.dist-info/METADATA,sha256=0rCWeinWl5uI8bzZhMeRORs5dJ8sWa5z5zpoy3Lnj6A,8896
|
2
|
-
fabricatio-0.2.6.dev0.dist-info/WHEEL,sha256=tpW5AN9B-9qsM9WW2FXG2r193YXiqexDadpKp0A2daI,96
|
3
|
-
fabricatio-0.2.6.dev0.dist-info/licenses/LICENSE,sha256=do7J7EiCGbq0QPbMAL_FqLYufXpHnCnXBOuqVPwSV8Y,1088
|
4
|
-
fabricatio/actions/article.py,sha256=yzRwgc203vI3MW_oWyFybDxTz6kaBBvUgN2zOJJ9Amc,2825
|
5
|
-
fabricatio/actions/output.py,sha256=KSSLvEvXsA10ACN2mbqGo98QwKLVUAoMUJNKYk6HhGc,645
|
6
|
-
fabricatio/actions/rag.py,sha256=GpT7YlqOYznZyaT-6Y84_33HtZGT-5s71ZK8iroQA9g,813
|
7
|
-
fabricatio/capabilities/propose.py,sha256=y3kge5g6bb8HYuV8e9h4MdqOMTlsfAIZpqE_cagWPTY,1593
|
8
|
-
fabricatio/capabilities/rag.py,sha256=YYaabej-f6a7gBRbJRcJ_Fj89BloNCw0sHOPqs_W8Bk,15773
|
9
|
-
fabricatio/capabilities/rating.py,sha256=0Xrfp_AW9u2ltHnZXxz3Pt3fr8fMsO0QiFadegh49IU,14406
|
10
|
-
fabricatio/capabilities/review.py,sha256=4FbM8dO-JSPnu22I1lykM9y1gzBtXI5Wj33KtzvULWU,9757
|
11
|
-
fabricatio/capabilities/task.py,sha256=hvyZtgkBdrZmuxGqTe-ZkGp2LjymPNE1RK7Y-ztDb7M,4607
|
12
|
-
fabricatio/config.py,sha256=rh8OkGwvuM0-bkZGqhVjMt7-hpdD-rz3Ai7OucrbbWY,15784
|
13
|
-
fabricatio/core.py,sha256=VQ_JKgUGIy2gZ8xsTBZCdr_IP7wC5aPg0_bsOmjQ588,6458
|
14
|
-
fabricatio/decorators.py,sha256=uzsP4tFKQNjDHBkofsjjoJA0IUAaYOtt6YVedoyOqlo,6551
|
15
|
-
fabricatio/fs/curd.py,sha256=N6l2MncjrFfnXBRtteRouXp5Rjy8EAKC_i29_G-zz98,4618
|
16
|
-
fabricatio/fs/readers.py,sha256=RNWx4T2XXigeprJOxw8YjHfyGlrCtB5MVz01Gw9lvw4,1202
|
17
|
-
fabricatio/fs/__init__.py,sha256=uk4yIlz43Yl2mQZ5QuoMstg0DaIQV9h6XXxU4SbdWpY,588
|
18
|
-
fabricatio/journal.py,sha256=pCpIFk-IOsDmCcjx1fOsWDDxjkeAGYgu2OrFnuItwcA,801
|
19
|
-
fabricatio/models/action.py,sha256=onNzHqb7QaqAQ9dtVKf85DWHiJaGeK9gORi_pT7B5Wc,6445
|
20
|
-
fabricatio/models/events.py,sha256=QvlnS8FEELg6KNabcJMeh2GV_y0ZBzKOPphcteKYWYU,4183
|
21
|
-
fabricatio/models/extra.py,sha256=O8ncZVsaNmlR5f8c_b2HJc-yVZQ2YhB6ddDbfT0Ysh4,7412
|
22
|
-
fabricatio/models/generic.py,sha256=LnXmwdZ8Rjx_lanWOz0T1NsBsFRXfXqubYNzsCvLEH0,13808
|
23
|
-
fabricatio/models/kwargs_types.py,sha256=RKD_EXMlz4vuVpGzB9y5qDotSHNOKjk6R0EI4BoNaCg,4282
|
24
|
-
fabricatio/models/role.py,sha256=M9JVDmLLvJhY3G0hHMdcs1ywJ0eoAb6CLYbzhv-l_8s,1839
|
25
|
-
fabricatio/models/task.py,sha256=sbC0EAZC4rPL2GCJ9i9GlFcZUJ96g39SQ2QP8bbgdqs,10492
|
26
|
-
fabricatio/models/tool.py,sha256=4b-v4WIC_LuLOKzzXL9bvKXr8vmGZ8O2uAFv5-1KRA0,7052
|
27
|
-
fabricatio/models/usages.py,sha256=dpMIIoYGRyer97sSP2sQVpihLl2C3REtUMDVZum0DQw,27825
|
28
|
-
fabricatio/models/utils.py,sha256=QI3bYrKBbzLbKvyzVrZXGcWq3trOOTE-hQAC_WNvjMg,4457
|
29
|
-
fabricatio/parser.py,sha256=pwYAoLbWYXtABcnV3s5GdBM0Ngczq-r7n0jKSnpdAxE,5838
|
30
|
-
fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
|
-
fabricatio/toolboxes/arithmetic.py,sha256=WLqhY-Pikv11Y_0SGajwZx3WhsLNpHKf9drzAqOf_nY,1369
|
32
|
-
fabricatio/toolboxes/fs.py,sha256=l4L1CVxJmjw9Ld2XUpIlWfV0_Fu_2Og6d3E13I-S4aE,736
|
33
|
-
fabricatio/toolboxes/__init__.py,sha256=KBJi5OG_pExscdlM7Bnt_UF43j4I3Lv6G71kPVu4KQU,395
|
34
|
-
fabricatio/workflows/articles.py,sha256=RebdC_BzSXC-xsck5I9ccC_XIgfhtoeM8FZuhtVDn3U,580
|
35
|
-
fabricatio/workflows/rag.py,sha256=-YYp2tlE9Vtfgpg6ROpu6QVO8j8yVSPa6yDzlN3qVxs,520
|
36
|
-
fabricatio/_rust.pyi,sha256=pI747rOciunGuQZDvfC3O0A6pLyOiaHSa3A5kHuQO0E,3169
|
37
|
-
fabricatio/_rust_instances.py,sha256=RybIzB2kCoMeU_1kMm2JTz1ka8i524hAra66joDf--s,314
|
38
|
-
fabricatio/__init__.py,sha256=22KLRAVoJZUrK7gsDjU1NfiLCnZtV-qgx6TO2YMbuH8,1930
|
39
|
-
fabricatio/_rust.cp312-win_amd64.pyd,sha256=AhBvJkNL2zAztAgKdFMhVjnek1VBtetgCX3CCusrM-4,1815552
|
40
|
-
fabricatio-0.2.6.dev0.data/scripts/tdown.exe,sha256=FfiaaE9jKm61UyaQHNF7u-QJc8JQhi9btQjn1ySnQ28,3395072
|
41
|
-
fabricatio-0.2.6.dev0.dist-info/RECORD,,
|
File without changes
|
File without changes
|