ScorerContext#
- class council.contexts.ScorerContext(store: AgentContextStore, execution_context: ExecutionContext, budget: Budget)[source]#
Bases:
ContextBase
represents a context used by a
ScorerBase
- property chat_history: ChatHistory#
the chat history
- static empty() ScorerContext [source]#
helper function that creates a new empty instance
For test purpose only.
- execution_log_to_dict() Dict[str, Any] #
returns the execution log as a dictionary
- execution_log_to_json() str #
returns the execution as a JSON string
- static from_context(context: ContextBase, monitored: Monitored, budget: Budget | None = None) ScorerContext [source]#
creates a new instance from the given context, adjusting the execution appropriately
- property iteration_count: int#
the number of iteration for this execution
- property log_entry: ExecutionLogEntry#
the log entry
- new_for(monitored: Monitored) ScorerContext [source]#
returns a new instance for the given object, adjusting the execution context appropriately
- new_log_entry(monitored: Monitored) ExecutionLogEntry #
creates a new log entry from this context