feat(server): 新增运行时聊天服务和用户代理服务,支持智能对话和用户行为分析

This commit is contained in:
caoxiaozhu
2026-05-14 09:32:49 +00:00
parent b0fef46fc6
commit bac3f00ae4
2 changed files with 73 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ class RuntimeChatService:
def complete(
self,
messages: list[dict[str, str]],
messages: list[dict[str, Any]],
*,
slot_priority: tuple[str, ...] = ("main", "backup"),
max_tokens: int = 500,
@@ -91,7 +91,7 @@ class RuntimeChatService:
def _request_chat_completion(
self,
config: dict[str, str],
messages: list[dict[str, str]],
messages: list[dict[str, Any]],
*,
max_tokens: int,
temperature: float,
@@ -136,7 +136,7 @@ class RuntimeChatService:
endpoint: str,
model: str,
api_key: str,
messages: list[dict[str, str]],
messages: list[dict[str, Any]],
max_tokens: int,
temperature: float,
) -> str:
@@ -165,7 +165,7 @@ class RuntimeChatService:
endpoint: str,
model: str,
api_key: str,
messages: list[dict[str, str]],
messages: list[dict[str, Any]],
max_tokens: int,
temperature: float,
) -> str:
@@ -197,7 +197,7 @@ class RuntimeChatService:
endpoint: str,
model: str,
api_key: str,
messages: list[dict[str, str]],
messages: list[dict[str, Any]],
max_tokens: int,
temperature: float,
) -> str: