fabricatio_typst.models.artifacts

Flat container for all intermediate products of the article pipeline.

Classes

ArticleArtifacts

Stores all intermediate products of the article pipeline.

Module Contents

class fabricatio_typst.models.artifacts.ArticleArtifacts(/, **data: Any)

Bases: pydantic.BaseModel

Stores all intermediate products of the article pipeline.

Replaces the old WithRef chain (Article ArticleOutline ArticleProposal str) with a single flat container that every pipeline stage can read and write.

briefing: str | None = None
proposal: ArticleProposal | None = None
outline: ArticleOutline | None = None
model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

access_briefing() str

Return the briefing string, raising if it has not been set.

access_proposal() ArticleProposal

Return the proposal, raising if it has not been set.

access_outline() ArticleOutline

Return the outline, raising if it has not been set.

update_briefing(briefing: str) ArticleArtifacts

Set the briefing string.

update_proposal(proposal: ArticleProposal) ArticleArtifacts

Set the proposal.

update_outline(outline: ArticleOutline) ArticleArtifacts

Set the outline.

update_from(other: ArticleArtifacts) ArticleArtifacts

Merge non-None fields from other into self.