fabricatio 0.3.14.dev2__tar.gz → 0.3.14.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.3.14.dev2 → fabricatio-0.3.14.dev5}/.github/workflows/build-package.yaml +3 -2
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/Cargo.lock +11 -1
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/Cargo.toml +4 -1
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/Makefile +1 -1
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/PKG-INFO +3 -7
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/pyproject.toml +3 -9
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/__init__.py +5 -5
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/action.py +2 -2
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/article_base.py +4 -4
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/article_main.py +3 -3
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/tool.py +3 -4
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/usages.py +7 -3
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/rust.pyi +65 -25
- fabricatio-0.3.14.dev5/src/typst_conversion/Cargo.toml +11 -0
- fabricatio-0.3.14.dev5/src/typst_conversion/src/lib.rs +74 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/typst_tools.rs +53 -99
- fabricatio-0.3.14.dev5/templates.tar.gz +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/uv.lock +371 -139
- fabricatio-0.3.14.dev2/templates.tar.gz +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/.github/workflows/ruff.yaml +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/.github/workflows/tests.yaml +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/.gitignore +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/.python-version +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/LICENSE +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/README.md +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/build.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/correct/correct.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/correct/correct_loop.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/extract_and_inject/.gitignore +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/extract_and_inject/article_rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/extract_and_inject/ask.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/extract_and_inject/chunk_article.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/extract_and_inject/extract_and_inject.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/extract_article/extract.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/llm_usages/llm_usage.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/make_a_rating/rating.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/make_diary/commits.json +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/make_diary/diary.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/minor/hello_fabricatio.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/minor/write_a_poem.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/propose_task/.gitignore +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/propose_task/propose.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/reviewer/censor.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/reviewer/review.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/rules/.gitignore +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/rules/draft_ruleset.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/search_bibtex/.gitignore +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/search_bibtex/search.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/simple_chat/chat.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/simple_rag/simple_rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/task_handle/handle_task.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/write_article/.gitignore +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/write_article/article_rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/write_article/post_process.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/write_article/write_article.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/write_outline/.gitignore +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/write_outline/write_outline.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/examples/write_outline/write_outline_corrected.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/proto/tei.proto +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/actions/__init__.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/actions/article.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/actions/article_rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/actions/fs.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/actions/output.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/actions/rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/actions/rules.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/__init__.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/advanced_judge.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/advanced_rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/censor.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/check.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/correct.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/extract.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/persist.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/propose.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/rating.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/review.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/capabilities/task.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/decorators.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/emitter.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/fs/__init__.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/fs/curd.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/fs/readers.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/journal.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/adv_kwargs_types.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/__init__.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/advanced_judge.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/aricle_rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/article_essence.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/article_outline.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/article_proposal.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/patches.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/problem.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/rule.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/generic.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/kwargs_types.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/role.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/task.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/parser.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/py.typed +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/toolboxes/__init__.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/toolboxes/arithmetic.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/toolboxes/fs.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/utils.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/workflows/__init__.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/workflows/articles.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/workflows/rag.py +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/bib_tools.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/config.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/event.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/hash.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/hbs_helpers.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/language.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/lib.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/macro_utils/Cargo.toml +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/macro_utils/src/lib.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/tei_client.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/templates.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/src/word_split.rs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/as_prompt.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/binary-exploitation-ctf-solver.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/chap_summary.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/check_string.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/claude-xml.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/clean-up-code.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/co_validation.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/create_json_obj.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/cryptography-ctf-solver.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/dependencies.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/document-the-code.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/draft_rating_criteria.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/draft_rating_manual.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/draft_rating_weights_klee.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/draft_tool_usage_code.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/extract.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/extract_criteria_from_reasons.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/extract_reasons_from_examples.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/find-security-vulnerabilities.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/fix-bugs.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/fix_troubled_obj.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/fix_troubled_string.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/generic_string.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/improve-performance.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/liststr.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/make_choice.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/make_judgment.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/pathstr.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/rate_fine_grind.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/refactor.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/refined_query.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/retrieved_display.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/reverse-engineering-ctf-solver.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/review_string.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/rule_requirement.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/ruleset_requirement_breakdown.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/task_briefing.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/web-ctf-solver.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/write-git-commit.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/write-github-pull-request.hbs +0 -0
- {fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/templates/built-in/write-github-readme.hbs +0 -0
@@ -14,6 +14,7 @@ jobs:
|
|
14
14
|
strategy:
|
15
15
|
matrix:
|
16
16
|
os: [ windows-latest, ubuntu-latest ]
|
17
|
+
python-version: [ "3.12", "3.13" ]
|
17
18
|
steps:
|
18
19
|
- name: Checkout repository
|
19
20
|
uses: actions/checkout@v4
|
@@ -65,7 +66,7 @@ jobs:
|
|
65
66
|
uv sync --no-install-project --all-extras --index https://pypi.org/simple
|
66
67
|
- name: Build
|
67
68
|
run: |
|
68
|
-
make
|
69
|
+
make PY=${{ matrix.python-version }}
|
69
70
|
|
70
71
|
- name: Packing templates
|
71
72
|
if: ${{ steps.check_version_change.outputs.VERSION_CHANGED == 'true' }}
|
@@ -90,7 +91,7 @@ jobs:
|
|
90
91
|
- name: Upload to PyPI
|
91
92
|
if: ${{ steps.check_version_change.outputs.VERSION_CHANGED == 'true' }}
|
92
93
|
run: |
|
93
|
-
make publish
|
94
|
+
make publish PY=${{ matrix.python-version }}
|
94
95
|
env:
|
95
96
|
MATURIN_USERNAME: __token__
|
96
97
|
MATURIN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
@@ -607,6 +607,7 @@ dependencies = [
|
|
607
607
|
"tex2typst-rs",
|
608
608
|
"tonic",
|
609
609
|
"tonic-build",
|
610
|
+
"typst_conversion",
|
610
611
|
"unicode-segmentation",
|
611
612
|
"validator",
|
612
613
|
"walkdir",
|
@@ -2578,11 +2579,11 @@ dependencies = [
|
|
2578
2579
|
"clap",
|
2579
2580
|
"dirs",
|
2580
2581
|
"flate2",
|
2581
|
-
"regex",
|
2582
2582
|
"reqwest",
|
2583
2583
|
"serde_json",
|
2584
2584
|
"tar",
|
2585
2585
|
"tex2typst-rs",
|
2586
|
+
"typst_conversion",
|
2586
2587
|
]
|
2587
2588
|
|
2588
2589
|
[[package]]
|
@@ -2659,6 +2660,15 @@ version = "1.18.0"
|
|
2659
2660
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2660
2661
|
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
|
2661
2662
|
|
2663
|
+
[[package]]
|
2664
|
+
name = "typst_conversion"
|
2665
|
+
version = "0.1.0"
|
2666
|
+
dependencies = [
|
2667
|
+
"log",
|
2668
|
+
"regex",
|
2669
|
+
"tex2typst-rs",
|
2670
|
+
]
|
2671
|
+
|
2662
2672
|
[[package]]
|
2663
2673
|
name = "ucd-trie"
|
2664
2674
|
version = "0.1.7"
|
@@ -27,13 +27,15 @@ dotenvy = "0.15.7"
|
|
27
27
|
directories-next = "2.0.0"
|
28
28
|
log = "0.4.27"
|
29
29
|
pyo3-log = "0.12.3"
|
30
|
-
macro_utils = { path = "src/macro_utils" }
|
31
30
|
strum = { version = "0.27.1", features = ["derive"] }
|
32
31
|
bincode = { version = "2.0.1", features = ["serde"] }
|
33
32
|
|
34
33
|
tonic = "0.13.0"
|
35
34
|
prost = "0.13.5"
|
36
35
|
pyo3-async-runtimes = { version = "0.24.0", features = ["tokio-runtime"] }
|
36
|
+
macro_utils = { path = "src/macro_utils" }
|
37
|
+
typst_conversion = { path = "src/typst_conversion" }
|
38
|
+
|
37
39
|
|
38
40
|
|
39
41
|
[build-dependencies]
|
@@ -43,3 +45,4 @@ tonic-build = "0.13.0"
|
|
43
45
|
[workspace.package]
|
44
46
|
authors = ["Whth <zettainspector@foxmail.com>"]
|
45
47
|
license-file = "LICENSE"
|
48
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fabricatio
|
3
|
-
Version: 0.3.14.
|
3
|
+
Version: 0.3.14.dev5
|
4
4
|
Classifier: License :: OSI Approved :: MIT License
|
5
5
|
Classifier: Programming Language :: Rust
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -18,17 +18,13 @@ Requires-Dist: pydantic>=2.10.6
|
|
18
18
|
Requires-Dist: pymitter>=1.0.0
|
19
19
|
Requires-Dist: rich>=13.9.4
|
20
20
|
Requires-Dist: ujson>=5.10.0
|
21
|
-
Requires-Dist: fabricatio[
|
21
|
+
Requires-Dist: fabricatio[ftd,qa,rag,cli] ; extra == 'full'
|
22
22
|
Requires-Dist: pymilvus>=2.5.4 ; extra == 'rag'
|
23
|
-
Requires-Dist: sympy>=1.13.3 ; extra == 'calc'
|
24
|
-
Requires-Dist: matplotlib>=3.10.1 ; extra == 'plot'
|
25
23
|
Requires-Dist: questionary>=2.1.0 ; extra == 'qa'
|
26
24
|
Requires-Dist: magika>=0.6.1 ; extra == 'ftd'
|
27
25
|
Requires-Dist: typer-slim[standard]>=0.15.2 ; extra == 'cli'
|
28
26
|
Provides-Extra: full
|
29
27
|
Provides-Extra: rag
|
30
|
-
Provides-Extra: calc
|
31
|
-
Provides-Extra: plot
|
32
28
|
Provides-Extra: qa
|
33
29
|
Provides-Extra: ftd
|
34
30
|
Provides-Extra: cli
|
@@ -36,7 +32,7 @@ License-File: LICENSE
|
|
36
32
|
Summary: A LLM multi-agent framework.
|
37
33
|
Keywords: ai,agents,multi-agent,llm,pyo3
|
38
34
|
Author-email: Whth <zettainspector@foxmail.com>
|
39
|
-
Requires-Python: >=3.12, <3.
|
35
|
+
Requires-Python: >=3.12, <3.14
|
40
36
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
41
37
|
Project-URL: Homepage, https://github.com/Whth/fabricatio
|
42
38
|
Project-URL: Repository, https://github.com/Whth/fabricatio
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "fabricatio"
|
3
|
-
version = "0.3.14-
|
3
|
+
version = "0.3.14-dev5"
|
4
4
|
description = "A LLM multi-agent framework."
|
5
5
|
readme = "README.md"
|
6
6
|
license = { file = "LICENSE" }
|
@@ -25,7 +25,7 @@ keywords = [
|
|
25
25
|
]
|
26
26
|
|
27
27
|
|
28
|
-
requires-python = ">=3.12,<3.
|
28
|
+
requires-python = ">=3.12,<3.14"
|
29
29
|
dependencies = [
|
30
30
|
"asyncio>=3.4.3",
|
31
31
|
"asyncstdlib>=3.13.0",
|
@@ -72,18 +72,12 @@ dev = [
|
|
72
72
|
|
73
73
|
[project.optional-dependencies]
|
74
74
|
full = [
|
75
|
-
"fabricatio[
|
75
|
+
"fabricatio[ftd,qa,rag,cli]",
|
76
76
|
]
|
77
77
|
rag = [
|
78
78
|
"pymilvus>=2.5.4",
|
79
79
|
]
|
80
80
|
|
81
|
-
calc = [
|
82
|
-
"sympy>=1.13.3",
|
83
|
-
]
|
84
|
-
plot = [
|
85
|
-
"matplotlib>=3.10.1",
|
86
|
-
]
|
87
81
|
qa = [
|
88
82
|
"questionary>=2.1.0",
|
89
83
|
]
|
@@ -1,19 +1,17 @@
|
|
1
1
|
"""Fabricatio is a Python library for building llm app using event-based agent structure."""
|
2
2
|
|
3
|
-
from fabricatio import actions, capabilities, parser, toolboxes, workflows
|
3
|
+
from fabricatio import actions, capabilities, fs, models, parser, toolboxes, utils, workflows
|
4
4
|
from fabricatio.journal import logger
|
5
|
-
from fabricatio.models import extra
|
6
5
|
from fabricatio.models.action import Action, WorkFlow
|
7
6
|
from fabricatio.models.role import Role
|
8
7
|
from fabricatio.models.task import Task
|
9
8
|
from fabricatio.models.tool import ToolBox
|
10
|
-
from fabricatio.rust import CONFIG, TEMPLATE_MANAGER,
|
9
|
+
from fabricatio.rust import CONFIG, TEMPLATE_MANAGER, Event
|
11
10
|
|
12
11
|
__all__ = [
|
13
12
|
"CONFIG",
|
14
13
|
"TEMPLATE_MANAGER",
|
15
14
|
"Action",
|
16
|
-
"BibManager",
|
17
15
|
"Event",
|
18
16
|
"Role",
|
19
17
|
"Task",
|
@@ -21,9 +19,11 @@ __all__ = [
|
|
21
19
|
"WorkFlow",
|
22
20
|
"actions",
|
23
21
|
"capabilities",
|
24
|
-
"
|
22
|
+
"fs",
|
25
23
|
"logger",
|
24
|
+
"models",
|
26
25
|
"parser",
|
27
26
|
"toolboxes",
|
27
|
+
"utils",
|
28
28
|
"workflows",
|
29
29
|
]
|
@@ -125,10 +125,10 @@ class WorkFlow(WithBriefing):
|
|
125
125
|
steps: Sequence[Union[Type[Action], Action]] = Field(frozen=True)
|
126
126
|
"""The sequence of actions to be executed, can be action classes or instances."""
|
127
127
|
|
128
|
-
task_input_key: ClassVar[str] =
|
128
|
+
task_input_key: ClassVar[str] = INPUT_KEY
|
129
129
|
"""Key used to store the input task in the context dictionary."""
|
130
130
|
|
131
|
-
task_output_key: ClassVar[str] =
|
131
|
+
task_output_key: ClassVar[str] = OUTPUT_KEY
|
132
132
|
"""Key used to extract the final result from the context dictionary."""
|
133
133
|
|
134
134
|
extra_init_context: Dict[str, Any] = Field(default_factory=dict, frozen=True)
|
{fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/article_base.py
RENAMED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
from abc import ABC
|
4
4
|
from enum import StrEnum
|
5
|
+
from fabricatio.rust import extract_body, replace_thesis_body, split_out_metadata, to_metadata, word_count
|
5
6
|
from pathlib import Path
|
7
|
+
from pydantic import Field
|
6
8
|
from typing import ClassVar, Generator, List, Optional, Self, Tuple, Type
|
7
9
|
|
8
10
|
from fabricatio.capabilities.persist import PersistentAble
|
@@ -21,9 +23,7 @@ from fabricatio.models.generic import (
|
|
21
23
|
Titled,
|
22
24
|
WordCount,
|
23
25
|
)
|
24
|
-
from fabricatio.rust import extract_body, inplace_update, split_out_metadata, to_metadata, word_count
|
25
26
|
from fabricatio.utils import fallback_kwargs, ok
|
26
|
-
from pydantic import Field
|
27
27
|
|
28
28
|
ARTICLE_WRAPPER = "// =-=-=-=-=-=-=-=-=-="
|
29
29
|
|
@@ -275,7 +275,7 @@ class ArticleBase[T: ChapterBase](FinalizedDumpAble, AsPrompt, FromTypstCode, To
|
|
275
275
|
)
|
276
276
|
|
277
277
|
def iter_dfs_rev(
|
278
|
-
|
278
|
+
self,
|
279
279
|
) -> Generator[ArticleOutlineBase, None, None]:
|
280
280
|
"""Performs a depth-first search (DFS) through the article structure in reverse order.
|
281
281
|
|
@@ -405,7 +405,7 @@ class ArticleBase[T: ChapterBase](FinalizedDumpAble, AsPrompt, FromTypstCode, To
|
|
405
405
|
"""Update the article file."""
|
406
406
|
file = Path(file)
|
407
407
|
string = safe_text_read(file)
|
408
|
-
if updated :=
|
408
|
+
if updated := replace_thesis_body(string, ARTICLE_WRAPPER, self.to_typst_code()):
|
409
409
|
dump_text(file, updated)
|
410
410
|
logger.success(f"Successfully updated {file.as_posix()}.")
|
411
411
|
else:
|
{fabricatio-0.3.14.dev2 → fabricatio-0.3.14.dev5}/python/fabricatio/models/extra/article_main.py
RENAMED
@@ -27,7 +27,7 @@ from fabricatio.rust import (
|
|
27
27
|
)
|
28
28
|
from pydantic import Field, NonNegativeInt
|
29
29
|
|
30
|
-
PARAGRAPH_SEP = "
|
30
|
+
PARAGRAPH_SEP = "// - - -"
|
31
31
|
|
32
32
|
|
33
33
|
class Paragraph(SketchedAble, WordCount, Described):
|
@@ -50,7 +50,7 @@ class Paragraph(SketchedAble, WordCount, Described):
|
|
50
50
|
@classmethod
|
51
51
|
def from_content(cls, content: str) -> Self:
|
52
52
|
"""Create a Paragraph object from the given content."""
|
53
|
-
return cls(elaboration="", aims=[], expected_word_count=word_count(content), content=content)
|
53
|
+
return cls(elaboration="", aims=[], expected_word_count=word_count(content), content=content.strip())
|
54
54
|
|
55
55
|
@property
|
56
56
|
def exact_wordcount(self) -> int:
|
@@ -103,7 +103,7 @@ class ArticleSubsection(SubSectionBase):
|
|
103
103
|
Returns:
|
104
104
|
str: Typst code snippet for rendering.
|
105
105
|
"""
|
106
|
-
return super().to_typst_code() + PARAGRAPH_SEP.join(p.content for p in self.paragraphs)
|
106
|
+
return super().to_typst_code() + f"\n\n{PARAGRAPH_SEP}\n\n".join(p.content for p in self.paragraphs)
|
107
107
|
|
108
108
|
@classmethod
|
109
109
|
def from_typst_code(cls, title: str, body: str, **kwargs) -> Self:
|
@@ -12,9 +12,9 @@ from typing import Any, Callable, Dict, List, Optional, Self, cast, overload
|
|
12
12
|
|
13
13
|
from fabricatio.decorators import logging_execution_info, use_temp_module
|
14
14
|
from fabricatio.journal import logger
|
15
|
-
from fabricatio.models.generic import WithBriefing
|
15
|
+
from fabricatio.models.generic import Base, WithBriefing
|
16
16
|
from fabricatio.rust import CONFIG
|
17
|
-
from pydantic import
|
17
|
+
from pydantic import Field
|
18
18
|
|
19
19
|
|
20
20
|
class Tool[**P, R](WithBriefing):
|
@@ -181,7 +181,7 @@ class ToolBox(WithBriefing):
|
|
181
181
|
return hash(self.briefing)
|
182
182
|
|
183
183
|
|
184
|
-
class ToolExecutor(
|
184
|
+
class ToolExecutor(Base):
|
185
185
|
"""A class representing a tool executor with a sequence of tools to execute.
|
186
186
|
|
187
187
|
This class manages a sequence of tools and provides methods to inject tools and data into a module, execute the tools,
|
@@ -192,7 +192,6 @@ class ToolExecutor(BaseModel):
|
|
192
192
|
data (Dict[str, Any]): The data that could be used when invoking the tools.
|
193
193
|
"""
|
194
194
|
|
195
|
-
model_config = ConfigDict(use_attribute_docstrings=True)
|
196
195
|
candidates: List[Tool] = Field(default_factory=list, frozen=True)
|
197
196
|
"""The sequence of tools to execute."""
|
198
197
|
|
@@ -6,7 +6,6 @@ from asyncio import gather
|
|
6
6
|
from typing import Callable, Dict, Iterable, List, Literal, Optional, Self, Sequence, Set, Union, Unpack, overload
|
7
7
|
|
8
8
|
import asyncstdlib
|
9
|
-
import litellm
|
10
9
|
from fabricatio.decorators import logging_exec_time
|
11
10
|
from fabricatio.journal import logger
|
12
11
|
from fabricatio.models.generic import ScopedConfig, WithBriefing
|
@@ -15,7 +14,12 @@ from fabricatio.models.task import Task
|
|
15
14
|
from fabricatio.models.tool import Tool, ToolBox
|
16
15
|
from fabricatio.rust import CONFIG, TEMPLATE_MANAGER
|
17
16
|
from fabricatio.utils import first_available, ok
|
18
|
-
from litellm import
|
17
|
+
from litellm import ( # pyright: ignore [reportPrivateImportUsage]
|
18
|
+
RateLimitError,
|
19
|
+
Router,
|
20
|
+
aembedding,
|
21
|
+
stream_chunk_builder,
|
22
|
+
)
|
19
23
|
from litellm.types.router import Deployment, LiteLLM_Params, ModelInfo
|
20
24
|
from litellm.types.utils import (
|
21
25
|
Choices,
|
@@ -534,7 +538,7 @@ class EmbeddingUsage(LLMUsage, ABC):
|
|
534
538
|
logger.error(err := f"Input text exceeds maximum sequence length {max_len}, got {length}.")
|
535
539
|
raise ValueError(err)
|
536
540
|
|
537
|
-
return await
|
541
|
+
return await aembedding(
|
538
542
|
input=input_text,
|
539
543
|
caching=caching or self.embedding_caching or CONFIG.embedding.caching,
|
540
544
|
dimensions=dimensions or self.embedding_dimensions or CONFIG.embedding.dimensions,
|