mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 03:27:31 +08:00
将所有agent工具的explanation字段改为可选
修复Pydantic验证错误:QueryTransferHistoryInput的explanation字段为必需,但用户未提供。 修改了74个工具文件,将explanation字段从必需改为可选,默认值为None。
This commit is contained in:
@@ -19,10 +19,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class AddCustomFilterRuleInput(BaseModel):
|
class AddCustomFilterRuleInput(BaseModel):
|
||||||
"""新增自定义过滤规则工具的输入参数模型"""
|
"""新增自定义过滤规则工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
rule_id: str = Field(
|
rule_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="Unique custom rule ID. Only letters and numbers are allowed.",
|
description="Unique custom rule ID. Only letters and numbers are allowed.",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from app.utils.crypto import HashUtils
|
|||||||
|
|
||||||
class AddDownloadInput(BaseModel):
|
class AddDownloadInput(BaseModel):
|
||||||
"""添加下载工具的输入参数模型"""
|
"""添加下载工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
torrent_url: List[str] = Field(
|
torrent_url: List[str] = Field(
|
||||||
...,
|
...,
|
||||||
description="One or more torrent_url values. Supports refs from get_search_results (`hash:id`) and magnet links."
|
description="One or more torrent_url values. Supports refs from get_search_results (`hash:id`) and magnet links."
|
||||||
|
|||||||
@@ -23,10 +23,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class AddRuleGroupInput(BaseModel):
|
class AddRuleGroupInput(BaseModel):
|
||||||
"""新增过滤规则组工具的输入参数模型"""
|
"""新增过滤规则组工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
name: str = Field(..., description="New rule group name.")
|
name: str = Field(..., description="New rule group name.")
|
||||||
rule_string: str = Field(
|
rule_string: str = Field(
|
||||||
...,
|
...,
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.schemas.types import MediaType, MessageChannel
|
|||||||
class AddSubscribeInput(BaseModel):
|
class AddSubscribeInput(BaseModel):
|
||||||
"""添加订阅工具的输入参数模型"""
|
"""添加订阅工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
title: str = Field(
|
title: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The title of the media to subscribe to (e.g., 'The Matrix', 'Breaking Bad')",
|
description="The title of the media to subscribe to (e.g., 'The Matrix', 'Breaking Bad')",
|
||||||
|
|||||||
@@ -38,10 +38,8 @@ class UserChoiceOptionInput(BaseModel):
|
|||||||
class AskUserChoiceInput(BaseModel):
|
class AskUserChoiceInput(BaseModel):
|
||||||
"""按钮选择工具输入。"""
|
"""按钮选择工具输入。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why the agent needs the user to choose from buttons",)
|
||||||
description="Clear explanation of why the agent needs the user to choose from buttons",
|
|
||||||
)
|
|
||||||
message: str = Field(
|
message: str = Field(
|
||||||
...,
|
...,
|
||||||
description="Question or prompt shown to the user together with the buttons",
|
description="Question or prompt shown to the user together with the buttons",
|
||||||
|
|||||||
@@ -38,10 +38,8 @@ class BrowserAction(str, Enum):
|
|||||||
class BrowseWebpageInput(BaseModel):
|
class BrowseWebpageInput(BaseModel):
|
||||||
"""浏览器操作工具的输入参数模型"""
|
"""浏览器操作工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this browser action is being performed",)
|
||||||
description="Clear explanation of why this browser action is being performed",
|
|
||||||
)
|
|
||||||
action: str = Field(
|
action: str = Field(
|
||||||
...,
|
...,
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class DeleteCustomFilterRuleInput(BaseModel):
|
class DeleteCustomFilterRuleInput(BaseModel):
|
||||||
"""删除自定义过滤规则工具的输入参数模型"""
|
"""删除自定义过滤规则工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
rule_id: str = Field(..., description="Custom rule ID to delete.")
|
rule_id: str = Field(..., description="Custom rule ID to delete.")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ from app.log import logger
|
|||||||
class DeleteDownloadInput(BaseModel):
|
class DeleteDownloadInput(BaseModel):
|
||||||
"""删除下载任务工具的输入参数模型"""
|
"""删除下载任务工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
hash: str = Field(
|
hash: str = Field(
|
||||||
..., description="Task hash (can be obtained from query_download_tasks tool)"
|
..., description="Task hash (can be obtained from query_download_tasks tool)"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ from app.log import logger
|
|||||||
class DeleteDownloadHistoryInput(BaseModel):
|
class DeleteDownloadHistoryInput(BaseModel):
|
||||||
"""删除下载历史记录工具的输入参数模型"""
|
"""删除下载历史记录工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
history_id: int = Field(
|
history_id: int = Field(
|
||||||
..., description="The ID of the download history record to delete"
|
..., description="The ID of the download history record to delete"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -18,10 +18,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class DeleteRuleGroupInput(BaseModel):
|
class DeleteRuleGroupInput(BaseModel):
|
||||||
"""删除过滤规则组工具的输入参数模型"""
|
"""删除过滤规则组工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
name: str = Field(..., description="Rule group name to delete.")
|
name: str = Field(..., description="Rule group name to delete.")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,8 @@ from app.schemas.types import EventType
|
|||||||
class DeleteSubscribeInput(BaseModel):
|
class DeleteSubscribeInput(BaseModel):
|
||||||
"""删除订阅工具的输入参数模型"""
|
"""删除订阅工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
subscribe_id: int = Field(
|
subscribe_id: int = Field(
|
||||||
...,
|
...,
|
||||||
description="The ID of the subscription to delete (can be obtained from query_subscribes tool)",
|
description="The ID of the subscription to delete (can be obtained from query_subscribes tool)",
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ from app.log import logger
|
|||||||
class DeleteTransferHistoryInput(BaseModel):
|
class DeleteTransferHistoryInput(BaseModel):
|
||||||
"""删除整理历史记录工具的输入参数模型"""
|
"""删除整理历史记录工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
history_id: int = Field(
|
history_id: int = Field(
|
||||||
..., description="The ID of the transfer history record to delete"
|
..., description="The ID of the transfer history record to delete"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -141,9 +141,7 @@ class _CommandOutput:
|
|||||||
class ExecuteCommandInput(BaseModel):
|
class ExecuteCommandInput(BaseModel):
|
||||||
"""执行 Shell 命令工具的输入参数模型。"""
|
"""执行 Shell 命令工具的输入参数模型。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this command action is needed")
|
||||||
..., description="Clear explanation of why this command action is needed"
|
|
||||||
)
|
|
||||||
action: Optional[Literal["start", "read", "wait", "write", "kill", "run"]] = Field(
|
action: Optional[Literal["start", "read", "wait", "write", "kill", "run"]] = Field(
|
||||||
"start",
|
"start",
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.schemas.types import MediaType, media_type_to_agent
|
|||||||
class GetRecommendationsInput(BaseModel):
|
class GetRecommendationsInput(BaseModel):
|
||||||
"""获取推荐工具的输入参数模型"""
|
"""获取推荐工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
source: Optional[str] = Field(
|
source: Optional[str] = Field(
|
||||||
"tmdb_trending",
|
"tmdb_trending",
|
||||||
description="Recommendation source: "
|
description="Recommendation source: "
|
||||||
|
|||||||
@@ -20,10 +20,8 @@ from ._torrent_search_utils import (
|
|||||||
class GetSearchResultsInput(BaseModel):
|
class GetSearchResultsInput(BaseModel):
|
||||||
"""获取搜索结果工具的输入参数模型"""
|
"""获取搜索结果工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
site: Optional[List[str]] = Field(None, description="Site name filters")
|
site: Optional[List[str]] = Field(None, description="Site name filters")
|
||||||
season: Optional[List[str]] = Field(None, description="Season or episode filters")
|
season: Optional[List[str]] = Field(None, description="Season or episode filters")
|
||||||
free_state: Optional[List[str]] = Field(None, description="Promotion state filters")
|
free_state: Optional[List[str]] = Field(None, description="Promotion state filters")
|
||||||
|
|||||||
@@ -18,10 +18,8 @@ from app.log import logger
|
|||||||
class InstallPluginInput(BaseModel):
|
class InstallPluginInput(BaseModel):
|
||||||
"""安装插件工具的输入参数模型"""
|
"""安装插件工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
plugin_id: str = Field(
|
plugin_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="Exact plugin ID to install. Use query_market_plugins first to find the correct plugin_id.",
|
description="Exact plugin ID to install. Use query_market_plugins first to find the correct plugin_id.",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ from app.utils.string import StringUtils
|
|||||||
|
|
||||||
class ListDirectoryInput(BaseModel):
|
class ListDirectoryInput(BaseModel):
|
||||||
"""查询文件系统目录内容工具的输入参数模型"""
|
"""查询文件系统目录内容工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
path: str = Field(..., description="Directory path to list contents (e.g., '/home/user/downloads' or 'C:/Downloads')")
|
path: str = Field(..., description="Directory path to list contents (e.g., '/home/user/downloads' or 'C:/Downloads')")
|
||||||
storage: Optional[str] = Field("local", description="Storage type (default: 'local' for local file system, can be 'smb', 'alist', etc.)")
|
storage: Optional[str] = Field("local", description="Storage type (default: 'local' for local file system, can be 'smb', 'alist', etc.)")
|
||||||
sort_by: Optional[str] = Field("name", description="Sort order: 'name' for alphabetical sorting, 'time' for modification time sorting (default: 'name')")
|
sort_by: Optional[str] = Field("name", description="Sort order: 'name' for alphabetical sorting, 'time' for modification time sorting (default: 'name')")
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ from app.log import logger
|
|||||||
class ListSlashCommandsInput(BaseModel):
|
class ListSlashCommandsInput(BaseModel):
|
||||||
"""查询所有可用斜杠命令工具的输入参数模型"""
|
"""查询所有可用斜杠命令工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ListSlashCommandsTool(MoviePilotTool):
|
class ListSlashCommandsTool(MoviePilotTool):
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ from app.log import logger
|
|||||||
class ModifyDownloadInput(BaseModel):
|
class ModifyDownloadInput(BaseModel):
|
||||||
"""修改下载任务工具的输入参数模型"""
|
"""修改下载任务工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
hash: str = Field(
|
hash: str = Field(
|
||||||
..., description="Task hash (can be obtained from query_download_tasks tool)"
|
..., description="Task hash (can be obtained from query_download_tasks tool)"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -17,10 +17,8 @@ from app.log import logger
|
|||||||
class QueryBuiltinFilterRulesInput(BaseModel):
|
class QueryBuiltinFilterRulesInput(BaseModel):
|
||||||
"""查询内置过滤规则工具的输入参数模型"""
|
"""查询内置过滤规则工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
rule_ids: Optional[List[str]] = Field(
|
rule_ids: Optional[List[str]] = Field(
|
||||||
None,
|
None,
|
||||||
description="Optional list of built-in rule IDs to query. If omitted, return all built-in rules.",
|
description="Optional list of built-in rule IDs to query. If omitted, return all built-in rules.",
|
||||||
|
|||||||
@@ -18,10 +18,8 @@ from app.log import logger
|
|||||||
class QueryCustomFilterRulesInput(BaseModel):
|
class QueryCustomFilterRulesInput(BaseModel):
|
||||||
"""查询自定义过滤规则工具的输入参数模型"""
|
"""查询自定义过滤规则工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
rule_ids: Optional[List[str]] = Field(
|
rule_ids: Optional[List[str]] = Field(
|
||||||
None,
|
None,
|
||||||
description="Optional list of custom rule IDs to query. If omitted, return all custom rules.",
|
description="Optional list of custom rule IDs to query. If omitted, return all custom rules.",
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class QueryCustomIdentifiersInput(BaseModel):
|
class QueryCustomIdentifiersInput(BaseModel):
|
||||||
"""查询自定义识别词工具的输入参数模型"""
|
"""查询自定义识别词工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class QueryCustomIdentifiersTool(MoviePilotTool):
|
class QueryCustomIdentifiersTool(MoviePilotTool):
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from app.log import logger
|
|||||||
|
|
||||||
class QueryDirectorySettingsInput(BaseModel):
|
class QueryDirectorySettingsInput(BaseModel):
|
||||||
"""查询系统目录设置工具的输入参数模型"""
|
"""查询系统目录设置工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
directory_type: Optional[str] = Field("all",
|
directory_type: Optional[str] = Field("all",
|
||||||
description="Filter directories by type: 'download' for download directories, 'library' for media library directories, 'all' for all directories")
|
description="Filter directories by type: 'download' for download directories, 'library' for media library directories, 'all' for all directories")
|
||||||
storage_type: Optional[str] = Field("all",
|
storage_type: Optional[str] = Field("all",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from app.schemas.types import TorrentStatus, media_type_to_agent
|
|||||||
|
|
||||||
class QueryDownloadTasksInput(BaseModel):
|
class QueryDownloadTasksInput(BaseModel):
|
||||||
"""查询下载工具的输入参数模型"""
|
"""查询下载工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
downloader: Optional[str] = Field(None,
|
downloader: Optional[str] = Field(None,
|
||||||
description="Name of specific downloader to query (optional, if not provided queries all configured downloaders)")
|
description="Name of specific downloader to query (optional, if not provided queries all configured downloaders)")
|
||||||
status: Optional[str] = Field("all",
|
status: Optional[str] = Field("all",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from app.schemas.types import SystemConfigKey
|
|||||||
|
|
||||||
class QueryDownloadersInput(BaseModel):
|
class QueryDownloadersInput(BaseModel):
|
||||||
"""查询下载器工具的输入参数模型"""
|
"""查询下载器工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
|
|
||||||
|
|
||||||
class QueryDownloadersTool(MoviePilotTool):
|
class QueryDownloadersTool(MoviePilotTool):
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from app.log import logger
|
|||||||
|
|
||||||
class QueryEpisodeScheduleInput(BaseModel):
|
class QueryEpisodeScheduleInput(BaseModel):
|
||||||
"""查询剧集上映时间工具的输入参数模型"""
|
"""查询剧集上映时间工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
tmdb_id: int = Field(..., description="TMDB ID of the TV series (can be obtained from search_media tool)")
|
tmdb_id: int = Field(..., description="TMDB ID of the TV series (can be obtained from search_media tool)")
|
||||||
season: int = Field(..., description="Season number to query")
|
season: int = Field(..., description="Season number to query")
|
||||||
episode_group: Optional[str] = Field(None, description="Episode group ID (optional)")
|
episode_group: Optional[str] = Field(None, description="Episode group ID (optional)")
|
||||||
|
|||||||
@@ -20,10 +20,8 @@ from app.log import logger
|
|||||||
class QueryInstalledPluginsInput(BaseModel):
|
class QueryInstalledPluginsInput(BaseModel):
|
||||||
"""查询已安装插件工具的输入参数模型"""
|
"""查询已安装插件工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
query: Optional[str] = Field(
|
query: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
description="Optional keyword to filter installed plugins by plugin ID, name, description, or author.",
|
description="Optional keyword to filter installed plugins by plugin ID, name, description, or author.",
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ def _build_tv_server_result(existing_seasons: OrderedDict, total_seasons: Ordere
|
|||||||
|
|
||||||
class QueryLibraryExistsInput(BaseModel):
|
class QueryLibraryExistsInput(BaseModel):
|
||||||
"""查询媒体库工具的输入参数模型"""
|
"""查询媒体库工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
tmdb_id: Optional[int] = Field(None, description="TMDB ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
tmdb_id: Optional[int] = Field(None, description="TMDB ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
||||||
douban_id: Optional[str] = Field(None, description="Douban ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
douban_id: Optional[str] = Field(None, description="Douban ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
||||||
media_type: Optional[str] = Field(None, description="Allowed values: movie, tv")
|
media_type: Optional[str] = Field(None, description="Allowed values: movie, tv")
|
||||||
|
|||||||
@@ -17,10 +17,8 @@ PAGE_SIZE = 20
|
|||||||
class QueryLibraryLatestInput(BaseModel):
|
class QueryLibraryLatestInput(BaseModel):
|
||||||
"""查询媒体服务器最近入库影片工具的输入参数模型"""
|
"""查询媒体服务器最近入库影片工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
server: Optional[str] = Field(
|
server: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
description="Media server name (optional, if not specified queries all enabled media servers)",
|
description="Media server name (optional, if not specified queries all enabled media servers)",
|
||||||
|
|||||||
@@ -20,10 +20,8 @@ from app.log import logger
|
|||||||
class QueryMarketPluginsInput(BaseModel):
|
class QueryMarketPluginsInput(BaseModel):
|
||||||
"""查询插件市场工具的输入参数模型"""
|
"""查询插件市场工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
query: Optional[str] = Field(
|
query: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
description="Optional keyword to filter plugin market results by plugin ID, name, description, or author.",
|
description="Optional keyword to filter plugin market results by plugin ID, name, description, or author.",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ SEASON_PREVIEW_LIMIT = 100
|
|||||||
|
|
||||||
class QueryMediaDetailInput(BaseModel):
|
class QueryMediaDetailInput(BaseModel):
|
||||||
"""查询媒体详情工具的输入参数模型"""
|
"""查询媒体详情工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
tmdb_id: Optional[int] = Field(None, description="TMDB ID of the media (movie or TV series, can be obtained from search_media tool)")
|
tmdb_id: Optional[int] = Field(None, description="TMDB ID of the media (movie or TV series, can be obtained from search_media tool)")
|
||||||
douban_id: Optional[str] = Field(None, description="Douban ID of the media (alternative to tmdb_id)")
|
douban_id: Optional[str] = Field(None, description="Douban ID of the media (alternative to tmdb_id)")
|
||||||
media_type: str = Field(..., description="Allowed values: movie, tv")
|
media_type: str = Field(..., description="Allowed values: movie, tv")
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ from app.log import logger
|
|||||||
class QueryPersonasInput(BaseModel):
|
class QueryPersonasInput(BaseModel):
|
||||||
"""查询人格工具的输入参数模型。"""
|
"""查询人格工具的输入参数模型。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
query: Optional[str] = Field(
|
query: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ from app.log import logger
|
|||||||
class QueryPluginCapabilitiesInput(BaseModel):
|
class QueryPluginCapabilitiesInput(BaseModel):
|
||||||
"""查询插件能力工具的输入参数模型"""
|
"""查询插件能力工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
plugin_id: Optional[str] = Field(
|
plugin_id: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
description="Optional plugin ID to query capabilities for a specific plugin. "
|
description="Optional plugin ID to query capabilities for a specific plugin. "
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.log import logger
|
|||||||
class QueryPluginConfigInput(BaseModel):
|
class QueryPluginConfigInput(BaseModel):
|
||||||
"""查询插件配置工具的输入参数模型"""
|
"""查询插件配置工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
plugin_id: str = Field(
|
plugin_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The plugin ID to query. Use query_installed_plugins first to discover valid plugin IDs.",
|
description="The plugin ID to query. Use query_installed_plugins first to discover valid plugin IDs.",
|
||||||
|
|||||||
@@ -18,10 +18,8 @@ from app.log import logger
|
|||||||
class QueryPluginDataInput(BaseModel):
|
class QueryPluginDataInput(BaseModel):
|
||||||
"""查询插件数据工具的输入参数模型"""
|
"""查询插件数据工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
plugin_id: str = Field(
|
plugin_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The plugin ID to query. Use query_installed_plugins first to discover valid plugin IDs.",
|
description="The plugin ID to query. Use query_installed_plugins first to discover valid plugin IDs.",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ MAX_PAGE_SIZE = 50
|
|||||||
|
|
||||||
class QueryPopularSubscribesInput(BaseModel):
|
class QueryPopularSubscribesInput(BaseModel):
|
||||||
"""查询热门订阅工具的输入参数模型"""
|
"""查询热门订阅工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
media_type: str = Field(..., description="Allowed values: movie, tv")
|
media_type: str = Field(..., description="Allowed values: movie, tv")
|
||||||
page: Optional[int] = Field(1, description="Page number for pagination (default: 1)")
|
page: Optional[int] = Field(1, description="Page number for pagination (default: 1)")
|
||||||
count: Optional[int] = Field(30, description="Number of items per page (default: 30, max: 50)")
|
count: Optional[int] = Field(30, description="Number of items per page (default: 30, max: 50)")
|
||||||
|
|||||||
@@ -18,10 +18,8 @@ from app.log import logger
|
|||||||
class QueryRuleGroupsInput(BaseModel):
|
class QueryRuleGroupsInput(BaseModel):
|
||||||
"""查询规则组工具的输入参数模型"""
|
"""查询规则组工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
group_names: Optional[List[str]] = Field(
|
group_names: Optional[List[str]] = Field(
|
||||||
None,
|
None,
|
||||||
description="Optional list of rule group names to query. If omitted, return all rule groups.",
|
description="Optional list of rule group names to query. If omitted, return all rule groups.",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from app.log import logger
|
|||||||
|
|
||||||
class QuerySchedulersInput(BaseModel):
|
class QuerySchedulersInput(BaseModel):
|
||||||
"""查询定时服务工具的输入参数模型"""
|
"""查询定时服务工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
|
|
||||||
|
|
||||||
class QuerySchedulersTool(MoviePilotTool):
|
class QuerySchedulersTool(MoviePilotTool):
|
||||||
|
|||||||
@@ -23,10 +23,8 @@ def _preview_list(value, limit: int = SITE_USERDATA_DETAIL_PREVIEW_LIMIT) -> tup
|
|||||||
class QuerySiteUserdataInput(BaseModel):
|
class QuerySiteUserdataInput(BaseModel):
|
||||||
"""查询站点用户数据工具的输入参数模型"""
|
"""查询站点用户数据工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
site_id: int = Field(
|
site_id: int = Field(
|
||||||
...,
|
...,
|
||||||
description="The ID of the site to query user data for (can be obtained from query_sites tool)",
|
description="The ID of the site to query user data for (can be obtained from query_sites tool)",
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ from app.log import logger
|
|||||||
class QuerySitesInput(BaseModel):
|
class QuerySitesInput(BaseModel):
|
||||||
"""查询站点工具的输入参数模型"""
|
"""查询站点工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
status: Optional[str] = Field(
|
status: Optional[str] = Field(
|
||||||
"all",
|
"all",
|
||||||
description="Filter sites by status: 'active' for enabled sites, 'inactive' for disabled sites, 'all' for all sites",
|
description="Filter sites by status: 'active' for enabled sites, 'inactive' for disabled sites, 'all' for all sites",
|
||||||
|
|||||||
@@ -17,10 +17,8 @@ PAGE_SIZE = 20
|
|||||||
class QuerySubscribeHistoryInput(BaseModel):
|
class QuerySubscribeHistoryInput(BaseModel):
|
||||||
"""查询订阅历史工具的输入参数模型"""
|
"""查询订阅历史工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
media_type: Optional[str] = Field(
|
media_type: Optional[str] = Field(
|
||||||
"all", description="Allowed values: movie, tv, all"
|
"all", description="Allowed values: movie, tv, all"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ MAX_PAGE_SIZE = 50
|
|||||||
|
|
||||||
class QuerySubscribeSharesInput(BaseModel):
|
class QuerySubscribeSharesInput(BaseModel):
|
||||||
"""查询订阅分享工具的输入参数模型"""
|
"""查询订阅分享工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
name: Optional[str] = Field(None, description="Filter shares by media name (partial match, optional)")
|
name: Optional[str] = Field(None, description="Filter shares by media name (partial match, optional)")
|
||||||
page: Optional[int] = Field(1, description="Page number for pagination (default: 1)")
|
page: Optional[int] = Field(1, description="Page number for pagination (default: 1)")
|
||||||
count: Optional[int] = Field(30, description="Number of items per page (default: 30, max: 50)")
|
count: Optional[int] = Field(30, description="Number of items per page (default: 30, max: 50)")
|
||||||
|
|||||||
@@ -47,10 +47,8 @@ QUERY_SUBSCRIBE_OUTPUT_FIELDS = [
|
|||||||
class QuerySubscribesInput(BaseModel):
|
class QuerySubscribesInput(BaseModel):
|
||||||
"""查询订阅工具的输入参数模型"""
|
"""查询订阅工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
status: Optional[str] = Field(
|
status: Optional[str] = Field(
|
||||||
"all",
|
"all",
|
||||||
description="Filter subscriptions by status: 'R' for enabled subscriptions, 'S' for paused ones, 'all' for all subscriptions",
|
description="Filter subscriptions by status: 'R' for enabled subscriptions, 'S' for paused ones, 'all' for all subscriptions",
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ from app.log import logger
|
|||||||
class QuerySystemSettingsInput(BaseModel):
|
class QuerySystemSettingsInput(BaseModel):
|
||||||
"""查询系统设置工具的输入参数模型。"""
|
"""查询系统设置工具的输入参数模型。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
setting_key: Optional[str] = Field(
|
setting_key: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from app.utils.jieba import cut as jieba_cut
|
|||||||
|
|
||||||
class QueryTransferHistoryInput(BaseModel):
|
class QueryTransferHistoryInput(BaseModel):
|
||||||
"""查询整理历史记录工具的输入参数模型"""
|
"""查询整理历史记录工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
title: Optional[str] = Field(None, description="Search by title (optional, supports partial match)")
|
title: Optional[str] = Field(None, description="Search by title (optional, supports partial match)")
|
||||||
status: Optional[str] = Field("all",
|
status: Optional[str] = Field("all",
|
||||||
description="Filter by status: 'success' for successful transfers, 'failed' for failed transfers, 'all' for all records (default: 'all')")
|
description="Filter by status: 'success' for successful transfers, 'failed' for failed transfers, 'all' for all records (default: 'all')")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from app.log import logger
|
|||||||
|
|
||||||
class QueryWorkflowsInput(BaseModel):
|
class QueryWorkflowsInput(BaseModel):
|
||||||
"""查询工作流工具的输入参数模型"""
|
"""查询工作流工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
state: Optional[str] = Field("all", description="Filter workflows by state: 'W' for waiting, 'R' for running, 'P' for paused, 'S' for success, 'F' for failed, 'all' for all workflows (default: 'all')")
|
state: Optional[str] = Field("all", description="Filter workflows by state: 'W' for waiting, 'R' for running, 'P' for paused, 'S' for success, 'F' for failed, 'all' for all workflows (default: 'all')")
|
||||||
name: Optional[str] = Field(None, description="Filter workflows by name (partial match, optional)")
|
name: Optional[str] = Field(None, description="Filter workflows by name (partial match, optional)")
|
||||||
trigger_type: Optional[str] = Field("all", description="Filter workflows by trigger type: 'timer' for scheduled, 'event' for event-triggered, 'manual' for manual, 'all' for all types (default: 'all')")
|
trigger_type: Optional[str] = Field("all", description="Filter workflows by trigger type: 'timer' for scheduled, 'event' for event-triggered, 'manual' for manual, 'all' for all types (default: 'all')")
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from app.schemas.types import media_type_to_agent
|
|||||||
|
|
||||||
class RecognizeMediaInput(BaseModel):
|
class RecognizeMediaInput(BaseModel):
|
||||||
"""识别媒体信息工具的输入参数模型"""
|
"""识别媒体信息工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
title: Optional[str] = Field(None, description="The title of the torrent/media to recognize (required for torrent recognition)")
|
title: Optional[str] = Field(None, description="The title of the torrent/media to recognize (required for torrent recognition)")
|
||||||
subtitle: Optional[str] = Field(None, description="The subtitle or description of the torrent (optional, helps improve recognition accuracy)")
|
subtitle: Optional[str] = Field(None, description="The subtitle or description of the torrent (optional, helps improve recognition accuracy)")
|
||||||
path: Optional[str] = Field(None, description="The file path to recognize (required for file recognition, mutually exclusive with title)")
|
path: Optional[str] = Field(None, description="The file path to recognize (required for file recognition, mutually exclusive with title)")
|
||||||
|
|||||||
@@ -16,10 +16,8 @@ from app.log import logger
|
|||||||
class ReloadPluginInput(BaseModel):
|
class ReloadPluginInput(BaseModel):
|
||||||
"""重载插件工具的输入参数模型"""
|
"""重载插件工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
plugin_id: str = Field(
|
plugin_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The plugin ID to reload so the latest saved config takes effect.",
|
description="The plugin ID to reload so the latest saved config takes effect.",
|
||||||
|
|||||||
@@ -11,10 +11,8 @@ from app.log import logger
|
|||||||
class RunSchedulerInput(BaseModel):
|
class RunSchedulerInput(BaseModel):
|
||||||
"""运行定时服务工具的输入参数模型"""
|
"""运行定时服务工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
job_id: str = Field(
|
job_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The ID of the scheduled job to run (can be obtained from query_schedulers tool)",
|
description="The ID of the scheduled job to run (can be obtained from query_schedulers tool)",
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.schemas.types import EventType, MessageChannel
|
|||||||
class RunSlashCommandInput(BaseModel):
|
class RunSlashCommandInput(BaseModel):
|
||||||
"""运行斜杠命令工具的输入参数模型"""
|
"""运行斜杠命令工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
command: str = Field(
|
command: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The slash command to execute, e.g. '/cookiecloud'. "
|
description="The slash command to execute, e.g. '/cookiecloud'. "
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.log import logger
|
|||||||
class RunWorkflowInput(BaseModel):
|
class RunWorkflowInput(BaseModel):
|
||||||
"""执行工作流工具的输入参数模型"""
|
"""执行工作流工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
workflow_id: int = Field(
|
workflow_id: int = Field(
|
||||||
..., description="Workflow ID (can be obtained from query_workflows tool)"
|
..., description="Workflow ID (can be obtained from query_workflows tool)"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,10 +15,8 @@ from app.schemas import FileItem
|
|||||||
class ScrapeMetadataInput(BaseModel):
|
class ScrapeMetadataInput(BaseModel):
|
||||||
"""刮削媒体元数据工具的输入参数模型"""
|
"""刮削媒体元数据工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
path: str = Field(
|
path: str = Field(
|
||||||
...,
|
...,
|
||||||
description="Path to the file or directory to scrape metadata for (e.g., '/path/to/file.mkv' or '/path/to/directory')",
|
description="Path to the file or directory to scrape metadata for (e.g., '/path/to/file.mkv' or '/path/to/directory')",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from app.schemas.types import MediaType, media_type_to_agent
|
|||||||
|
|
||||||
class SearchMediaInput(BaseModel):
|
class SearchMediaInput(BaseModel):
|
||||||
"""搜索媒体工具的输入参数模型"""
|
"""搜索媒体工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
title: str = Field(..., description="The title of the media to search for (e.g., 'The Matrix', 'Breaking Bad')")
|
title: str = Field(..., description="The title of the media to search for (e.g., 'The Matrix', 'Breaking Bad')")
|
||||||
year: Optional[str] = Field(None, description="Release year of the media (optional, helps narrow down results)")
|
year: Optional[str] = Field(None, description="Release year of the media (optional, helps narrow down results)")
|
||||||
media_type: Optional[str] = Field(None,
|
media_type: Optional[str] = Field(None,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from app.log import logger
|
|||||||
|
|
||||||
class SearchPersonInput(BaseModel):
|
class SearchPersonInput(BaseModel):
|
||||||
"""搜索人物工具的输入参数模型"""
|
"""搜索人物工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
name: str = Field(..., description="The name of the person to search for (e.g., 'Tom Hanks', '周杰伦')")
|
name: str = Field(..., description="The name of the person to search for (e.g., 'Tom Hanks', '周杰伦')")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ from app.log import logger
|
|||||||
|
|
||||||
class SearchPersonCreditsInput(BaseModel):
|
class SearchPersonCreditsInput(BaseModel):
|
||||||
"""搜索演员参演作品工具的输入参数模型"""
|
"""搜索演员参演作品工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
person_id: int = Field(..., description="The ID of the person/actor to search for credits (e.g., 31 for Tom Hanks in TMDB)")
|
person_id: int = Field(..., description="The ID of the person/actor to search for credits (e.g., 31 for Tom Hanks in TMDB)")
|
||||||
source: str = Field(..., description="The data source: 'tmdb' for TheMovieDB, 'douban' for Douban, 'bangumi' for Bangumi")
|
source: str = Field(..., description="The data source: 'tmdb' for TheMovieDB, 'douban' for Douban, 'bangumi' for Bangumi")
|
||||||
page: Optional[int] = Field(1, description="Page number for pagination (default: 1)")
|
page: Optional[int] = Field(1, description="Page number for pagination (default: 1)")
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ from app.schemas.types import media_type_to_agent
|
|||||||
|
|
||||||
class SearchSubscribeInput(BaseModel):
|
class SearchSubscribeInput(BaseModel):
|
||||||
"""搜索订阅缺失剧集工具的输入参数模型"""
|
"""搜索订阅缺失剧集工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
subscribe_id: int = Field(..., description="The ID of the subscription to search for missing episodes (can be obtained from query_subscribes tool)")
|
subscribe_id: int = Field(..., description="The ID of the subscription to search for missing episodes (can be obtained from query_subscribes tool)")
|
||||||
manual: Optional[bool] = Field(False, description="Whether this is a manual search (default: False)")
|
manual: Optional[bool] = Field(False, description="Whether this is a manual search (default: False)")
|
||||||
filter_groups: Optional[List[str]] = Field(None,
|
filter_groups: Optional[List[str]] = Field(None,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ from ._torrent_search_utils import (
|
|||||||
|
|
||||||
class SearchTorrentsInput(BaseModel):
|
class SearchTorrentsInput(BaseModel):
|
||||||
"""搜索种子工具的输入参数模型"""
|
"""搜索种子工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
tmdb_id: Optional[int] = Field(None, description="TMDB ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
tmdb_id: Optional[int] = Field(None, description="TMDB ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
||||||
douban_id: Optional[str] = Field(None, description="Douban ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
douban_id: Optional[str] = Field(None, description="Douban ID (can be obtained from search_media tool). Either tmdb_id or douban_id must be provided.")
|
||||||
media_type: Optional[str] = Field(None, description="Allowed values: movie, tv")
|
media_type: Optional[str] = Field(None, description="Allowed values: movie, tv")
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ SEARCH_TIMEOUT = 20
|
|||||||
class SearchWebInput(BaseModel):
|
class SearchWebInput(BaseModel):
|
||||||
"""搜索网络内容工具的输入参数模型"""
|
"""搜索网络内容工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
query: str = Field(
|
query: str = Field(
|
||||||
..., description="The search query string to search for on the web"
|
..., description="The search query string to search for on the web"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,10 +15,8 @@ from app.schemas.types import MessageChannel
|
|||||||
class SendLocalFileInput(BaseModel):
|
class SendLocalFileInput(BaseModel):
|
||||||
"""发送本地附件工具输入。"""
|
"""发送本地附件工具输入。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why sending this local file helps the user",)
|
||||||
description="Clear explanation of why sending this local file helps the user",
|
|
||||||
)
|
|
||||||
file_path: str = Field(
|
file_path: str = Field(
|
||||||
...,
|
...,
|
||||||
description="Absolute path to the local image or file to send to the user",
|
description="Absolute path to the local image or file to send to the user",
|
||||||
|
|||||||
@@ -11,10 +11,8 @@ from app.log import logger
|
|||||||
class SendMessageInput(BaseModel):
|
class SendMessageInput(BaseModel):
|
||||||
"""发送消息工具的输入参数模型"""
|
"""发送消息工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
message: Optional[str] = Field(
|
message: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
description="The message content to send to the user (should be clear and informative)",
|
description="The message content to send to the user (should be clear and informative)",
|
||||||
|
|||||||
@@ -15,10 +15,8 @@ from app.schemas import Notification, NotificationType
|
|||||||
class SendVoiceMessageInput(BaseModel):
|
class SendVoiceMessageInput(BaseModel):
|
||||||
"""发送语音消息工具输入。"""
|
"""发送语音消息工具输入。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why a voice reply is the best fit in the current context",)
|
||||||
description="Clear explanation of why a voice reply is the best fit in the current context",
|
|
||||||
)
|
|
||||||
message: str = Field(
|
message: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The spoken content to send back to the user",
|
description="The spoken content to send back to the user",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"""切换当前激活人格工具。"""
|
"""切换当前激活人格工具。"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from typing import Type
|
from typing import Type, Optional
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
@@ -13,10 +13,8 @@ from app.log import logger
|
|||||||
class SwitchPersonaInput(BaseModel):
|
class SwitchPersonaInput(BaseModel):
|
||||||
"""切换人格工具的输入参数模型。"""
|
"""切换人格工具的输入参数模型。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
persona_id: str = Field(
|
persona_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from app.log import logger
|
|||||||
|
|
||||||
class TestSiteInput(BaseModel):
|
class TestSiteInput(BaseModel):
|
||||||
"""测试站点连通性工具的输入参数模型"""
|
"""测试站点连通性工具的输入参数模型"""
|
||||||
explanation: str = Field(..., description="Clear explanation of why this tool is being used in the current context")
|
explanation: Optional[str] = Field(None, description="Clear explanation of why this tool is being used in the current context")
|
||||||
site_identifier: int = Field(..., description="Site ID to test (can be obtained from query_sites tool)")
|
site_identifier: int = Field(..., description="Site ID to test (can be obtained from query_sites tool)")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ from app.schemas import FileItem, MediaType
|
|||||||
class TransferFileInput(BaseModel):
|
class TransferFileInput(BaseModel):
|
||||||
"""整理文件或目录工具的输入参数模型"""
|
"""整理文件或目录工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
file_path: str = Field(
|
file_path: str = Field(
|
||||||
...,
|
...,
|
||||||
description="Path to the file or directory to transfer (e.g., '/path/to/file.mkv' or '/path/to/directory')",
|
description="Path to the file or directory to transfer (e.g., '/path/to/file.mkv' or '/path/to/directory')",
|
||||||
|
|||||||
@@ -17,10 +17,8 @@ from app.log import logger
|
|||||||
class UninstallPluginInput(BaseModel):
|
class UninstallPluginInput(BaseModel):
|
||||||
"""卸载插件工具的输入参数模型"""
|
"""卸载插件工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
plugin_id: str = Field(
|
plugin_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="Exact plugin ID to uninstall. Use query_installed_plugins first to find the correct plugin_id.",
|
description="Exact plugin ID to uninstall. Use query_installed_plugins first to find the correct plugin_id.",
|
||||||
|
|||||||
@@ -22,10 +22,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class UpdateCustomFilterRuleInput(BaseModel):
|
class UpdateCustomFilterRuleInput(BaseModel):
|
||||||
"""更新自定义过滤规则工具的输入参数模型"""
|
"""更新自定义过滤规则工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
current_rule_id: str = Field(
|
current_rule_id: str = Field(
|
||||||
..., description="Existing custom rule ID to update."
|
..., description="Existing custom rule ID to update."
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class UpdateCustomIdentifiersInput(BaseModel):
|
class UpdateCustomIdentifiersInput(BaseModel):
|
||||||
"""更新自定义识别词工具的输入参数模型"""
|
"""更新自定义识别词工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
identifiers: List[str] = Field(
|
identifiers: List[str] = Field(
|
||||||
...,
|
...,
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ from app.log import logger
|
|||||||
class UpdatePersonaDefinitionInput(BaseModel):
|
class UpdatePersonaDefinitionInput(BaseModel):
|
||||||
"""更新人格定义工具的输入参数模型。"""
|
"""更新人格定义工具的输入参数模型。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
persona_id: str = Field(
|
persona_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
@@ -14,10 +14,8 @@ from app.log import logger
|
|||||||
class UpdatePluginConfigInput(BaseModel):
|
class UpdatePluginConfigInput(BaseModel):
|
||||||
"""修改插件配置工具的输入参数模型"""
|
"""修改插件配置工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
plugin_id: str = Field(
|
plugin_id: str = Field(
|
||||||
...,
|
...,
|
||||||
description="The plugin ID to update. Use query_plugin_config first to inspect the current config.",
|
description="The plugin ID to update. Use query_plugin_config first to inspect the current config.",
|
||||||
|
|||||||
@@ -24,10 +24,8 @@ from app.schemas.types import SystemConfigKey
|
|||||||
class UpdateRuleGroupInput(BaseModel):
|
class UpdateRuleGroupInput(BaseModel):
|
||||||
"""更新过滤规则组工具的输入参数模型"""
|
"""更新过滤规则组工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
current_name: str = Field(..., description="Existing rule group name to update.")
|
current_name: str = Field(..., description="Existing rule group name to update.")
|
||||||
new_name: Optional[str] = Field(
|
new_name: Optional[str] = Field(
|
||||||
None,
|
None,
|
||||||
|
|||||||
@@ -17,10 +17,8 @@ from app.utils.string import StringUtils
|
|||||||
class UpdateSiteInput(BaseModel):
|
class UpdateSiteInput(BaseModel):
|
||||||
"""更新站点工具的输入参数模型"""
|
"""更新站点工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
site_id: int = Field(
|
site_id: int = Field(
|
||||||
...,
|
...,
|
||||||
description="The ID of the site to update (can be obtained from query_sites tool)",
|
description="The ID of the site to update (can be obtained from query_sites tool)",
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ from app.log import logger
|
|||||||
class UpdateSiteCookieInput(BaseModel):
|
class UpdateSiteCookieInput(BaseModel):
|
||||||
"""更新站点Cookie和UA工具的输入参数模型"""
|
"""更新站点Cookie和UA工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
site_identifier: int = Field(
|
site_identifier: int = Field(
|
||||||
...,
|
...,
|
||||||
description="Site ID to update Cookie and User-Agent for (can be obtained from query_sites tool)",
|
description="Site ID to update Cookie and User-Agent for (can be obtained from query_sites tool)",
|
||||||
|
|||||||
@@ -16,10 +16,8 @@ from app.schemas.types import EventType
|
|||||||
class UpdateSubscribeInput(BaseModel):
|
class UpdateSubscribeInput(BaseModel):
|
||||||
"""更新订阅工具的输入参数模型"""
|
"""更新订阅工具的输入参数模型"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
subscribe_id: int = Field(
|
subscribe_id: int = Field(
|
||||||
...,
|
...,
|
||||||
description="The ID of the subscription to update (can be obtained from query_subscribes tool)",
|
description="The ID of the subscription to update (can be obtained from query_subscribes tool)",
|
||||||
|
|||||||
@@ -25,10 +25,8 @@ SettingValue = Optional[Union[list, dict, bool, int, float, str]]
|
|||||||
class UpdateSystemSettingsInput(BaseModel):
|
class UpdateSystemSettingsInput(BaseModel):
|
||||||
"""更新系统设置工具的输入参数模型。"""
|
"""更新系统设置工具的输入参数模型。"""
|
||||||
|
|
||||||
explanation: str = Field(
|
explanation: Optional[str] = Field(None,
|
||||||
...,
|
description="Clear explanation of why this tool is being used in the current context",)
|
||||||
description="Clear explanation of why this tool is being used in the current context",
|
|
||||||
)
|
|
||||||
setting_key: str = Field(
|
setting_key: str = Field(
|
||||||
...,
|
...,
|
||||||
description=(
|
description=(
|
||||||
|
|||||||
Reference in New Issue
Block a user