fabricatio 0.4.0.dev0__tar.gz → 0.4.0.dev5__tar.gz
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-0.4.0.dev0 → fabricatio-0.4.0.dev5}/.github/workflows/build-package.yaml +9 -12
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/Cargo.toml +0 -1
- fabricatio-0.4.0.dev5/Makefile +35 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/PKG-INFO +1 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/correct/correct.py +1 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/write_article/article_rag.py +9 -14
- fabricatio-0.4.0.dev5/examples/write_article/post_process.py +11 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/write_article/write_article.py +12 -12
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/pyproject.toml +10 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/python/fabricatio_actions/actions/fs.py +3 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/python/fabricatio_actions/actions/output.py +22 -21
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/python/fabricatio_actions/models/generic.py +1 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/pyproject.toml +10 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/python/fabricatio_improve/models/problem.py +2 -3
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-judge/pyproject.toml +10 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-judge/python/fabricatio_judge/__init__.py +1 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/pyproject.toml +12 -2
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/actions/rules.py +4 -3
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/capabilities/censor.py +4 -3
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/capabilities/check.py +27 -25
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/models/kwargs_types.py +2 -2
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/models/patch.py +2 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/models/rule.py +2 -3
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/pyproject.toml +1 -1
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/python/fabricatio/__init__.py +2 -1
- fabricatio-0.4.0.dev5/python/fabricatio/actions/__init__.py +57 -0
- fabricatio-0.4.0.dev5/python/fabricatio/capabilities/__init__.py +40 -0
- fabricatio-0.4.0.dev5/python/fabricatio/models/__init__.py +23 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/python/fabricatio/toolboxes/__init__.py +2 -1
- fabricatio-0.4.0.dev5/subpackages.py +493 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/uv.lock +309 -67
- fabricatio-0.4.0.dev0/Makefile +0 -31
- fabricatio-0.4.0.dev0/examples/write_article/post_process.py +0 -12
- fabricatio-0.4.0.dev0/publish_subpackages.py +0 -51
- fabricatio-0.4.0.dev0/python/fabricatio/workflows/rag.py +0 -12
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/.github/workflows/ruff.yaml +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/.github/workflows/tests.yaml +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/.gitignore +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/Cargo.lock +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/LICENSE +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/README.md +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/correct/correct_loop.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/extract_and_inject/.gitignore +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/extract_and_inject/article_rag.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/extract_and_inject/ask.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/extract_and_inject/chunk_article.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/extract_and_inject/extract_and_inject.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/extract_article/extract.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/llm_usages/llm_usage.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/make_a_rating/rating.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/make_diary/commits.json +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/make_diary/diary.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/minor/hello_fabricatio.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/minor/write_a_poem.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/propose_task/.gitignore +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/propose_task/propose.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/reviewer/censor.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/reviewer/review.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/rules/.gitignore +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/rules/draft_ruleset.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/search_bibtex/.gitignore +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/search_bibtex/search.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/simple_chat/chat.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/simple_rag/simple_rag.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/task_handle/handle_task.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/write_article/.gitignore +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/write_outline/.gitignore +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/write_outline/write_outline.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/examples/write_outline/write_outline_corrected.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/LICENSE +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/README.md +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/python/fabricatio_actions/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/python/fabricatio_actions/actions/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-actions/python/fabricatio_actions/py.typed +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/LICENSE +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/README.md +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/python/fabricatio_improve/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/python/fabricatio_improve/capabilities/correct.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/python/fabricatio_improve/capabilities/review.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/python/fabricatio_improve/models/improve.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/python/fabricatio_improve/models/kwargs_types.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-improve/python/fabricatio_improve/py.typed +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-judge/LICENSE +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-judge/README.md +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-judge/python/fabricatio_judge/capabilities/advanced_judge.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-judge/python/fabricatio_judge/models/advanced_judge.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-judge/python/fabricatio_judge/py.typed +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/LICENSE +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/README.md +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/actions/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/capabilities/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/models/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/packages/fabricatio-rule/python/fabricatio_rule/py.typed +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/python/fabricatio/py.typed +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/python/fabricatio/toolboxes/arithmetic.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/python/fabricatio/toolboxes/fs.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/python/fabricatio/workflows/__init__.py +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/src/lib.rs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/as_prompt.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/binary-exploitation-ctf-solver.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/chap_summary.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/check_string.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/claude-xml.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/clean-up-code.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/co_validation.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/create_json_obj.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/cryptography-ctf-solver.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/dependencies.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/document-the-code.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/draft_rating_criteria.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/draft_rating_manual.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/draft_rating_weights_klee.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/draft_tool_usage_code.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/extract.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/extract_criteria_from_reasons.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/extract_reasons_from_examples.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/find-security-vulnerabilities.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/fix-bugs.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/fix_troubled_obj.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/fix_troubled_string.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/generic_string.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/improve-performance.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/liststr.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/make_choice.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/make_judgment.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/pathstr.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/rate_fine_grind.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/refactor.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/refined_query.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/research_content_summary.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/retrieved_display.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/reverse-engineering-ctf-solver.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/review_string.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/rule_requirement.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/ruleset_requirement_breakdown.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/task_briefing.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/web-ctf-solver.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/write-git-commit.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/write-github-pull-request.hbs +0 -0
- {fabricatio-0.4.0.dev0 → fabricatio-0.4.0.dev5}/templates/built-in/write-github-readme.hbs +0 -0
@@ -105,11 +105,17 @@ jobs:
|
|
105
105
|
|
106
106
|
- name: Install deps
|
107
107
|
run: |
|
108
|
-
uv sync --no-install-project
|
108
|
+
uv sync --no-install-project --only-dev --index https://pypi.org/simple -p ${{ matrix.python-version }}
|
109
109
|
|
110
|
-
- name:
|
110
|
+
- name: Upload to PyPI
|
111
|
+
if: needs.determine_changes.outputs.version_changed == 'true'
|
111
112
|
run: |
|
112
|
-
make PY=${{ matrix.python-version }}
|
113
|
+
make publish PY=${{ matrix.python-version }}
|
114
|
+
env:
|
115
|
+
MATURIN_USERNAME: __token__
|
116
|
+
MATURIN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
117
|
+
UV_INDEX: https://pypi.org/simple
|
118
|
+
|
113
119
|
|
114
120
|
- name: Upload assets
|
115
121
|
uses: softprops/action-gh-release@v2
|
@@ -119,12 +125,3 @@ jobs:
|
|
119
125
|
dist/*.whl
|
120
126
|
env:
|
121
127
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
122
|
-
|
123
|
-
- name: Upload to PyPI
|
124
|
-
if: needs.determine_changes.outputs.version_changed == 'true'
|
125
|
-
run: |
|
126
|
-
make publish PY=${{ matrix.python-version }}
|
127
|
-
env:
|
128
|
-
MATURIN_USERNAME: __token__
|
129
|
-
MATURIN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
130
|
-
|
@@ -0,0 +1,35 @@
|
|
1
|
+
DIST:=dist
|
2
|
+
DATA:=extra
|
3
|
+
PY:=3.13
|
4
|
+
|
5
|
+
|
6
|
+
all:bdist
|
7
|
+
|
8
|
+
dirs:
|
9
|
+
mkdir -p $(DIST) $(DATA)
|
10
|
+
|
11
|
+
|
12
|
+
dev:
|
13
|
+
cargo build --workspace --bins -r -Z unstable-options --artifact-dir $(DATA)/scripts
|
14
|
+
rm $(DATA)/scripts/*.pdb |true
|
15
|
+
rm $(DATA)/scripts/*.dwarf |true
|
16
|
+
uvx -p $(PY) --project . maturin develop --uv -r
|
17
|
+
uv run subpackages.py --no-publish --pyversion $(PY) --dev
|
18
|
+
|
19
|
+
|
20
|
+
bdist: dirs dev
|
21
|
+
uvx -p $(PY) --project . maturin build --sdist -r -o $(DIST)
|
22
|
+
uv run subpackages.py --no-publish --pyversion $(PY)
|
23
|
+
|
24
|
+
clean:
|
25
|
+
rm -rf $(DIST)/* $(DATA)/*
|
26
|
+
|
27
|
+
|
28
|
+
test:dev
|
29
|
+
uvx -p $(PY) --project . pytest tests
|
30
|
+
|
31
|
+
publish: bdist
|
32
|
+
uv run subpackages.py --pyversion $(PY)
|
33
|
+
|
34
|
+
|
35
|
+
.PHONY: dev bdist clean publish tests
|
@@ -3,26 +3,21 @@
|
|
3
3
|
import asyncio
|
4
4
|
from pathlib import Path
|
5
5
|
|
6
|
-
from fabricatio import Event, Role, WorkFlow, logger
|
7
|
-
from fabricatio.actions
|
8
|
-
from fabricatio.
|
9
|
-
from fabricatio.models.action import Action
|
10
|
-
from fabricatio.models.extra.article_main import Article
|
11
|
-
from fabricatio.models.extra.article_outline import ArticleOutline
|
12
|
-
from fabricatio.models.extra.article_proposal import ArticleProposal
|
13
|
-
from fabricatio.models.task import Task
|
6
|
+
from fabricatio import Action, Event, Role, Task, WorkFlow, logger
|
7
|
+
from fabricatio.actions import DumpFinalizedOutput, PersistentAll, RetrieveFromPersistent, TweakArticleRAG
|
8
|
+
from fabricatio.models import Article, ArticleOutline, ArticleProposal
|
14
9
|
|
15
10
|
|
16
11
|
class Connect(Action):
|
17
12
|
"""Connect the article to the outline."""
|
18
13
|
|
19
14
|
async def _execute(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
15
|
+
self,
|
16
|
+
article_briefing: str,
|
17
|
+
article_proposal: ArticleProposal,
|
18
|
+
article_outline: ArticleOutline,
|
19
|
+
article: Article,
|
20
|
+
**cxt,
|
26
21
|
) -> None:
|
27
22
|
article.update_ref(article_outline.update_ref(article_proposal.update_ref(article_briefing)))
|
28
23
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"""Fix the article."""
|
2
|
+
|
3
|
+
from fabricatio.models import Article
|
4
|
+
|
5
|
+
a = Article.from_persistent(
|
6
|
+
r"persistent\to_dump\Article_20250408_103051_51d822.json")
|
7
|
+
a.convert_tex()
|
8
|
+
|
9
|
+
from fabricatio_core.fs.curd import dump_text
|
10
|
+
|
11
|
+
dump_text("corrected.typ", a.finalized_dump())
|
@@ -5,21 +5,22 @@ from pathlib import Path
|
|
5
5
|
from typing import List, Optional
|
6
6
|
|
7
7
|
import typer
|
8
|
-
from fabricatio import Event, WorkFlow, logger
|
8
|
+
from fabricatio import Event, Task, WorkFlow, logger
|
9
9
|
from fabricatio import Role as RoleBase
|
10
|
-
from fabricatio.actions
|
10
|
+
from fabricatio.actions import (
|
11
|
+
ArticleConsultRAG,
|
12
|
+
DumpFinalizedOutput,
|
11
13
|
ExtractOutlineFromRaw,
|
12
14
|
GenerateArticleProposal,
|
13
15
|
GenerateInitialOutline,
|
16
|
+
PersistentAll,
|
17
|
+
RenderedDump,
|
18
|
+
WriteArticleContentRAG,
|
14
19
|
WriteChapterSummary,
|
15
20
|
WriteResearchContentSummary,
|
16
21
|
)
|
17
|
-
from fabricatio.
|
18
|
-
from
|
19
|
-
from fabricatio.models.extra.article_outline import ArticleOutline
|
20
|
-
from fabricatio.models.task import Task
|
21
|
-
from fabricatio.models.usages import LLMUsage
|
22
|
-
from fabricatio.utils import ok
|
22
|
+
from fabricatio.models import ArticleOutline, LLMUsage
|
23
|
+
from fabricatio_core.utils import ok
|
23
24
|
from typer import Typer
|
24
25
|
|
25
26
|
# from pydantic import HttpUrl
|
@@ -102,7 +103,6 @@ Role(
|
|
102
103
|
},
|
103
104
|
)
|
104
105
|
|
105
|
-
|
106
106
|
app = Typer()
|
107
107
|
|
108
108
|
|
@@ -126,7 +126,7 @@ def finish(
|
|
126
126
|
article_outline_path: Path = typer.Argument( # noqa: B008
|
127
127
|
help="Path to the article outline raw file."
|
128
128
|
),
|
129
|
-
dump_path: Path = typer.Option(Path("out.typ"), "-d", "--dump-path", help="Path to dump the final output."),
|
129
|
+
dump_path: Path = typer.Option(Path("out.typ"), "-d", "--dump-path", help="Path to dump the final output."),
|
130
130
|
persist_dir: Path = typer.Option( # noqa: B008
|
131
131
|
Path("persistent"), "-p", "--persist-dir", help="Directory to persist the output."
|
132
132
|
),
|
@@ -156,7 +156,7 @@ def completion(
|
|
156
156
|
article_outline_raw_path: Path = typer.Option( # noqa: B008
|
157
157
|
Path("article_outline_raw.txt"), "-a", "--article-outline-raw", help="Path to the article outline raw file."
|
158
158
|
),
|
159
|
-
dump_path: Path = typer.Option(Path("out.typ"), "-d", "--dump-path", help="Path to dump the final output."),
|
159
|
+
dump_path: Path = typer.Option(Path("out.typ"), "-d", "--dump-path", help="Path to dump the final output."),
|
160
160
|
persist_dir: Path = typer.Option( # noqa: B008
|
161
161
|
Path("persistent"), "-p", "--persist-dir", help="Directory to persist the output."
|
162
162
|
),
|
@@ -186,7 +186,7 @@ def write(
|
|
186
186
|
article_briefing: Path = typer.Option( # noqa: B008
|
187
187
|
Path("article_briefing.txt"), "-a", "--article-briefing", help="Path to the article briefing file."
|
188
188
|
),
|
189
|
-
dump_path: Path = typer.Option(Path("out.typ"), "-d", "--dump-path", help="Path to dump the final output."),
|
189
|
+
dump_path: Path = typer.Option(Path("out.typ"), "-d", "--dump-path", help="Path to dump the final output."),
|
190
190
|
persist_dir: Path = typer.Option( # noqa: B008
|
191
191
|
Path("persistent"), "-p", "--persist-dir", help="Directory to persist the output."
|
192
192
|
),
|
@@ -3,6 +3,10 @@ name = "fabricatio-actions"
|
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Add your description here"
|
5
5
|
readme = "README.md"
|
6
|
+
license = { file = "LICENSE" }
|
7
|
+
authors = [
|
8
|
+
{ name = "Whth", email = "zettainspector@foxmail.com" }
|
9
|
+
]
|
6
10
|
requires-python = ">=3.12,<3.14"
|
7
11
|
|
8
12
|
dependencies = [
|
@@ -16,4 +20,9 @@ requires = ["hatchling"]
|
|
16
20
|
build-backend = "hatchling.build"
|
17
21
|
|
18
22
|
[tool.hatch.build.targets.wheel]
|
19
|
-
sources = ["python"]
|
23
|
+
sources = ["python"]
|
24
|
+
|
25
|
+
[project.urls]
|
26
|
+
Homepage = "https://github.com/Whth/fabricatio"
|
27
|
+
Repository = "https://github.com/Whth/fabricatio"
|
28
|
+
Issues = "https://github.com/Whth/fabricatio/issues"
|
@@ -3,14 +3,16 @@
|
|
3
3
|
from pathlib import Path
|
4
4
|
from typing import Any, List, Mapping, Self
|
5
5
|
|
6
|
-
from fabricatio_actions.models.generic import FromMapping
|
7
6
|
from fabricatio_core.fs import safe_text_read
|
8
7
|
from fabricatio_core.journal import logger
|
9
8
|
from fabricatio_core.models.action import Action
|
10
9
|
|
10
|
+
from fabricatio_actions.models.generic import FromMapping
|
11
|
+
|
11
12
|
|
12
13
|
class ReadText(Action, FromMapping):
|
13
14
|
"""Read text from a file."""
|
15
|
+
|
14
16
|
output_key: str = "read_text"
|
15
17
|
read_path: str | Path
|
16
18
|
"""Path to the file to read."""
|
@@ -3,7 +3,6 @@
|
|
3
3
|
from pathlib import Path
|
4
4
|
from typing import Any, Iterable, List, Mapping, Optional, Self, Sequence, Type
|
5
5
|
|
6
|
-
from fabricatio_actions.models.generic import FromMapping, FromSequence
|
7
6
|
from fabricatio_capabilities.models.generic import FinalizedDumpAble, PersistentAble
|
8
7
|
from fabricatio_core.fs import dump_text
|
9
8
|
from fabricatio_core.journal import logger
|
@@ -13,6 +12,8 @@ from fabricatio_core.models.usages import LLMUsage
|
|
13
12
|
from fabricatio_core.rust import TEMPLATE_MANAGER
|
14
13
|
from fabricatio_core.utils import ok
|
15
14
|
|
15
|
+
from fabricatio_actions.models.generic import FromMapping, FromSequence
|
16
|
+
|
16
17
|
|
17
18
|
class DumpFinalizedOutput(Action, LLMUsage):
|
18
19
|
"""Dump the finalized output to a file."""
|
@@ -21,11 +22,11 @@ class DumpFinalizedOutput(Action, LLMUsage):
|
|
21
22
|
dump_path: Optional[str] = None
|
22
23
|
|
23
24
|
async def _execute(
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
self,
|
26
|
+
to_dump: FinalizedDumpAble,
|
27
|
+
task_input: Optional[Task] = None,
|
28
|
+
dump_path: Optional[str | Path] = None,
|
29
|
+
**_,
|
29
30
|
) -> str:
|
30
31
|
dump_path = Path(
|
31
32
|
dump_path
|
@@ -52,11 +53,11 @@ class RenderedDump(Action, LLMUsage):
|
|
52
53
|
"""The template name to render the data."""
|
53
54
|
|
54
55
|
async def _execute(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
self,
|
57
|
+
to_dump: FinalizedDumpAble,
|
58
|
+
task_input: Optional[Task] = None,
|
59
|
+
dump_path: Optional[str | Path] = None,
|
60
|
+
**_,
|
60
61
|
) -> str:
|
61
62
|
dump_path = Path(
|
62
63
|
dump_path
|
@@ -91,10 +92,10 @@ class PersistentAll(Action, LLMUsage):
|
|
91
92
|
"""Whether to remove the existing dir before dumping."""
|
92
93
|
|
93
94
|
async def _execute(
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
self,
|
96
|
+
task_input: Optional[Task] = None,
|
97
|
+
persist_dir: Optional[str | Path] = None,
|
98
|
+
**cxt,
|
98
99
|
) -> int:
|
99
100
|
persist_dir = Path(
|
100
101
|
persist_dir
|
@@ -124,7 +125,7 @@ class PersistentAll(Action, LLMUsage):
|
|
124
125
|
v.persist(final_dir)
|
125
126
|
count += 1
|
126
127
|
if isinstance(v, Iterable) and any(
|
127
|
-
|
128
|
+
persistent_ables := (pers for pers in v if isinstance(pers, PersistentAble))
|
128
129
|
):
|
129
130
|
logger.info(f"Persisting collection {k} to {final_dir}")
|
130
131
|
final_dir.mkdir(parents=True, exist_ok=True)
|
@@ -174,11 +175,11 @@ class RetrieveFromLatest[T: PersistentAble](RetrieveFromPersistent[T], FromMappi
|
|
174
175
|
|
175
176
|
@classmethod
|
176
177
|
def from_mapping(
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
178
|
+
cls,
|
179
|
+
mapping: Mapping[str, str | Path],
|
180
|
+
*,
|
181
|
+
retrieve_cls: Type[T],
|
182
|
+
**kwargs,
|
182
183
|
) -> List["RetrieveFromLatest[T]"]:
|
183
184
|
"""Create a list of `RetrieveFromLatest` from the mapping."""
|
184
185
|
return [
|
@@ -3,6 +3,10 @@ name = "fabricatio-improve"
|
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Add your description here"
|
5
5
|
readme = "README.md"
|
6
|
+
license = { file = "LICENSE" }
|
7
|
+
authors = [
|
8
|
+
{ name = "Whth", email = "zettainspector@foxmail.com" }
|
9
|
+
]
|
6
10
|
requires-python = ">=3.12,<3.14"
|
7
11
|
|
8
12
|
dependencies = [
|
@@ -17,4 +21,9 @@ requires = ["hatchling"]
|
|
17
21
|
build-backend = "hatchling.build"
|
18
22
|
|
19
23
|
[tool.hatch.build.targets.wheel]
|
20
|
-
sources = ["python"]
|
24
|
+
sources = ["python"]
|
25
|
+
|
26
|
+
[project.urls]
|
27
|
+
Homepage = "https://github.com/Whth/fabricatio"
|
28
|
+
Repository = "https://github.com/Whth/fabricatio"
|
29
|
+
Issues = "https://github.com/Whth/fabricatio/issues"
|
@@ -2,13 +2,12 @@
|
|
2
2
|
|
3
3
|
from typing import Any, List, Optional, Self
|
4
4
|
|
5
|
-
from pydantic import Field
|
6
|
-
from rich import print as r_print
|
7
|
-
|
8
5
|
from fabricatio_capabilities.models.generic import SketchedAble
|
9
6
|
from fabricatio_core.journal import logger
|
10
7
|
from fabricatio_core.models.generic import WithBriefing
|
11
8
|
from fabricatio_core.utils import ask_edit
|
9
|
+
from pydantic import Field
|
10
|
+
from rich import print as r_print
|
12
11
|
|
13
12
|
|
14
13
|
class Problem(SketchedAble, WithBriefing):
|
@@ -3,6 +3,10 @@ name = "fabricatio-judge"
|
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Add your description here"
|
5
5
|
readme = "README.md"
|
6
|
+
license = { file = "LICENSE" }
|
7
|
+
authors = [
|
8
|
+
{ name = "Whth", email = "zettainspector@foxmail.com" }
|
9
|
+
]
|
6
10
|
requires-python = ">=3.12,<3.14"
|
7
11
|
|
8
12
|
dependencies = [
|
@@ -16,4 +20,9 @@ requires = ["hatchling"]
|
|
16
20
|
build-backend = "hatchling.build"
|
17
21
|
|
18
22
|
[tool.hatch.build.targets.wheel]
|
19
|
-
sources = ["python"]
|
23
|
+
sources = ["python"]
|
24
|
+
|
25
|
+
[project.urls]
|
26
|
+
Homepage = "https://github.com/Whth/fabricatio"
|
27
|
+
Repository = "https://github.com/Whth/fabricatio"
|
28
|
+
Issues = "https://github.com/Whth/fabricatio/issues"
|
@@ -1,7 +1,11 @@
|
|
1
1
|
[project]
|
2
2
|
name = "fabricatio-rule"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.1"
|
4
4
|
description = "Add your description here"
|
5
|
+
license = { file = "LICENSE" }
|
6
|
+
authors = [
|
7
|
+
{ name = "Whth", email = "zettainspector@foxmail.com" }
|
8
|
+
]
|
5
9
|
readme = "README.md"
|
6
10
|
requires-python = ">=3.12,<3.14"
|
7
11
|
|
@@ -24,4 +28,10 @@ sources = ["python"]
|
|
24
28
|
fabricatio-core = { workspace = true }
|
25
29
|
fabricatio-improve = { workspace = true }
|
26
30
|
fabricatio-judge = { workspace = true }
|
27
|
-
fabricatio-capabilities = { workspace = true }
|
31
|
+
fabricatio-capabilities = { workspace = true }
|
32
|
+
|
33
|
+
|
34
|
+
[project.urls]
|
35
|
+
Homepage = "https://github.com/Whth/fabricatio"
|
36
|
+
Repository = "https://github.com/Whth/fabricatio"
|
37
|
+
Issues = "https://github.com/Whth/fabricatio/issues"
|
@@ -6,6 +6,7 @@ from fabricatio_actions.models.generic import FromMapping
|
|
6
6
|
from fabricatio_core.journal import logger
|
7
7
|
from fabricatio_core.models.action import Action
|
8
8
|
from fabricatio_core.utils import ok
|
9
|
+
|
9
10
|
from fabricatio_rule.capabilities.check import Check
|
10
11
|
from fabricatio_rule.models.rule import RuleSet
|
11
12
|
|
@@ -22,9 +23,9 @@ class DraftRuleSet(Action, Check, FromMapping):
|
|
22
23
|
"""The number of rules to generate in the ruleset (0 for no restriction)."""
|
23
24
|
|
24
25
|
async def _execute(
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
self,
|
27
|
+
ruleset_requirement: Optional[str] = None,
|
28
|
+
**_,
|
28
29
|
) -> Optional[RuleSet]:
|
29
30
|
"""Draft a ruleset based on the requirement description.
|
30
31
|
|
@@ -13,6 +13,7 @@ from fabricatio_core.models.kwargs_types import ReferencedKwargs
|
|
13
13
|
from fabricatio_core.utils import override_kwargs
|
14
14
|
from fabricatio_improve.capabilities.correct import Correct
|
15
15
|
from fabricatio_improve.models.improve import Improvement
|
16
|
+
|
16
17
|
from fabricatio_rule.capabilities.check import Check
|
17
18
|
from fabricatio_rule.models.rule import RuleSet
|
18
19
|
|
@@ -26,7 +27,7 @@ class Censor(Correct, Check, ABC):
|
|
26
27
|
"""
|
27
28
|
|
28
29
|
async def censor_obj[M: SketchedAble](
|
29
|
-
|
30
|
+
self, obj: M, ruleset: RuleSet, **kwargs: Unpack[ReferencedKwargs[M]]
|
30
31
|
) -> Optional[M]:
|
31
32
|
"""Censors an object based on the provided ruleset.
|
32
33
|
|
@@ -51,7 +52,7 @@ class Censor(Correct, Check, ABC):
|
|
51
52
|
return await self.correct_obj(obj, Improvement.gather(*imp), **kwargs)
|
52
53
|
|
53
54
|
async def censor_string(
|
54
|
-
|
55
|
+
self, input_text: str, ruleset: RuleSet, **kwargs: Unpack[ReferencedKwargs[str]]
|
55
56
|
) -> Optional[str]:
|
56
57
|
"""Censors a string based on the provided ruleset.
|
57
58
|
|
@@ -77,7 +78,7 @@ class Censor(Correct, Check, ABC):
|
|
77
78
|
return await self.correct_string(input_text, Improvement.gather(*imp), **kwargs)
|
78
79
|
|
79
80
|
async def censor_obj_inplace[M: ProposedUpdateAble](
|
80
|
-
|
81
|
+
self, obj: M, ruleset: RuleSet, **kwargs: Unpack[ReferencedKwargs[M]]
|
81
82
|
) -> Optional[M]:
|
82
83
|
"""Censors an object in-place based on the provided ruleset.
|
83
84
|
|
@@ -6,12 +6,14 @@ from typing import List, Optional, Unpack
|
|
6
6
|
|
7
7
|
from fabricatio_capabilities.capabilities.propose import Propose
|
8
8
|
from fabricatio_capabilities.models.kwargs_types import ValidateKwargs
|
9
|
+
from fabricatio_capabilities.rust import detect_language
|
9
10
|
from fabricatio_core.journal import logger
|
10
11
|
from fabricatio_core.models.generic import Display, WithBriefing
|
11
|
-
from fabricatio_core.rust import CONFIG, TEMPLATE_MANAGER
|
12
|
+
from fabricatio_core.rust import CONFIG, TEMPLATE_MANAGER
|
12
13
|
from fabricatio_core.utils import override_kwargs
|
13
14
|
from fabricatio_improve.models.improve import Improvement
|
14
15
|
from fabricatio_judge.capabilities.advanced_judge import AdvancedJudge
|
16
|
+
|
15
17
|
from fabricatio_rule.models.patch import RuleSetMetadata
|
16
18
|
from fabricatio_rule.models.rule import Rule, RuleSet
|
17
19
|
|
@@ -24,7 +26,7 @@ class Check(AdvancedJudge, Propose, ABC):
|
|
24
26
|
"""
|
25
27
|
|
26
28
|
async def draft_ruleset(
|
27
|
-
|
29
|
+
self, ruleset_requirement: str, rule_count: int = 0, **kwargs: Unpack[ValidateKwargs[Rule]]
|
28
30
|
) -> Optional[RuleSet]:
|
29
31
|
"""Generate rule set based on requirement description.
|
30
32
|
|
@@ -80,11 +82,11 @@ class Check(AdvancedJudge, Propose, ABC):
|
|
80
82
|
return RuleSet(rules=rules, **ruleset_patch.as_kwargs())
|
81
83
|
|
82
84
|
async def check_string_against_rule(
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
self,
|
86
|
+
input_text: str,
|
87
|
+
rule: Rule,
|
88
|
+
reference: str = "",
|
89
|
+
**kwargs: Unpack[ValidateKwargs[Improvement]],
|
88
90
|
) -> Optional[Improvement]:
|
89
91
|
"""Validate text against specific rule.
|
90
92
|
|
@@ -103,9 +105,9 @@ class Check(AdvancedJudge, Propose, ABC):
|
|
103
105
|
- Proposes Improvement only when violation is confirmed
|
104
106
|
"""
|
105
107
|
if judge := await self.evidently_judge(
|
106
|
-
|
107
|
-
|
108
|
-
|
108
|
+
f"# Content to exam\n{input_text}\n\n# Rule Must to follow\n{rule.display()}\nDoes `Content to exam` provided above violate the `{rule.name}` provided above?"
|
109
|
+
f"should I take some measure to fix that violation? true for I do need, false for I don't need.",
|
110
|
+
**override_kwargs(kwargs, default=None),
|
109
111
|
):
|
110
112
|
logger.info(f"Rule `{rule.name}` violated: \n{judge.display()}")
|
111
113
|
return await self.propose(
|
@@ -119,11 +121,11 @@ class Check(AdvancedJudge, Propose, ABC):
|
|
119
121
|
return None
|
120
122
|
|
121
123
|
async def check_obj_against_rule[M: (Display, WithBriefing)](
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
124
|
+
self,
|
125
|
+
obj: M,
|
126
|
+
rule: Rule,
|
127
|
+
reference: str = "",
|
128
|
+
**kwargs: Unpack[ValidateKwargs[Improvement]],
|
127
129
|
) -> Optional[Improvement]:
|
128
130
|
"""Validate object against rule using text representation.
|
129
131
|
|
@@ -151,11 +153,11 @@ class Check(AdvancedJudge, Propose, ABC):
|
|
151
153
|
return await self.check_string_against_rule(input_text, rule, reference, **kwargs)
|
152
154
|
|
153
155
|
async def check_string(
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
156
|
+
self,
|
157
|
+
input_text: str,
|
158
|
+
ruleset: RuleSet,
|
159
|
+
reference: str = "",
|
160
|
+
**kwargs: Unpack[ValidateKwargs[Improvement]],
|
159
161
|
) -> Optional[List[Improvement]]:
|
160
162
|
"""Validate text against full ruleset.
|
161
163
|
|
@@ -182,11 +184,11 @@ class Check(AdvancedJudge, Propose, ABC):
|
|
182
184
|
return [imp for imp in imp_seq if imp]
|
183
185
|
|
184
186
|
async def check_obj[M: (Display, WithBriefing)](
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
187
|
+
self,
|
188
|
+
obj: M,
|
189
|
+
ruleset: RuleSet,
|
190
|
+
reference: str = "",
|
191
|
+
**kwargs: Unpack[ValidateKwargs[Improvement]],
|
190
192
|
) -> Optional[List[Improvement]]:
|
191
193
|
"""Validate object against full ruleset.
|
192
194
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"""This module contains the types for the keyword arguments of the methods in the models module."""
|
2
2
|
|
3
|
-
from fabricatio_rule.models.problem import Improvement
|
4
|
-
|
5
3
|
from fabricatio_core.models.generic import SketchedAble
|
6
4
|
from fabricatio_core.models.kwargs_types import ReferencedKwargs
|
5
|
+
|
6
|
+
from fabricatio_rule.models.problem import Improvement
|
7
7
|
from fabricatio_rule.models.rule import RuleSet
|
8
8
|
|
9
9
|
|
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
from typing import Optional, Type
|
4
4
|
|
5
|
+
from fabricatio_capabilities.models.generic import Patch
|
6
|
+
from fabricatio_core.models.generic import WithBriefing
|
5
7
|
from pydantic import BaseModel
|
6
8
|
|
7
|
-
from fabricatio_core.models.generic import Patch, WithBriefing
|
8
9
|
from fabricatio_rule.models.rule import RuleSet
|
9
10
|
|
10
11
|
|
@@ -10,11 +10,10 @@ complex rule management systems.
|
|
10
10
|
|
11
11
|
from typing import List, Self, Tuple, Unpack
|
12
12
|
|
13
|
+
from fabricatio_capabilities.models.generic import Language, PersistentAble, SketchedAble
|
14
|
+
from fabricatio_core.models.generic import WithBriefing
|
13
15
|
from more_itertools import flatten
|
14
16
|
|
15
|
-
from fabricatio_capabilities.models.generic import SketchedAble
|
16
|
-
from fabricatio_core.models.generic import Language, PersistentAble, WithBriefing
|
17
|
-
|
18
17
|
|
19
18
|
class Rule(WithBriefing, Language, SketchedAble, PersistentAble):
|
20
19
|
"""Represents a rule or guideline for a specific topic."""
|