Skip to main content

insert_error

Function insert_error 

Source
pub async fn insert_error(
    pool: &Pool,
    agent_instance_hierarchy: &str,
    response_id: Option<&str>,
    error: &Value,
    timestamp: i64,
) -> Result<i64, Error>
Expand description

Persist one error into an agent’s history. response_id is the response the failure belongs to when one existed, None for post-lock pre-stream failures. error is the CLI’s user-facing error value (Error::output_message()). Returns the objectiveai.errors.id — the row’s messages.row_index.