fabricatio 0.3.15.dev5__cp312-cp312-win_amd64.whl → 0.4.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.
Files changed (65) hide show
  1. fabricatio/__init__.py +7 -8
  2. fabricatio/actions/__init__.py +69 -1
  3. fabricatio/capabilities/__init__.py +59 -1
  4. fabricatio/models/__init__.py +47 -0
  5. fabricatio/rust.cp312-win_amd64.pyd +0 -0
  6. fabricatio/toolboxes/__init__.py +2 -1
  7. fabricatio/toolboxes/arithmetic.py +1 -1
  8. fabricatio/toolboxes/fs.py +2 -2
  9. fabricatio/workflows/__init__.py +9 -0
  10. fabricatio-0.4.4.data/scripts/tdown.exe +0 -0
  11. {fabricatio-0.3.15.dev5.dist-info → fabricatio-0.4.4.dist-info}/METADATA +48 -25
  12. fabricatio-0.4.4.dist-info/RECORD +15 -0
  13. fabricatio/actions/article.py +0 -415
  14. fabricatio/actions/article_rag.py +0 -407
  15. fabricatio/actions/fs.py +0 -25
  16. fabricatio/actions/output.py +0 -247
  17. fabricatio/actions/rag.py +0 -96
  18. fabricatio/actions/rules.py +0 -83
  19. fabricatio/capabilities/advanced_judge.py +0 -20
  20. fabricatio/capabilities/advanced_rag.py +0 -61
  21. fabricatio/capabilities/censor.py +0 -105
  22. fabricatio/capabilities/check.py +0 -212
  23. fabricatio/capabilities/correct.py +0 -228
  24. fabricatio/capabilities/extract.py +0 -74
  25. fabricatio/capabilities/propose.py +0 -65
  26. fabricatio/capabilities/rag.py +0 -264
  27. fabricatio/capabilities/rating.py +0 -404
  28. fabricatio/capabilities/review.py +0 -114
  29. fabricatio/capabilities/task.py +0 -113
  30. fabricatio/decorators.py +0 -253
  31. fabricatio/emitter.py +0 -177
  32. fabricatio/fs/__init__.py +0 -35
  33. fabricatio/fs/curd.py +0 -153
  34. fabricatio/fs/readers.py +0 -61
  35. fabricatio/journal.py +0 -12
  36. fabricatio/models/action.py +0 -263
  37. fabricatio/models/adv_kwargs_types.py +0 -63
  38. fabricatio/models/extra/__init__.py +0 -1
  39. fabricatio/models/extra/advanced_judge.py +0 -32
  40. fabricatio/models/extra/aricle_rag.py +0 -286
  41. fabricatio/models/extra/article_base.py +0 -488
  42. fabricatio/models/extra/article_essence.py +0 -98
  43. fabricatio/models/extra/article_main.py +0 -285
  44. fabricatio/models/extra/article_outline.py +0 -45
  45. fabricatio/models/extra/article_proposal.py +0 -52
  46. fabricatio/models/extra/patches.py +0 -20
  47. fabricatio/models/extra/problem.py +0 -165
  48. fabricatio/models/extra/rag.py +0 -98
  49. fabricatio/models/extra/rule.py +0 -51
  50. fabricatio/models/generic.py +0 -904
  51. fabricatio/models/kwargs_types.py +0 -121
  52. fabricatio/models/role.py +0 -156
  53. fabricatio/models/task.py +0 -310
  54. fabricatio/models/tool.py +0 -328
  55. fabricatio/models/usages.py +0 -791
  56. fabricatio/parser.py +0 -114
  57. fabricatio/rust.pyi +0 -846
  58. fabricatio/utils.py +0 -156
  59. fabricatio/workflows/articles.py +0 -24
  60. fabricatio/workflows/rag.py +0 -11
  61. fabricatio-0.3.15.dev5.data/scripts/tdown.exe +0 -0
  62. fabricatio-0.3.15.dev5.data/scripts/ttm.exe +0 -0
  63. fabricatio-0.3.15.dev5.dist-info/RECORD +0 -63
  64. {fabricatio-0.3.15.dev5.dist-info → fabricatio-0.4.4.dist-info}/WHEEL +0 -0
  65. {fabricatio-0.3.15.dev5.dist-info → fabricatio-0.4.4.dist-info}/licenses/LICENSE +0 -0
@@ -1,51 +0,0 @@
1
- """A module containing classes related to rule sets and rules.
2
-
3
- This module provides the `Rule` and `RuleSet` classes, which are used to define and manage
4
- individual rules and collections of rules, respectively. These classes are designed to
5
- facilitate the creation, organization, and application of rules in various contexts,
6
- ensuring clarity, consistency, and enforceability. The module supports detailed
7
- descriptions, examples, and metadata for each rule and rule set, making it suitable for
8
- complex rule management systems.
9
- """
10
-
11
- from typing import List, Self, Tuple, Unpack
12
-
13
- from fabricatio.models.generic import Language, PersistentAble, SketchedAble, WithBriefing
14
- from more_itertools import flatten
15
-
16
-
17
- class Rule(WithBriefing, Language, SketchedAble, PersistentAble):
18
- """Represents a rule or guideline for a specific topic."""
19
-
20
- violation_examples: List[str]
21
- """A list of concrete examples demonstrating violations of this rule. Each example should
22
- be a clear scenario or case that illustrates how the rule can be broken, including the
23
- context, actions, and consequences of the violation. These examples should help in
24
- understanding the boundaries of the rule."""
25
-
26
- compliance_examples: List[str]
27
- """A list of concrete examples demonstrating proper compliance with this rule. Each example
28
- should be a clear scenario or case that illustrates how to correctly follow the rule,
29
- including the context, actions, and positive outcomes of compliance. These examples should
30
- serve as practical guidance for implementing the rule correctly."""
31
-
32
-
33
- class RuleSet(SketchedAble, PersistentAble, WithBriefing, Language):
34
- """Represents a collection of rules and guidelines for a particular topic."""
35
-
36
- rules: List[Rule]
37
- """The collection of rules and guidelines contained in this rule set. Each rule should be
38
- a well-defined, specific guideline that contributes to the overall purpose of the rule set.
39
- The rules should be logically organized and consistent with each other, forming a coherent
40
- framework for the topic or domain covered by the rule set."""
41
-
42
- @classmethod
43
- def gather(cls, *rulesets: Unpack[Tuple["RuleSet", ...]]) -> Self:
44
- """Gathers multiple rule sets into a single rule set."""
45
- if not rulesets:
46
- raise ValueError("No rulesets provided")
47
- return cls(
48
- name=";".join(ruleset.name for ruleset in rulesets),
49
- description=";".join(ruleset.description for ruleset in rulesets),
50
- rules=list(flatten(r.rules for r in rulesets)),
51
- )