| 1234567891011121314151617181920212223242526272829303132333435363738 |
- from __future__ import annotations
- from typing import Any, Literal
- from pydantic import BaseModel, Field
- class AgentChatRequest(BaseModel):
- message: str
- thread_id: str | None = None
- mine_id: str | None = None
- workflow: str = "chat"
- context: dict[str, Any] = Field(default_factory=dict)
- class AgentRunResponse(BaseModel):
- run_id: str
- session_id: str
- workflow: str
- status: str
- output: Any = None
- error: str = ""
- class WorkflowRunRequest(BaseModel):
- mine_id: str
- workflow: Literal["diagnosis", "evaluation", "knowledge_qa", "document_analysis"]
- payload: dict[str, Any] = Field(default_factory=dict)
- requested_by: str = ""
- class AgentCapability(BaseModel):
- name: str
- label: str
- enabled: bool
- description: str
- model: str = ""
|