factor_agent.events.CallEnd#

class CallEnd(*, time=<factory>, call, round, role, model, group=None, slots=<factory>, file=None, seconds=0.0, input_tokens=None, output_tokens=None, cache_hits=None, reasoning=None, truncated=None, empty=False, error=None)[source]#

Bases: CallStart

An LLM call came back, or failed.

file is the call file’s name in llm_log/, None when the call failed (error says how) and wrote none. seconds is how long it took. The token counts are the provider’s, None where its reply does not report them: cache_hits are input tokens read from the provider’s cache, reasoning output tokens spent reasoning. truncated is true when the reply was cut off at the output limit, None when the provider’s reply does not say; empty when the reply holds no text.

Inherited methods and attributes are documented on the base classes linked above.

Attributes#

CallEnd.cache_hits = None#
CallEnd.empty = False#
CallEnd.error = None#
CallEnd.file = None#
CallEnd.input_tokens = None#
CallEnd.output_tokens = None#
CallEnd.reasoning = None#
CallEnd.seconds = 0.0#
CallEnd.truncated = None#
CallEnd.type = 'call_end'#

The event’s type in the file; each event class sets its own.

CallEnd.call#
CallEnd.round#
CallEnd.role#
CallEnd.model#
CallEnd.slots#
CallEnd.time#