curated_feed.export¶
Render a corpus file as compact Markdown for pasting into a chat session.
A collection day can run to several hundred items, so the output is deliberately terse: two lines per item, numbered for reference and carrying the record id so that picks can be traced back to the corpus.
The numbering is the same one policy.py puts in the prompt, and comes from the same renderer. A chat session and a pipeline run therefore refer to an article by the same number, which is what lets a response saved from one drive the other.
Functions¶
|
Numbered Markdown under a heading, one item per two lines. |
|
The listing on its own, or the whole prompt the pipeline would send. |
|
|
|
|
|
Module Contents¶
- curated_feed.export.render_markdown(candidates: collections.abc.Sequence[curated_feed.models.Candidate], *, title: str, max_items: int | None = None) str[source]¶
Numbered Markdown under a heading, one item per two lines.
- curated_feed.export.render(candidates: collections.abc.Sequence[curated_feed.models.Candidate], *, config: curated_feed.config.Config, title: str, max_items: int | None = None, as_prompt: bool = False, prompt_path: pathlib.Path | None = None) str[source]¶
The listing on its own, or the whole prompt the pipeline would send.
The prompt form is what a chat session wants: the same policy documents and the same numbering the pipeline uses, so a response saved from that session can be fed straight back with curate-score –provider file.
- curated_feed.export.build_parser() argparse.ArgumentParser[source]¶
- curated_feed.export.resolve_corpus_file(args: argparse.Namespace, config: curated_feed.config.Config) pathlib.Path[source]¶