Merge remote-tracking branch 'upstream/r-dev' into r-dev

# Conflicts:
#	src/memory_system/chat_history_summarizer.py
#	src/memory_system/memory_retrieval.py
#	src/memory_system/retrieval_tools/__init__.py
This commit is contained in:
A-Dawn
2026-04-01 14:20:22 +08:00
29 changed files with 434 additions and 304 deletions

View File

@@ -66,6 +66,9 @@ class LLMResponseResult(BaseDataModel):
reasoning: str = field(default_factory=str)
model_name: str = field(default_factory=str)
tool_calls: List[ToolCall] | None = None
prompt_tokens: int = 0
completion_tokens: int = 0
total_tokens: int = 0
@dataclass(slots=True)
@@ -120,6 +123,9 @@ class LLMServiceResult(BaseDataModel):
"response": self.completion.response,
"reasoning": self.completion.reasoning,
"model_name": self.completion.model_name,
"prompt_tokens": self.completion.prompt_tokens,
"completion_tokens": self.completion.completion_tokens,
"total_tokens": self.completion.total_tokens,
}
if self.completion.tool_calls is not None:
payload["tool_calls"] = [