This commit is contained in:
jxxghp
2025-11-19 13:19:17 +08:00
parent 5ae7c10a00
commit 6123a1620e
7 changed files with 660 additions and 2 deletions
+2
View File
@@ -22,3 +22,5 @@ from .token import *
from .transfer import *
from .user import *
from .workflow import *
from .mcp import *
+16
View File
@@ -0,0 +1,16 @@
from typing import Any, Dict, Optional
from pydantic import BaseModel, Field
class ToolCallRequest(BaseModel):
"""工具调用请求模型"""
tool_name: str = Field(..., description="工具名称")
arguments: Dict[str, Any] = Field(default_factory=dict, description="工具参数")
class ToolCallResponse(BaseModel):
"""工具调用响应模型"""
success: bool = Field(..., description="是否成功")
result: Optional[str] = Field(None, description="工具执行结果")
error: Optional[str] = Field(None, description="错误信息")