class council.contexts.AgentIterationContextStore[source]#

Bases: object

Data storage for the execution of iteration

append_to_chain(chain: str, message: ChatMessage, log_entry: ExecutionLogEntry) None[source]#

store the given message into the chain context

  • chain – name of the chain

  • message – the message to be stored

  • log_entry – a log entry to trace the origin of the message

property chains: Mapping[str, MessageCollection]#

Returns the messages generated by each chain in this iteration

ensure_chain_exists(name: str) None[source]#

Ensures a chain exists in the current iteration

property evaluator: Sequence[ScoredChatMessage]#

Returns the evaluation of this iteration

set_evaluator(value: Iterable[ScoredChatMessage]) None[source]#

Set the evaluation result for this iteration