ModelTurnResult (harness/model_turn.py)

gitingest_Negai-ai_AgentClaw · agentclaw/runtime/harness/model_turn.py · python · Apache-2.0
ai, tag:embed-classified

Dataclass representing a single model turn result in the AgentClaw harness.

# Source: https://github.com/Negai-ai/AgentClaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Model turn handling primitives for the agent harness."""

from __future__ import annotations

from dataclasses import dataclass
from typing import Optional

from agentclaw.runtime.harness.decisions import ContinueDecision
from agentclaw.runtime.harness.model_output import AssistantTurnOutput


@dataclass
class ModelTurnResult:
    """Harness-normalized result of one model response."""

    output: Optional[AssistantTurnOutput] = None
    is_empty: bool = False
    should_abort: bool = False
    retries: int = 0
    decision: Optional[ContinueDecision] = None

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key