mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 07:56:52 +08:00
add mcp
This commit is contained in:
@@ -22,3 +22,5 @@ from .token import *
|
||||
from .transfer import *
|
||||
from .user import *
|
||||
from .workflow import *
|
||||
from .mcp import *
|
||||
|
||||
|
||||
@@ -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="错误信息")
|
||||
Reference in New Issue
Block a user