fabricatio 0.6.7__cp313-cp313-manylinux_2_34_x86_64.whl → 0.7.0__cp313-cp313-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 CHANGED
@@ -5,7 +5,6 @@ from fabricatio_core.journal import logger
5
5
  from fabricatio_core.models.action import Action, WorkFlow
6
6
  from fabricatio_core.models.role import Role
7
7
  from fabricatio_core.models.task import Task
8
- from fabricatio_core.models.tool import ToolBox
9
8
  from fabricatio_core.rust import CONFIG, TEMPLATE_MANAGER, Event
10
9
 
11
10
  __all__ = [
@@ -15,14 +14,9 @@ __all__ = [
15
14
  "Event",
16
15
  "Role",
17
16
  "Task",
18
- "ToolBox",
19
17
  "WorkFlow",
20
- "actions",
21
18
  "fs",
22
19
  "logger",
23
- "models",
24
20
  "parser",
25
- "toolboxes",
26
21
  "utils",
27
- "workflows",
28
22
  ]
@@ -2,13 +2,22 @@
2
2
 
3
3
  from importlib.util import find_spec
4
4
 
5
- __all__ = []
5
+ from fabricatio_core.capabilities.usages import UseEmbedding, UseLLM
6
+
7
+ __all__ = ["UseEmbedding", "UseLLM"]
8
+
9
+ if find_spec("fabricatio_tool"):
10
+ from fabricatio_tool.capabilities.handle_task import HandleTask
11
+ from fabricatio_tool.capabilities.use_tool import UseToolBox
12
+
13
+ __all__ += ["HandleTask", "UseToolBox"]
14
+
6
15
 
7
16
  if find_spec("fabricatio_capabilities"):
8
17
  from fabricatio_capabilities.capabilities.extract import Extract
9
18
  from fabricatio_capabilities.capabilities.propose import Propose
10
19
  from fabricatio_capabilities.capabilities.rating import Rating
11
- from fabricatio_capabilities.capabilities.task import DispatchTask, HandleTask, ProposeTask
20
+ from fabricatio_capabilities.capabilities.task import DispatchTask, ProposeTask
12
21
 
13
22
  __all__ += ["DispatchTask", "Extract", "HandleTask", "Propose", "ProposeTask", "Rating"]
14
23
 
@@ -19,9 +28,7 @@ if find_spec("fabricatio_rag"):
19
28
  if find_spec("fabricatio_write"):
20
29
  from fabricatio_typst.capabilities.citation_rag import CitationRAG
21
30
 
22
- __all__ += [
23
- "CitationRAG",
24
- ]
31
+ __all__ += ["CitationRAG"]
25
32
 
26
33
  if find_spec("fabricatio_rule"):
27
34
  from fabricatio_rule.capabilities.censor import Censor
@@ -33,10 +40,7 @@ if find_spec("fabricatio_improve"):
33
40
  from fabricatio_improve.capabilities.correct import Correct
34
41
  from fabricatio_improve.capabilities.review import Review
35
42
 
36
- __all__ += [
37
- "Correct",
38
- "Review",
39
- ]
43
+ __all__ += ["Correct", "Review"]
40
44
 
41
45
  if find_spec("fabricatio_judge"):
42
46
  from fabricatio_judge.capabilities.advanced_judge import AdvancedJudge
@@ -66,13 +70,8 @@ if find_spec("fabricatio_yue"):
66
70
  from fabricatio_yue.capabilities.genre import SelectGenre
67
71
  from fabricatio_yue.capabilities.lyricize import Lyricize
68
72
 
69
- __all__ += [
70
- "Lyricize",
71
- "SelectGenre",
72
- ]
73
+ __all__ += ["Lyricize", "SelectGenre"]
73
74
  if find_spec("fabricatio_memory"):
74
75
  from fabricatio_memory.capabilities.memory import Remember
75
76
 
76
- __all__ += [
77
- "Remember",
78
- ]
77
+ __all__ += ["Remember"]
@@ -2,13 +2,7 @@
2
2
 
3
3
  from importlib.util import find_spec
4
4
 
5
- from fabricatio_core.models.usages import EmbeddingUsage, LLMUsage, ToolBoxUsage
6
-
7
- __all__ = [
8
- "EmbeddingUsage",
9
- "LLMUsage",
10
- "ToolBoxUsage",
11
- ]
5
+ __all__ = []
12
6
 
13
7
  if find_spec("fabricatio_typst"):
14
8
  from fabricatio_typst.models.article_essence import ArticleEssence
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fabricatio
3
- Version: 0.6.7
3
+ Version: 0.7.0
4
4
  Classifier: License :: OSI Approved :: MIT License
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -10,7 +10,7 @@ Classifier: Framework :: AsyncIO
10
10
  Classifier: Framework :: Pydantic :: 2
11
11
  Classifier: Typing :: Typed
12
12
  Requires-Dist: fabricatio-core
13
- Requires-Dist: fabricatio[rag,cli,typst,rule,judge,capabilities,actions,improve,digest,memory,anki,question,tagging,improve,rag,yue] ; extra == 'full'
13
+ Requires-Dist: fabricatio[rag,cli,typst,rule,judge,capabilities,actions,improve,digest,memory,anki,question,tagging,improve,rag,yue,tool] ; extra == 'full'
14
14
  Requires-Dist: fabricatio-anki ; extra == 'anki'
15
15
  Requires-Dist: fabricatio-memory ; extra == 'memory'
16
16
  Requires-Dist: fabricatio-digest ; extra == 'digest'
@@ -25,6 +25,7 @@ Requires-Dist: fabricatio-actions ; extra == 'actions'
25
25
  Requires-Dist: fabricatio-question ; extra == 'question'
26
26
  Requires-Dist: fabricatio-tagging ; extra == 'tagging'
27
27
  Requires-Dist: fabricatio-yue ; extra == 'yue'
28
+ Requires-Dist: fabricatio-tool ; extra == 'tool'
28
29
  Provides-Extra: full
29
30
  Provides-Extra: anki
30
31
  Provides-Extra: memory
@@ -40,6 +41,7 @@ Provides-Extra: actions
40
41
  Provides-Extra: question
41
42
  Provides-Extra: tagging
42
43
  Provides-Extra: yue
44
+ Provides-Extra: tool
43
45
  License-File: LICENSE
44
46
  Summary: A LLM multi-agent framework.
45
47
  Keywords: ai,agents,multi-agent,llm,pyo3
@@ -0,0 +1,12 @@
1
+ fabricatio-0.7.0.data/scripts/tdown,sha256=PudLv-6YfsRb4VVtJvpq8_v7ykzw238pQg3IimTHEGc,5134600
2
+ fabricatio-0.7.0.dist-info/METADATA,sha256=mbXaCFkdQTmDli4E0pvPpCHKjsUxGW0lE8Z2vsNuNuA,7512
3
+ fabricatio-0.7.0.dist-info/WHEEL,sha256=jLp2duqf8HdGR38ANSTZasShrLQst0e8KGzZrz_xSn8,108
4
+ fabricatio-0.7.0.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
5
+ fabricatio/__init__.py,sha256=4a_7gabZhl9dzonBxcF-8peCGTLNxYJSDfInf1VhRsY,568
6
+ fabricatio/actions/__init__.py,sha256=4xR1wiPq2HPnVABXy6R3wOxcg9LZKD7g-h9IdTcNKvY,2106
7
+ fabricatio/capabilities/__init__.py,sha256=C-13g9zHGiomIJxn8rmRM0SgFkiEZAv7_whqU3RXVjU,2507
8
+ fabricatio/models/__init__.py,sha256=ewcOxbmRILxlMWG2mJ5JIKqsjeG2_1RISC-YxKgLcVM,1522
9
+ fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ fabricatio/rust.cpython-313-x86_64-linux-gnu.so,sha256=mXZxemLDuRxKIsgQWsHcJY_WL0lxEgd7rkLA7fgVStg,6697440
11
+ fabricatio/workflows/__init__.py,sha256=sr-0tgpNPdN5t2pDQa-gp-KUE7K0QDtjP9QGvWYLZ9A,305
12
+ fabricatio-0.7.0.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- """Contains the built-in toolboxes for the Fabricatio package."""
2
-
3
- from typing import Set
4
-
5
- from fabricatio_core.models.tool import ToolBox
6
-
7
- from fabricatio.toolboxes.arithmetic import arithmetic_toolbox
8
- from fabricatio.toolboxes.fs import fs_toolbox
9
-
10
- basic_toolboxes: Set[ToolBox] = {arithmetic_toolbox}
11
-
12
- __all__ = [
13
- "arithmetic_toolbox",
14
- "basic_toolboxes",
15
- "fs_toolbox",
16
- ]
@@ -1,62 +0,0 @@
1
- """Arithmetic tools for Fabricatio."""
2
-
3
- from fabricatio_core.models.tool import ToolBox
4
-
5
- arithmetic_toolbox = ToolBox(name="ArithmeticToolBox", description="A toolbox for arithmetic operations.")
6
-
7
-
8
- @arithmetic_toolbox.collect_tool
9
- def add(a: float, b: float) -> float:
10
- """Add two numbers.
11
-
12
- Args:
13
- a (float): The first number.
14
- b (float): The second number.
15
-
16
- Returns:
17
- float: The sum of the two numbers.
18
- """
19
- return a + b
20
-
21
-
22
- @arithmetic_toolbox.collect_tool
23
- def subtract(a: float, b: float) -> float:
24
- """Subtract two numbers.
25
-
26
- Args:
27
- a (float): The first number.
28
- b (float): The second number.
29
-
30
- Returns:
31
- float: The result of subtracting b from a.
32
- """
33
- return a - b
34
-
35
-
36
- @arithmetic_toolbox.collect_tool
37
- def multiply(a: float, b: float) -> float:
38
- """Multiply two numbers.
39
-
40
- Args:
41
- a (float): The first number.
42
- b (float): The second number.
43
-
44
- Returns:
45
- float: The product of the two numbers.
46
- """
47
- return a * b
48
-
49
-
50
- @arithmetic_toolbox.collect_tool
51
- def divide(a: float, b: float) -> float:
52
- """Divide two numbers.
53
-
54
- Args:
55
- a (float): The numerator.
56
- b (float): The denominator (must not be zero).
57
-
58
- Returns:
59
- float: The result of dividing a by b.
60
-
61
- """
62
- return a / b
@@ -1,31 +0,0 @@
1
- """File system tool box."""
2
-
3
- from fabricatio_core.fs import (
4
- absolute_path,
5
- copy_file,
6
- create_directory,
7
- delete_directory,
8
- delete_file,
9
- dump_text,
10
- gather_files,
11
- move_file,
12
- safe_json_read,
13
- safe_text_read,
14
- tree,
15
- )
16
- from fabricatio_core.models.tool import ToolBox
17
-
18
- fs_toolbox = (
19
- ToolBox(name="FsToolBox", description="A toolbox for basic file system operations.")
20
- .add_tool(dump_text)
21
- .add_tool(copy_file)
22
- .add_tool(move_file)
23
- .add_tool(delete_file)
24
- .add_tool(tree)
25
- .add_tool(delete_directory)
26
- .add_tool(create_directory)
27
- .add_tool(absolute_path)
28
- .add_tool(safe_text_read)
29
- .add_tool(safe_json_read)
30
- .add_tool(gather_files)
31
- )
@@ -1,15 +0,0 @@
1
- fabricatio-0.6.7.data/scripts/tdown,sha256=vzjuhLPdNnpt2Ilj63HqOt0ai-8k5dGdVkNuslUbc70,5134800
2
- fabricatio-0.6.7.dist-info/METADATA,sha256=O-KkUccuXdbH8OhJkFQPVO8r4lBZDZOqzOXESTa9Rnk,7437
3
- fabricatio-0.6.7.dist-info/WHEEL,sha256=jLp2duqf8HdGR38ANSTZasShrLQst0e8KGzZrz_xSn8,108
4
- fabricatio-0.6.7.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
5
- fabricatio/__init__.py,sha256=RuDz5JHlGrYWvMm9H08prJxhwVQFr6-SpKWA3FB9JWg,694
6
- fabricatio/actions/__init__.py,sha256=4xR1wiPq2HPnVABXy6R3wOxcg9LZKD7g-h9IdTcNKvY,2106
7
- fabricatio/capabilities/__init__.py,sha256=hYI0vN5DWOLxI8GoYu3mS2PhIiECfMuY2-QMLW8gb78,2288
8
- fabricatio/models/__init__.py,sha256=iY3GYaJDuNdL72yHizy-fw5v0y12PTRmm01PJAmwJ50,1663
9
- fabricatio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- fabricatio/rust.cpython-313-x86_64-linux-gnu.so,sha256=y2s1tvo1xUx1vOuLTkZxk3yPiIJ18KtoSd64ZsRUjkw,6696216
11
- fabricatio/toolboxes/__init__.py,sha256=_Snn7bB7pBsRYNgqzBzVL8jgka0FdgK6Lme8UnDsBjM,386
12
- fabricatio/toolboxes/arithmetic.py,sha256=kiX83WRfFyqNavpz9Wd0fPxa2HQbi_VTMRNp4B8ErNQ,1312
13
- fabricatio/toolboxes/fs.py,sha256=lipQP6I8HR08ujucsbMR_qBHxlLzMu4O38qPFitZtHc,715
14
- fabricatio/workflows/__init__.py,sha256=sr-0tgpNPdN5t2pDQa-gp-KUE7K0QDtjP9QGvWYLZ9A,305
15
- fabricatio-0.6.7.dist-info/RECORD,,