Content
latent_space.models.content
¶
ChatEntry
¶
Bases: BaseModel
A preset question and its authored answer for the scripted chat.
Authored as content (frontmatter question/metadata, Markdown-body answer)
rather than inline component strings, so a later retrieval- or LLM-backed
mode can reuse the same questions and answers without touching the UI.
public_identifier is derived from the filename stem by the loader, as for Project.
order gives a deterministic display sequence within the chat.
ChatEntryResponse
¶
Bases: BaseModel
Chat entry as returned by the API: the answer rendered to safe HTML.
Frozen so the content service can return its cached instances directly without a caller mutating shared state.
Post
¶
Bases: BaseModel
An outbound link to writing published elsewhere (Substack).
A "link post": metadata only, no Markdown body. The canonical text lives at
external_url, so there is no body_markdown and no detail projection.
public_identifier is derived from the source file's stem by the loader, exactly as
for Project, so the filename and the URL cannot drift apart. Instances may be
drafts; excluding drafts is the content service's responsibility. Unknown frontmatter
keys are rejected so a typo fails loudly at load time.
PostSummary
¶
Bases: BaseModel
Post as returned in list responses: metadata for a card.
Drafts are excluded before this projection is built, so it carries no draft flag.
There is no post-detail projection: a link post's body lives at external_url.
Frozen so the content service can hand out its cached instances without a caller
mutating shared state.
Project
¶
Bases: BaseModel
A portfolio project loaded from a Markdown-with-frontmatter file.
Frontmatter carries the metadata; the Markdown body becomes body_markdown.
public_identifier is the persistent public identifier: the loader derives it from the
source file's stem rather than the frontmatter, so the filename and the URL
are one thing and cannot drift apart. Instances may be drafts; excluding
drafts from published output is the content service's responsibility, not
this model's. Unknown frontmatter keys are rejected so a typo fails loudly at
load time instead of being ignored.
ProjectDetail
¶
ProjectSummary
¶
Bases: BaseModel
Project as returned in list responses: metadata without the body.
Drafts are excluded before this projection is built, so it carries no
draft flag. Frozen so the content service can hand out its cached
instances without a caller mutating shared state; ProjectDetail inherits
the same immutability.