Add presence probe configuration to Assistant model and API. Introduce new fields for enabling presence probes, idle and cooldown durations, maximum prompts, context inclusion, and custom questions. Update schemas, routers, and frontend components to support these features, along with corresponding tests to ensure functionality.

This commit is contained in:
Xin Wang
2026-02-28 15:47:53 +08:00
parent 0821d73e7c
commit 8f1317860f
11 changed files with 1006 additions and 3 deletions

View File

@@ -292,6 +292,12 @@ class AssistantBase(BaseModel):
tools: List[str] = []
botCannotBeInterrupted: bool = False
interruptionSensitivity: int = 500
presenceProbeEnabled: bool = False
presenceProbeIdleSeconds: float = 20.0
presenceProbeCooldownSeconds: float = 45.0
presenceProbeMaxPrompts: int = 2
presenceProbeIncludeContext: bool = True
presenceProbeQuestion: str = ""
configMode: str = "platform"
apiUrl: Optional[str] = None
apiKey: Optional[str] = None
@@ -322,6 +328,12 @@ class AssistantUpdate(BaseModel):
tools: Optional[List[str]] = None
botCannotBeInterrupted: Optional[bool] = None
interruptionSensitivity: Optional[int] = None
presenceProbeEnabled: Optional[bool] = None
presenceProbeIdleSeconds: Optional[float] = None
presenceProbeCooldownSeconds: Optional[float] = None
presenceProbeMaxPrompts: Optional[int] = None
presenceProbeIncludeContext: Optional[bool] = None
presenceProbeQuestion: Optional[str] = None
configMode: Optional[str] = None
apiUrl: Optional[str] = None
apiKey: Optional[str] = None