fabricatio_typst.actions.article

Actions for transmitting tasks to targets.

Classes

ExtractArticleEssence

Extract the essence of article(s) in text format from the paths specified in the task dependencies.

FixArticleEssence

Fix the article essence based on the bibtex key.

GenerateArticleProposal

Generate an outline for the article based on the extracted essence.

GenerateInitialOutline

Generate the initial article outline based on the article proposal.

ExtractOutlineFromRaw

Extract the outline from the raw outline.

FixIntrospectedErrors

Fix introspected errors in the article outline.

GenerateArticle

Generate the article based on the outline.

LoadArticle

Load the article from the outline and typst code.

WriteChapterSummary

Write the chapter summary.

WriteResearchContentSummary

Write the research content summary.

Module Contents

class fabricatio_typst.actions.article.ExtractArticleEssence(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_core.capabilities.propose.Propose

Extract the essence of article(s) in text format from the paths specified in the task dependencies.

Notes

This action is designed to extract vital information from articles with Markdown format, which is pure text, and which is converted from pdf files using magic-pdf from the MinerU project, see https://github.com/opendatalab/MinerU

output_key: str = 'article_essence'

The key of the output data.

class fabricatio_typst.actions.article.FixArticleEssence(/, **data: Any)

Bases: fabricatio_core.models.action.Action

Fix the article essence based on the bibtex key.

output_key: str = 'fixed_article_essence'

The key of the output data.

class fabricatio_typst.actions.article.GenerateArticleProposal(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_core.capabilities.propose.Propose

Generate an outline for the article based on the extracted essence.

output_key: str = 'article_proposal'

The key of the output data.

class fabricatio_typst.actions.article.GenerateInitialOutline(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_capabilities.capabilities.extract.Extract, fabricatio_improve.capabilities.correct.Correct

Generate the initial article outline based on the article proposal.

output_key: str = 'initial_article_outline'

The key of the output data.

supervisor: bool = False

Whether to use the supervisor to fix the outline.

extract_kwargs: fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_typst.models.article_outline.ArticleOutline | None] = None

The kwargs to extract the outline.

class fabricatio_typst.actions.article.ExtractOutlineFromRaw(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_capabilities.capabilities.extract.Extract

Extract the outline from the raw outline.

output_key: str = 'article_outline_from_raw'

The key used to store this action’s output in the context dictionary.

class fabricatio_typst.actions.article.FixIntrospectedErrors(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_rule.capabilities.censor.Censor

Fix introspected errors in the article outline.

output_key: str = 'introspected_errors_fixed_outline'

The key of the output data.

ruleset: fabricatio_rule.models.rule.RuleSet | None = None

The ruleset to use to fix the introspected errors.

max_error_count: int | None = None

The maximum number of errors to fix.

class fabricatio_typst.actions.article.GenerateArticle(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_rule.capabilities.censor.Censor

Generate the article based on the outline.

output_key: str = 'article'

The key of the output data.

ruleset: fabricatio_rule.models.rule.RuleSet | None = None
class fabricatio_typst.actions.article.LoadArticle(/, **data: Any)

Bases: fabricatio_core.models.action.Action

Load the article from the outline and typst code.

output_key: str = 'loaded_article'

The key used to store this action’s output in the context dictionary.

class fabricatio_typst.actions.article.WriteChapterSummary(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_core.capabilities.usages.UseLLM

Write the chapter summary.

ctx_override: ClassVar[bool] = True

Whether to override the instance attr by the context variable.

paragraph_count: int = 1

The number of paragraphs to generate in the chapter summary.

summary_word_count: int = 120

The number of words to use in each chapter summary.

output_key: str = 'summarized_article'

The key under which the summarized article will be stored in the output.

summary_title: str = 'Chapter Summary'

The title to be used for the generated chapter summary section.

skip_chapters: List[str] = None

A list of chapter titles to skip during summary generation.

class fabricatio_typst.actions.article.WriteResearchContentSummary(/, **data: Any)

Bases: fabricatio_core.models.action.Action, fabricatio_core.capabilities.usages.UseLLM

Write the research content summary.

ctx_override: ClassVar[bool] = True

Whether to override the instance attr by the context variable.

summary_word_count: int = 160

The number of words to use in the research content summary.

output_key: str = 'summarized_article'

The key under which the summarized article will be stored in the output.

summary_title: str = 'Research Content'

The title to be used for the generated research content summary section.

paragraph_count: int = 1

The number of paragraphs to generate in the research content summary.