feat: rebuild as multi-user web agent

This commit is contained in:
wuyang
2026-07-26 06:52:12 +08:00
parent 45792c8fd5
commit 37f83eaac7
634 changed files with 5060 additions and 139619 deletions
+30
View File
@@ -0,0 +1,30 @@
from __future__ import annotations
from typing import Any, Literal
from pydantic import BaseModel, ConfigDict, Field
class ChatMessage(BaseModel):
model_config = ConfigDict(extra="allow")
role: Literal["system", "developer", "user", "assistant", "tool"]
content: Any = None
name: str | None = None
tool_call_id: str | None = None
tool_calls: list[dict[str, Any]] | None = None
class ChatCompletionRequest(BaseModel):
model_config = ConfigDict(extra="allow")
model: str
messages: list[ChatMessage] = Field(min_length=1)
stream: bool = False
tools: list[dict[str, Any]] | None = None
tool_choice: Any = None
class PlanItem(BaseModel):
step: str = Field(min_length=1, max_length=1000)
status: Literal["pending", "in_progress", "completed"]