- MoviePilot助手增加了多个智能体工具,大幅提升智能体能力
- 智能体对话支持上下文记忆,发送 `/clear_session` 指令或超过15分钟没动作将清除记忆
This commit is contained in:
jxxghp
2025-11-18 12:52:58 +08:00
parent ed73cfdcc7
commit 65ceff9824
3 changed files with 16 additions and 22 deletions

View File

@@ -50,11 +50,6 @@ class GetRecommendationsTool(MoviePilotTool):
media_type: Optional[str] = "all", limit: Optional[int] = 20, **kwargs) -> str:
logger.info(f"执行工具: {self.name}, 参数: source={source}, media_type={media_type}, limit={limit}")
try:
name_dicts = {
"tmdb_trending": "TMDB 热门推荐",
"douban_hot": "豆瓣热门推荐",
"bangumi_calendar": "番组计划推荐"
}
recommend_chain = RecommendChain()
results = []
if source == "tmdb_trending":

View File

@@ -5,7 +5,6 @@ from typing import Optional, Type
import jieba
from pydantic import BaseModel, Field
from sqlalchemy.ext.asyncio import AsyncSession
from app.agent.tools.base import MoviePilotTool
from app.db import AsyncSessionFactory
@@ -17,7 +16,8 @@ class QueryTransferHistoryInput(BaseModel):
"""查询整理历史记录工具的输入参数模型"""
explanation: str = Field(..., 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)")
status: Optional[str] = Field("all", description="Filter by status: 'success' for successful transfers, 'failed' for failed transfers, 'all' for all records (default: 'all')")
status: Optional[str] = Field("all",
description="Filter by status: 'success' for successful transfers, 'failed' for failed transfers, 'all' for all records (default: 'all')")
page: Optional[int] = Field(1, description="Page number for pagination (default: 1, each page contains 30 records)")
@@ -131,4 +131,3 @@ class QueryTransferHistoryTool(MoviePilotTool):
except Exception as e:
logger.error(f"查询整理历史记录失败: {e}", exc_info=True)
return f"查询整理历史记录时发生错误: {str(e)}"

View File

@@ -1,2 +1,2 @@
APP_VERSION = 'v2.8.2'
FRONTEND_VERSION = 'v2.8.2'
APP_VERSION = 'v2.8.3'
FRONTEND_VERSION = 'v2.8.3'