fabricatio 0.2.13.dev1__tar.gz → 0.2.13.dev3__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.
Files changed (167) hide show
  1. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/PKG-INFO +1 -1
  2. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/write_article/write_article.py +4 -4
  3. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/pyproject.toml +1 -1
  4. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/actions/article_rag.py +52 -71
  5. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/advanced_rag.py +5 -1
  6. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/rag.py +7 -1
  7. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/adv_kwargs_types.py +1 -0
  8. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/aricle_rag.py +26 -11
  9. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/article_base.py +27 -2
  10. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/article_main.py +1 -0
  11. fabricatio-0.2.13.dev3/python/fabricatio/models/extra/article_outline.py +45 -0
  12. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/rust.pyi +65 -1
  13. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/utils.py +2 -2
  14. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/typst_tools.rs +52 -2
  15. fabricatio-0.2.13.dev3/templates.tar.gz +0 -0
  16. fabricatio-0.2.13.dev3/uv.lock +1706 -0
  17. fabricatio-0.2.13.dev1/python/fabricatio/models/extra/article_outline.py +0 -78
  18. fabricatio-0.2.13.dev1/templates.tar.gz +0 -0
  19. fabricatio-0.2.13.dev1/uv.lock +0 -1706
  20. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/.github/workflows/build-package.yaml +0 -0
  21. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/.github/workflows/ruff.yaml +0 -0
  22. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/.github/workflows/tests.yaml +0 -0
  23. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/.gitignore +0 -0
  24. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/.python-version +0 -0
  25. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/Cargo.lock +0 -0
  26. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/Cargo.toml +0 -0
  27. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/LICENSE +0 -0
  28. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/Makefile +0 -0
  29. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/README.md +0 -0
  30. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/correct/correct.py +0 -0
  31. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/correct/correct_loop.py +0 -0
  32. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/extract_and_inject/.gitignore +0 -0
  33. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/extract_and_inject/article_rag.py +0 -0
  34. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/extract_and_inject/ask.py +0 -0
  35. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/extract_and_inject/chunk_article.py +0 -0
  36. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/extract_and_inject/extract_and_inject.py +0 -0
  37. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/extract_article/extract.py +0 -0
  38. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/llm_usages/llm_usage.py +0 -0
  39. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/make_a_rating/rating.py +0 -0
  40. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/make_diary/commits.json +0 -0
  41. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/make_diary/diary.py +0 -0
  42. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/minor/hello_fabricatio.py +0 -0
  43. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/minor/write_a_poem.py +0 -0
  44. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/propose_task/.gitignore +0 -0
  45. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/propose_task/propose.py +0 -0
  46. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/reviewer/censor.py +0 -0
  47. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/reviewer/review.py +0 -0
  48. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/rules/.gitignore +0 -0
  49. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/rules/draft_ruleset.py +0 -0
  50. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/search_bibtex/.gitignore +0 -0
  51. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/search_bibtex/search.py +0 -0
  52. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/simple_chat/chat.py +0 -0
  53. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/simple_rag/simple_rag.py +0 -0
  54. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/task_handle/handle_task.py +0 -0
  55. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/write_article/.gitignore +0 -0
  56. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/write_article/article_rag.py +0 -0
  57. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/write_article/post_process.py +0 -0
  58. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/write_outline/.gitignore +0 -0
  59. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/write_outline/write_outline.py +0 -0
  60. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/examples/write_outline/write_outline_corrected.py +0 -0
  61. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/__init__.py +0 -0
  62. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/actions/__init__.py +0 -0
  63. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/actions/article.py +0 -0
  64. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/actions/fs.py +0 -0
  65. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/actions/output.py +0 -0
  66. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/actions/rag.py +0 -0
  67. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/actions/rules.py +0 -0
  68. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/__init__.py +0 -0
  69. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/advanced_judge.py +0 -0
  70. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/censor.py +0 -0
  71. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/check.py +0 -0
  72. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/correct.py +0 -0
  73. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/extract.py +0 -0
  74. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/propose.py +0 -0
  75. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/rating.py +0 -0
  76. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/review.py +0 -0
  77. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/capabilities/task.py +0 -0
  78. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/config.py +0 -0
  79. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/constants.py +0 -0
  80. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/core.py +0 -0
  81. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/decorators.py +0 -0
  82. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/fs/__init__.py +0 -0
  83. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/fs/curd.py +0 -0
  84. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/fs/readers.py +0 -0
  85. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/journal.py +0 -0
  86. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/action.py +0 -0
  87. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/events.py +0 -0
  88. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/__init__.py +0 -0
  89. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/advanced_judge.py +0 -0
  90. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/article_essence.py +0 -0
  91. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/article_proposal.py +0 -0
  92. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/patches.py +0 -0
  93. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/problem.py +0 -0
  94. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/rag.py +0 -0
  95. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/extra/rule.py +0 -0
  96. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/generic.py +0 -0
  97. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/kwargs_types.py +0 -0
  98. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/role.py +0 -0
  99. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/task.py +0 -0
  100. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/tool.py +0 -0
  101. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/models/usages.py +0 -0
  102. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/parser.py +0 -0
  103. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/py.typed +0 -0
  104. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/rust_instances.py +0 -0
  105. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/toolboxes/__init__.py +0 -0
  106. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/toolboxes/arithmetic.py +0 -0
  107. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/toolboxes/fs.py +0 -0
  108. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/workflows/__init__.py +0 -0
  109. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/workflows/articles.py +0 -0
  110. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/python/fabricatio/workflows/rag.py +0 -0
  111. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/bib_tools.rs +0 -0
  112. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/hash.rs +0 -0
  113. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/hbs_helpers.rs +0 -0
  114. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/language.rs +0 -0
  115. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/lib.rs +0 -0
  116. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/templates.rs +0 -0
  117. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/src/word_split.rs +0 -0
  118. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/as_prompt.hbs +0 -0
  119. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/binary-exploitation-ctf-solver.hbs +0 -0
  120. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/chap_summary.hbs +0 -0
  121. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/check_string.hbs +0 -0
  122. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/claude-xml.hbs +0 -0
  123. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/clean-up-code.hbs +0 -0
  124. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/co_validation.hbs +0 -0
  125. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/create_json_obj.hbs +0 -0
  126. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/cryptography-ctf-solver.hbs +0 -0
  127. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/dependencies.hbs +0 -0
  128. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/document-the-code.hbs +0 -0
  129. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/draft_rating_criteria.hbs +0 -0
  130. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/draft_rating_manual.hbs +0 -0
  131. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/draft_rating_weights_klee.hbs +0 -0
  132. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/draft_tool_usage_code.hbs +0 -0
  133. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/extract.hbs +0 -0
  134. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/extract_criteria_from_reasons.hbs +0 -0
  135. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/extract_reasons_from_examples.hbs +0 -0
  136. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/find-security-vulnerabilities.hbs +0 -0
  137. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/fix-bugs.hbs +0 -0
  138. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/fix_troubled_obj.hbs +0 -0
  139. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/fix_troubled_string.hbs +0 -0
  140. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/generic_string.hbs +0 -0
  141. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/improve-performance.hbs +0 -0
  142. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/liststr.hbs +0 -0
  143. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/make_choice.hbs +0 -0
  144. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/make_judgment.hbs +0 -0
  145. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/pathstr.hbs +0 -0
  146. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/rate_fine_grind.hbs +0 -0
  147. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/refactor.hbs +0 -0
  148. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/refined_query.hbs +0 -0
  149. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/retrieved_display.hbs +0 -0
  150. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/reverse-engineering-ctf-solver.hbs +0 -0
  151. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/review_string.hbs +0 -0
  152. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/rule_requirement.hbs +0 -0
  153. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/ruleset_requirement_breakdown.hbs +0 -0
  154. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/task_briefing.hbs +0 -0
  155. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/web-ctf-solver.hbs +0 -0
  156. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/write-git-commit.hbs +0 -0
  157. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/write-github-pull-request.hbs +0 -0
  158. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/templates/built-in/write-github-readme.hbs +0 -0
  159. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_config.py +0 -0
  160. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_action.py +0 -0
  161. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_advanced.py +0 -0
  162. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_generic.py +0 -0
  163. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_problem.py +0 -0
  164. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_role.py +0 -0
  165. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_task.py +0 -0
  166. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_tool.py +0 -0
  167. {fabricatio-0.2.13.dev1 → fabricatio-0.2.13.dev3}/tests/test_models/test_usages.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fabricatio
3
- Version: 0.2.13.dev1
3
+ Version: 0.2.13.dev3
4
4
  Classifier: License :: OSI Approved :: MIT License
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -26,10 +26,9 @@ from typer import Typer
26
26
  Role(
27
27
  name="Undergraduate Researcher",
28
28
  description="Write an outline for an article in typst format.",
29
- llm_model="openai/qwen-plus",
30
- llm_temperature=0.45,
29
+ llm_model="openai/qwen3-235b-a22b",
31
30
  # llm_api_endpoint=HttpUrl("https://dashscope.aliyuncs.com/compatible-mode/v1"),
32
- llm_top_p=0.95,
31
+ llm_stream=True,
33
32
  llm_max_tokens=8191,
34
33
  llm_rpm=600,
35
34
  llm_tpm=900000,
@@ -49,7 +48,7 @@ Role(
49
48
  threshold=0.58,
50
49
  result_per_query=2,
51
50
  extractor_model={"model": "openai/qwen-max"},
52
- query_model={"model": "openai/qwen-turbo", "temperature": 0.3, "top_p": 0.85},
51
+ query_model={"model": "openai/qwen-turbo"},
53
52
  )
54
53
  ),
55
54
  PersistentAll,
@@ -212,6 +211,7 @@ def suma(
212
211
  ),
213
212
  dump_path: Path = typer.Option(Path("out.typ"), "-d", "--dump-path", help="Path to dump the final output."), # noqa: B008
214
213
  ) -> None:
214
+ """Write chap summary based on given article."""
215
215
  path = ok(
216
216
  asyncio.run(
217
217
  Task(name="write an article")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fabricatio"
3
- version = "0.2.13-dev1"
3
+ version = "0.2.13-dev3"
4
4
  description = "A LLM multi-agent framework."
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -20,18 +20,26 @@ from fabricatio.models.extra.article_main import Article, ArticleChapter, Articl
20
20
  from fabricatio.models.extra.article_outline import ArticleOutline
21
21
  from fabricatio.models.extra.rule import RuleSet
22
22
  from fabricatio.models.kwargs_types import ChooseKwargs, LLMKwargs
23
- from fabricatio.rust import convert_to_block_formula, convert_to_inline_formula
24
- from fabricatio.utils import ask_retain, ok
23
+ from fabricatio.rust import (
24
+ convert_all_block_tex,
25
+ convert_all_inline_tex,
26
+ convert_to_block_formula,
27
+ convert_to_inline_formula,
28
+ fix_misplaced_labels,
29
+ )
30
+ from fabricatio.utils import ok
25
31
 
26
32
  TYPST_CITE_USAGE = (
27
- "citation number is REQUIRED to cite any reference!,for example in Auther Pattern: 'Doe et al.[[1]], Jack et al.[[2]]' or in Sentence Suffix Sattern: 'Global requirement is incresing[[1]].'\n"
28
- "Everything is build upon the typst language, which is similar to latex, \n"
33
+ "citation number is REQUIRED to cite any reference!'\n"
29
34
  "Legal citing syntax examples(seperated by |): [[1]]|[[1,2]]|[[1-3]]|[[12,13-15]]|[[1-3,5-7]]\n"
30
35
  "Illegal citing syntax examples(seperated by |): [[1],[2],[3]]|[[1],[1-2]]\n"
31
- "Those reference mark shall not be omitted during the extraction\n"
36
+ "You SHALL not cite a single reference more than once!"
32
37
  "It's recommended to cite multiple references that supports your conclusion at a time.\n"
38
+ )
39
+
40
+ TYPST_MATH_USAGE = (
33
41
  "Wrap inline expression with '\\(' and '\\)',like '\\(>5m\\)' '\\(89%\\)', and wrap block equation with '\\[' and '\\]'.\n"
34
- "In addition to that, you can add a label outside the block equation which can be used as a cross reference identifier, the label is a string wrapped in `<` and `>` like `<energy-release-rate-equation>`.Note that the label string should be a summarizing title for the equation being labeled.\n"
42
+ "In addition to that, you can add a label outside the block equation which can be used as a cross reference identifier, the label is a string wrapped in `<` and `>` like `<energy-release-rate-equation>`.Note that the label string should be a summarizing title for the equation being labeled and should never be written within the formula block.\n"
35
43
  "you can refer to that label by using the syntax with prefix of `@eqt:`, which indicate that this notation is citing a label from the equations. For example ' @eqt:energy-release-rate-equation ' DO remember that the notation shall have both suffixed and prefixed space char which enable the compiler to distinguish the notation from the plaintext."
36
44
  "Below is two usage example:\n"
37
45
  "```typst\n"
@@ -44,9 +52,10 @@ TYPST_CITE_USAGE = (
44
52
  )
45
53
 
46
54
 
47
- class WriteArticleContentRAG(Action, RAG, Extract):
55
+ class WriteArticleContentRAG(Action, Extract, AdvancedRAG):
48
56
  """Write an article based on the provided outline."""
49
57
 
58
+ ctx_override: ClassVar[bool] = True
50
59
  search_increment_multiplier: float = 1.6
51
60
  """The increment multiplier of the search increment."""
52
61
  ref_limit: int = 35
@@ -55,15 +64,19 @@ class WriteArticleContentRAG(Action, RAG, Extract):
55
64
  """The threshold of relevance"""
56
65
  extractor_model: LLMKwargs
57
66
  """The model to use for extracting the content from the retrieved references."""
58
- query_model: LLMKwargs
67
+ query_model: ChooseKwargs
59
68
  """The model to use for querying the database"""
60
69
  supervisor: bool = False
61
70
  """Whether to use supervisor mode"""
62
71
  result_per_query: PositiveInt = 4
63
72
  """The number of results to be returned per query."""
64
- req: str = TYPST_CITE_USAGE
73
+ cite_req: str = TYPST_CITE_USAGE
65
74
  """The req of the write article content."""
66
75
 
76
+ math_req: str = TYPST_MATH_USAGE
77
+ """The req of the write article content."""
78
+ tei_endpoint: Optional[str] = None
79
+
67
80
  async def _execute(
68
81
  self,
69
82
  article_outline: ArticleOutline,
@@ -103,30 +116,25 @@ class WriteArticleContentRAG(Action, RAG, Extract):
103
116
  cm = CitationManager()
104
117
  await self.search_database(article, article_outline, chap, sec, subsec, cm)
105
118
 
106
- raw = await self.write_raw(article, article_outline, chap, sec, subsec, cm)
107
- r_print(raw)
119
+ raw_paras = await self.write_raw(article, article_outline, chap, sec, subsec, cm)
120
+ r_print(raw_paras)
108
121
 
109
122
  while not await confirm("Accept this version and continue?").ask_async():
110
123
  if inst := await text("Search for more refs for additional spec.").ask_async():
111
- await self.search_database(
112
- article,
113
- article_outline,
114
- chap,
115
- sec,
116
- subsec,
117
- cm,
118
- supervisor=True,
119
- extra_instruction=inst,
120
- )
124
+ await self.search_database(article, article_outline, chap, sec, subsec, cm, extra_instruction=inst)
121
125
 
122
126
  if instruction := await text("Enter the instructions to improve").ask_async():
123
- raw = await self.write_raw(article, article_outline, chap, sec, subsec, cm, instruction)
124
- if edt := await text("Edit", default=raw).ask_async():
125
- raw = edt
127
+ raw_paras = await self.write_raw(article, article_outline, chap, sec, subsec, cm, instruction)
128
+ if edt := await text("Edit", default=raw_paras).ask_async():
129
+ raw_paras = edt
126
130
 
127
- r_print(raw)
131
+ raw_paras = fix_misplaced_labels(raw_paras)
132
+ raw_paras = convert_all_inline_tex(raw_paras)
133
+ raw_paras = convert_all_block_tex(raw_paras)
128
134
 
129
- return await self.extract_new_subsec(subsec, raw, cm)
135
+ r_print(raw_paras)
136
+
137
+ return await self.extract_new_subsec(subsec, raw_paras, cm)
130
138
 
131
139
  async def _inner(
132
140
  self,
@@ -144,6 +152,10 @@ class WriteArticleContentRAG(Action, RAG, Extract):
144
152
 
145
153
  raw_paras = "\n".join(p for p in raw_paras.splitlines() if p and not p.endswith("**") and not p.startswith("#"))
146
154
 
155
+ raw_paras = fix_misplaced_labels(raw_paras)
156
+ raw_paras = convert_all_inline_tex(raw_paras)
157
+ raw_paras = convert_all_block_tex(raw_paras)
158
+
147
159
  return await self.extract_new_subsec(subsec, raw_paras, cm)
148
160
 
149
161
  async def extract_new_subsec(
@@ -155,12 +167,13 @@ class WriteArticleContentRAG(Action, RAG, Extract):
155
167
  ArticleSubsection,
156
168
  raw_paras,
157
169
  f"Above is the subsection titled `{subsec.title}`.\n"
158
- f"I need you to extract the content to update my subsection obj provided below.\n{self.req}"
159
- f"{subsec.display()}\n",
170
+ f"I need you to extract the content to construct a new `{ArticleSubsection.__class__.__name__}`,"
171
+ f"Do not attempt to change the original content, your job is ONLY content extraction",
160
172
  **self.extractor_model,
161
173
  ),
162
174
  "Failed to propose new subsection.",
163
175
  )
176
+
164
177
  for p in new_subsec.paragraphs:
165
178
  p.content = cm.apply(p.content)
166
179
  p.description = cm.apply(p.description)
@@ -184,7 +197,7 @@ class WriteArticleContentRAG(Action, RAG, Extract):
184
197
  f"{article_outline.finalized_dump()}\n\nAbove is my article outline, I m writing graduate thesis titled `{article.title}`. "
185
198
  f"More specifically, i m witting the Chapter `{chap.title}` >> Section `{sec.title}` >> Subsection `{subsec.title}`.\n"
186
199
  f"Please help me write the paragraphs of the subsec mentioned above, which is `{subsec.title}`.\n"
187
- f"{self.req}\n"
200
+ f"{self.cite_req}\n{self.math_req}\n"
188
201
  f"You SHALL use `{article.language}` as writing language.\n{extra_instruction}\n"
189
202
  f"Do not use numbered list to display the outcome, you should regard you are writing the main text of the thesis.\n"
190
203
  f"You should not copy others' works from the references directly on to my thesis, we can only harness the conclusion they have drawn.\n"
@@ -200,7 +213,6 @@ class WriteArticleContentRAG(Action, RAG, Extract):
200
213
  subsec: ArticleSubsection,
201
214
  cm: CitationManager,
202
215
  extra_instruction: str = "",
203
- supervisor: bool = False,
204
216
  ) -> None:
205
217
  """Search database for related references."""
206
218
  search_req = (
@@ -208,51 +220,20 @@ class WriteArticleContentRAG(Action, RAG, Extract):
208
220
  f"More specifically, i m witting the Chapter `{chap.title}` >> Section `{sec.title}` >> Subsection `{subsec.title}`.\n"
209
221
  f"I need to search related references to build up the content of the subsec mentioned above, which is `{subsec.title}`.\n"
210
222
  f"provide 10~16 queries as possible, to get best result!\n"
211
- f"You should provide both English version and chinese version of the refined queries!\n{extra_instruction}\n"
212
- )
213
-
214
- ref_q = ok(
215
- await self.arefined_query(
216
- search_req,
217
- **self.query_model,
218
- ),
219
- "Failed to refine query.",
223
+ f"You should provide both English version and chinese version of the refined queries!\n{extra_instruction}"
220
224
  )
221
225
 
222
- if supervisor:
223
- ref_q = await ask_retain(ref_q)
224
- ret = await self.aretrieve(
225
- ref_q,
226
- ArticleChunk,
227
- max_accepted=self.ref_limit,
226
+ await self.clued_search(
227
+ search_req,
228
+ cm,
229
+ refinery_kwargs=self.query_model,
230
+ expand_multiplier=self.search_increment_multiplier,
231
+ base_accepted=self.ref_limit,
228
232
  result_per_query=self.result_per_query,
229
233
  similarity_threshold=self.threshold,
234
+ tei_endpoint=self.tei_endpoint,
230
235
  )
231
236
 
232
- cm.add_chunks(ok(ret))
233
- ref_q = await self.arefined_query(
234
- f"{cm.as_prompt()}\n\nAbove is the retrieved references in the first RAG, now we need to perform the second RAG.\n\n{search_req}",
235
- **self.query_model,
236
- )
237
-
238
- if ref_q is None:
239
- logger.warning("Second refine query is None, skipping.")
240
- return
241
- if supervisor:
242
- ref_q = await ask_retain(ref_q)
243
-
244
- ret = await self.aretrieve(
245
- ref_q,
246
- ArticleChunk,
247
- max_accepted=int(self.ref_limit * self.search_increment_multiplier),
248
- result_per_query=int(self.result_per_query * self.search_increment_multiplier),
249
- similarity_threshold=self.threshold,
250
- )
251
- if ret is None:
252
- logger.warning("Second retrieve is None, skipping.")
253
- return
254
- cm.add_chunks(ret)
255
-
256
237
 
257
238
  class ArticleConsultRAG(Action, AdvancedRAG):
258
239
  """Write an article based on the provided outline."""
@@ -261,9 +242,9 @@ class ArticleConsultRAG(Action, AdvancedRAG):
261
242
  output_key: str = "consult_count"
262
243
  search_increment_multiplier: float = 1.6
263
244
  """The multiplier to increase the limit of references to retrieve per query."""
264
- ref_limit: int = 20
245
+ ref_limit: int = 26
265
246
  """The final limit of references."""
266
- ref_per_q: int = 3
247
+ ref_per_q: int = 13
267
248
  """The limit of references to retrieve per query."""
268
249
  similarity_threshold: float = 0.62
269
250
  """The similarity threshold of references to retrieve."""
@@ -7,6 +7,7 @@ from fabricatio.journal import logger
7
7
  from fabricatio.models.adv_kwargs_types import FetchKwargs
8
8
  from fabricatio.models.extra.aricle_rag import ArticleChunk, CitationManager
9
9
  from fabricatio.models.kwargs_types import ChooseKwargs
10
+ from fabricatio.utils import fallback_kwargs
10
11
 
11
12
 
12
13
  class AdvancedRAG(RAG):
@@ -40,10 +41,13 @@ class AdvancedRAG(RAG):
40
41
  f"\n\n{requirement}",
41
42
  **refinery_kwargs,
42
43
  )
44
+
43
45
  if ref_q is None:
44
46
  logger.error(f"At round [{i}/{max_round}] search, failed to refine the query, exit.")
45
47
  return cm
46
- refs = await self.aretrieve(ref_q, ArticleChunk, base_accepted, **kwargs)
48
+ refs = await self.aretrieve(
49
+ ref_q, ArticleChunk, base_accepted, **fallback_kwargs(kwargs, filter_expr=cm.as_milvus_filter_expr())
50
+ )
47
51
 
48
52
  if (max_capacity := max_capacity - len(refs)) < 0:
49
53
  cm.add_chunks(refs[0:max_capacity])
@@ -150,6 +150,7 @@ class RAG(EmbeddingUsage):
150
150
  result_per_query: int = 10,
151
151
  tei_endpoint: Optional[str] = None,
152
152
  reranker_threshold: float = 0.7,
153
+ filter_expr: str = "",
153
154
  ) -> List[D]:
154
155
  """Asynchronously fetches documents from a Milvus database based on input vectors.
155
156
 
@@ -162,6 +163,7 @@ class RAG(EmbeddingUsage):
162
163
  result_per_query (int): The maximum number of results to return per query. Defaults to 10.
163
164
  tei_endpoint (str): the endpoint of the TEI api.
164
165
  reranker_threshold (float): The threshold used to filtered low relativity document.
166
+ filter_expr (str): filter_expression parsed into pymilvus search.
165
167
 
166
168
  Returns:
167
169
  List[D]: A list of document objects created from the fetched data.
@@ -172,6 +174,7 @@ class RAG(EmbeddingUsage):
172
174
  await self.vectorize(query),
173
175
  search_params={"radius": similarity_threshold},
174
176
  output_fields=list(document_model.model_fields),
177
+ filter=filter_expr,
175
178
  limit=result_per_query,
176
179
  )
177
180
  if tei_endpoint is not None:
@@ -184,8 +187,11 @@ class RAG(EmbeddingUsage):
184
187
 
185
188
  for q, g in zip(query, search_results, strict=True):
186
189
  models = document_model.from_sequence([res["entity"] for res in g if res["id"] not in retrieved_id])
190
+ logger.debug(f"Retrived {len(g)} raw document, filtered out {len(models)}.")
187
191
  retrieved_id.update(res["id"] for res in g)
188
- rank_scores = await reranker.arerank(q, [m.prepare_vectorization() for m in models])
192
+ if not models:
193
+ continue
194
+ rank_scores = await reranker.arerank(q, [m.prepare_vectorization() for m in models], truncate=True)
189
195
  raw_result.extend(
190
196
  (models[s["index"]], s["score"]) for s in rank_scores if s["score"] > reranker_threshold
191
197
  )
@@ -60,3 +60,4 @@ if find_spec("pymilvus"):
60
60
  result_per_query: NotRequired[int]
61
61
  tei_endpoint: NotRequired[Optional[str]]
62
62
  reranker_threshold: NotRequired[float]
63
+ filter_expr: NotRequired[str]
@@ -1,6 +1,7 @@
1
1
  """A Module containing the article rag models."""
2
2
 
3
3
  import re
4
+ from itertools import groupby
4
5
  from pathlib import Path
5
6
  from typing import ClassVar, Dict, List, Optional, Self, Unpack
6
7
 
@@ -10,12 +11,13 @@ from fabricatio.models.extra.rag import MilvusDataBase
10
11
  from fabricatio.models.generic import AsPrompt
11
12
  from fabricatio.models.kwargs_types import ChunkKwargs
12
13
  from fabricatio.rust import BibManager, blake3_hash, split_into_chunks
13
- from fabricatio.utils import ok
14
+ from fabricatio.utils import ok, wrapp_in_block
15
+ from more_itertools.more import first
14
16
  from more_itertools.recipes import flatten, unique
15
17
  from pydantic import Field
16
18
 
17
19
 
18
- class ArticleChunk(MilvusDataBase, AsPrompt):
20
+ class ArticleChunk(MilvusDataBase):
19
21
  """The chunk of an article."""
20
22
 
21
23
  etc_word: ClassVar[str] = "等"
@@ -51,10 +53,9 @@ class ArticleChunk(MilvusDataBase, AsPrompt):
51
53
  bibtex_cite_key: str
52
54
  """The bibtex cite key of the article"""
53
55
 
54
- def _as_prompt_inner(self) -> Dict[str, str]:
55
- return {
56
- f"[[{ok(self._cite_number, 'You need to update cite number first.')}]] reference `{self.article_title}` from {self.as_auther_seq()}": self.chunk
57
- }
56
+ @property
57
+ def reference_header(self) -> str:
58
+ return f"[[{ok(self._cite_number, 'You need to update cite number first.')}]] reference `{self.article_title}` from {self.as_auther_seq()}"
58
59
 
59
60
  @property
60
61
  def cite_number(self) -> int:
@@ -204,13 +205,23 @@ class CitationManager(AsPrompt):
204
205
 
205
206
  def set_cite_number_all(self) -> Self:
206
207
  """Set citation numbers for all article chunks."""
207
- for i, a in enumerate(self.article_chunks, 1):
208
- a.update_cite_number(i)
208
+ number_mapping = {a.bibtex_cite_key: 0 for a in self.article_chunks}
209
+
210
+ for i, k in enumerate(number_mapping.keys()):
211
+ number_mapping[k] = i
212
+
213
+ for a in self.article_chunks:
214
+ a.update_cite_number(number_mapping[a.bibtex_cite_key])
209
215
  return self
210
216
 
211
217
  def _as_prompt_inner(self) -> Dict[str, str]:
212
218
  """Generate prompt inner representation."""
213
- return {"References": "\n".join(r.as_prompt() for r in self.article_chunks)}
219
+ seg = []
220
+ for k, g in groupby(self.article_chunks, key=lambda a: a.bibtex_cite_key):
221
+ g = list(g)
222
+ logger.debug(f"Group [{k}]: {len(g)}")
223
+ seg.append(wrapp_in_block("\n\n".join(a.chunk for a in g), first(g).reference_header))
224
+ return {"References": "\n".join(seg)}
214
225
 
215
226
  def apply(self, string: str) -> str:
216
227
  """Apply citation replacements to the input string."""
@@ -261,5 +272,9 @@ class CitationManager(AsPrompt):
261
272
 
262
273
  def unpack_cite_seq(self, citation_seq: List[int]) -> str:
263
274
  """Unpack citation sequence into a string."""
264
- chunk_seq = [a for a in self.article_chunks if a.cite_number in citation_seq]
265
- return "".join(a.as_typst_cite() for a in chunk_seq)
275
+ chunk_seq = {a.bibtex_cite_key: a for a in self.article_chunks if a.cite_number in citation_seq}
276
+ return "".join(a.as_typst_cite() for a in chunk_seq.values())
277
+
278
+ def as_milvus_filter_expr(self, blacklist: bool = True) -> str:
279
+ if blacklist:
280
+ return " and ".join(f'bibtex_cite_key != "{a.bibtex_cite_key}"' for a in self.article_chunks)
@@ -2,9 +2,12 @@
2
2
 
3
3
  from abc import ABC
4
4
  from enum import StrEnum
5
+ from pathlib import Path
5
6
  from typing import ClassVar, Generator, List, Optional, Self, Tuple, Type
6
7
 
8
+ from fabricatio.fs import dump_text, safe_text_read
7
9
  from fabricatio.fs.readers import extract_sections
10
+ from fabricatio.journal import logger
8
11
  from fabricatio.models.generic import (
9
12
  AsPrompt,
10
13
  Described,
@@ -19,10 +22,12 @@ from fabricatio.models.generic import (
19
22
  Titled,
20
23
  WordCount,
21
24
  )
22
- from fabricatio.rust import split_out_metadata, to_metadata, word_count
23
- from fabricatio.utils import fallback_kwargs
25
+ from fabricatio.rust import extract_body, inplace_update, split_out_metadata, to_metadata, word_count
26
+ from fabricatio.utils import fallback_kwargs, ok
24
27
  from pydantic import Field
25
28
 
29
+ ARTICLE_WRAPPER = "// =-=-=-=-=-=-=-=-=-="
30
+
26
31
 
27
32
  class ReferringType(StrEnum):
28
33
  """Enumeration of different types of references that can be made in an article."""
@@ -397,3 +402,23 @@ class ArticleBase[T: ChapterBase](FinalizedDumpAble, AsPrompt, FromTypstCode, To
397
402
  def avg_wordcount_recursive[S: "ArticleBase"](self: S) -> S:
398
403
  """Set all chap, sec, subsec have same word count sum up to be `self.expected_word_count`."""
399
404
  return self.avg_chap_wordcount().avg_sec_wordcount().avg_subsec_wordcount()
405
+
406
+ def update_article_file(self, file: str | Path) -> Self:
407
+ """Update the article file."""
408
+ file = Path(file)
409
+ string = safe_text_read(file)
410
+ if updated := inplace_update(string, ARTICLE_WRAPPER, self.to_typst_code()):
411
+ dump_text(file, updated)
412
+ logger.success(f"Successfully updated {file.as_posix()}.")
413
+ else:
414
+ logger.warning(f"Failed to update {file.as_posix()}. Please make sure there are paired `{ARTICLE_WRAPPER}`")
415
+ return self
416
+
417
+ @classmethod
418
+ def from_article_file(cls, file: str | Path, title: str) -> Self:
419
+ """Load article from file."""
420
+ file = Path(file)
421
+ string = safe_text_read(file)
422
+ return cls.from_typst_code(
423
+ title, ok(extract_body(string, ARTICLE_WRAPPER), "Failed to extract body from file.")
424
+ )
@@ -53,6 +53,7 @@ class Paragraph(SketchedAble, WordCount, Described):
53
53
 
54
54
  @property
55
55
  def exact_wordcount(self) -> int:
56
+ """Calculates the exact word count of the content."""
56
57
  return word_count(self.content)
57
58
 
58
59
 
@@ -0,0 +1,45 @@
1
+ """A module containing the ArticleOutline class, which represents the outline of an academic paper."""
2
+
3
+ from typing import ClassVar, Dict, Type
4
+
5
+ from fabricatio.models.extra.article_base import (
6
+ ArticleBase,
7
+ ChapterBase,
8
+ SectionBase,
9
+ SubSectionBase,
10
+ )
11
+ from fabricatio.models.extra.article_proposal import ArticleProposal
12
+ from fabricatio.models.generic import PersistentAble, WithRef
13
+
14
+
15
+ class ArticleSubsectionOutline(SubSectionBase):
16
+ """Atomic research component specification for academic paper generation."""
17
+
18
+
19
+ class ArticleSectionOutline(SectionBase[ArticleSubsectionOutline]):
20
+ """A slightly more detailed research component specification for academic paper generation, Must contain subsections."""
21
+
22
+ child_type: ClassVar[Type[SubSectionBase]] = ArticleSubsectionOutline
23
+
24
+
25
+ class ArticleChapterOutline(ChapterBase[ArticleSectionOutline]):
26
+ """Macro-structural unit implementing standard academic paper organization. Must contain sections."""
27
+
28
+ child_type: ClassVar[Type[SectionBase]] = ArticleSectionOutline
29
+
30
+
31
+ class ArticleOutline(
32
+ WithRef[ArticleProposal],
33
+ PersistentAble,
34
+ ArticleBase[ArticleChapterOutline],
35
+ ):
36
+ """Outline of an academic paper, containing chapters, sections, subsections."""
37
+
38
+ child_type: ClassVar[Type[ChapterBase]] = ArticleChapterOutline
39
+
40
+ def _as_prompt_inner(self) -> Dict[str, str]:
41
+ return {
42
+ "Original Article Briefing": self.referenced.referenced,
43
+ "Original Article Proposal": self.referenced.display(),
44
+ "Original Article Outline": self.display(),
45
+ }