mellea.stdlib.context.simple
Stateless single-turn context (no history is forwarded to the model).
Classes
CLASS SimpleContext
A SimpleContext is a context in which each interaction is a separate and independent turn. The history of all previous turns is NOT saved..
Methods:
FUNC add
add(self, c: Component | CBlock | ModelOutputThunk) -> SimpleContext
Add a new component or CBlock to the context and return the updated context.
Args:
c: The component, content block, or model output to record.
Returns:
- A new
SimpleContextcontaining only the added entry; - prior history is not retained.
FUNC view_for_generation
view_for_generation(self) -> list[Component | CBlock | ModelOutputThunk] | None
Return an empty list, since SimpleContext does not pass history to the model.
Each call to the model is treated as a stateless, independent exchange. No prior turns are forwarded.
Returns:
- list[Component | CBlock | ModelOutputThunk] | None: Always an empty list.