core.execution_result

Internal result type returned by ResponseExecutor.

Internal result type returned by ResponseExecutor.

class ExecutionResult(response=None, resolved_prompt='', model='', usage=None, cost_usd=0.0, duration_ms=0.0, status='success', condition_trace=None, condition_error=None, parsed=None, parsing_errors=None)[source]

Bases: object

Outcome of a single prompt execution, before history recording.

Parameters:
response

Raw LLM response string (or None on skip/failure).

Type:

str | None

resolved_prompt

The fully interpolated prompt sent to the model.

Type:

str

usage

Token usage from the API call, if available.

Type:

ffai.core.usage.TokenUsage | None

cost_usd

Estimated cost in USD for this call.

Type:

float

duration_ms

Wall-clock duration of the LLM call in milliseconds.

Type:

float

status

Execution status – "success", "skipped", or "failed".

Type:

str

condition_trace

The resolved condition expression (when condition is used).

Type:

str | None

condition_error

Error message if condition evaluation failed.

Type:

str | None

parsed

Validated Pydantic model instance (when response_model is used).

Type:

Any

parsing_errors

Validation error strings if structured output parsing failed.

Type:

list[str] | None

response: str | None = None
resolved_prompt: str = ''
model: str = ''
usage: TokenUsage | None = None
cost_usd: float = 0.0
duration_ms: float = 0.0
status: str = 'success'
condition_trace: str | None = None
condition_error: str | None = None
parsed: Any = None
parsing_errors: list[str] | None = None

Classes

class ExecutionResult(response=None, resolved_prompt='', model='', usage=None, cost_usd=0.0, duration_ms=0.0, status='success', condition_trace=None, condition_error=None, parsed=None, parsing_errors=None)[source]

Bases: object

Outcome of a single prompt execution, before history recording.

Parameters:
response

Raw LLM response string (or None on skip/failure).

Type:

str | None

resolved_prompt

The fully interpolated prompt sent to the model.

Type:

str

usage

Token usage from the API call, if available.

Type:

ffai.core.usage.TokenUsage | None

cost_usd

Estimated cost in USD for this call.

Type:

float

duration_ms

Wall-clock duration of the LLM call in milliseconds.

Type:

float

status

Execution status – "success", "skipped", or "failed".

Type:

str

condition_trace

The resolved condition expression (when condition is used).

Type:

str | None

condition_error

Error message if condition evaluation failed.

Type:

str | None

parsed

Validated Pydantic model instance (when response_model is used).

Type:

Any

parsing_errors

Validation error strings if structured output parsing failed.

Type:

list[str] | None

response: str | None = None
resolved_prompt: str = ''
model: str = ''
usage: TokenUsage | None = None
cost_usd: float = 0.0
duration_ms: float = 0.0
status: str = 'success'
condition_trace: str | None = None
condition_error: str | None = None
parsed: Any = None
parsing_errors: list[str] | None = None