Agent loop output.
| 133 | |
| 134 | |
| 135 | class AgentLoopOutput(BaseModel): |
| 136 | """Agent loop output.""" |
| 137 | |
| 138 | prompt_ids: list[int] |
| 139 | """Prompt token ids.""" |
| 140 | response_ids: list[int] |
| 141 | """Response token ids including LLM generated token, tool response token.""" |
| 142 | response_mask: list[int] |
| 143 | """Response mask, 1 for LLM generated token, 0 for tool response token.""" |
| 144 | response_logprobs: Optional[list[float]] = None |
| 145 | """Log probabilities for the response tokens.""" |
| 146 | routed_experts: Optional[Any] = None |
| 147 | """Routed experts for the total tokens.""" |
| 148 | multi_modal_data: Optional[dict[str, Any]] = None |
| 149 | """Multi-modal data for multi-modal tools.""" |
| 150 | reward_score: Optional[float] = None |
| 151 | """Reward score for the trajectory.""" |
| 152 | num_turns: int = 0 |
| 153 | """Number of chat turns, including user, assistant, tool.""" |
| 154 | metrics: AgentLoopMetrics |
| 155 | """Auxiliary performance metrics""" |
| 156 | extra_fields: dict[str, Any] = {} |
| 157 | """Extra fields for dynamic addition.""" |
| 158 | |
| 159 | |
| 160 | class _InternalAgentLoopOutput(AgentLoopOutput): |
no outgoing calls
no test coverage detected