feat(core): 添加 LLMResponse frozen dataclass
含 content/thinking/ttft_ms/max_inter_token_ms/call_id 等 11 个字段。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1 +1,24 @@
|
||||
"""跨模块共享类型。"""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LLMResponse:
|
||||
"""LLM/VLM 调用的统一返回值。
|
||||
|
||||
由 adapters 层生成,core 层消费。frozen=True 确保响应不可变。
|
||||
"""
|
||||
|
||||
content: str
|
||||
thinking: str
|
||||
model: str
|
||||
provider: str
|
||||
prompt_tokens: int
|
||||
completion_tokens: int
|
||||
latency_ms: int
|
||||
ttft_ms: float | None
|
||||
max_inter_token_ms: float | None
|
||||
cache_hit: bool
|
||||
call_id: str
|
||||
|
||||
Reference in New Issue
Block a user