lasagnastack.stages.reel_pipeline.post_caption¶
lasagnastack.stages.reel_pipeline.post_caption
¶
PostCaptionStage
¶
PostCaptionStage(client: LLMClient | None = None)
Bases: Stage
Stage 7: generate an Instagram post caption for the finished reel.
Initialise with an optional LLM client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
LLMClient | None
|
LLM client to use. Defaults to GeminiClient. |
None
|
Source code in src/lasagnastack/stages/reel_pipeline/post_caption.py
completion_message
¶
completion_message(state: PipelineState) -> str
Return the post-stage confirmation message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
PipelineState
|
Current pipeline state. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Human-readable completion string. |
Source code in src/lasagnastack/stages/reel_pipeline/post_caption.py
run
¶
run(state: PipelineState) -> PipelineState
Run the post caption stage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
PipelineState
|
Current pipeline state. |
required |
Returns:
| Type | Description |
|---|---|
PipelineState
|
Updated pipeline state with |
Source code in src/lasagnastack/stages/reel_pipeline/post_caption.py
run
¶
run(
cut_list: CutList,
inventories: list[ClipInventory],
brief_path: Path,
output_dir: Path,
client: LLMClient | None = None,
skill_path: Path | None = None,
) -> PostCaption
Generate an Instagram post caption for the finished reel.
Sends the brief, reel metadata, and segment descriptions to the LLM and returns a PostCaption. Writes post_caption.txt to output_dir.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cut_list
|
CutList
|
Approved cut list from Stage 4 (provides reel metadata and per-cut captions used to ground the generated text). |
required |
inventories
|
list[ClipInventory]
|
Clip inventories from Stage 2 (segment descriptions used to make the caption specific to what was actually filmed). |
required |
brief_path
|
Path
|
Path to the freeform .txt creator brief. |
required |
output_dir
|
Path
|
Pipeline root; post_caption.txt written here. |
required |
client
|
LLMClient | None
|
LLM client to use. Defaults to GeminiClient. |
None
|
skill_path
|
Path | None
|
Optional path to a Markdown skill file injected into the prompt before the creator brief. |
None
|
Returns:
| Type | Description |
|---|---|
PostCaption
|
A PostCaption ready to copy-paste at publish time. |