mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-09 01:16:50 +08:00
fix current_date
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import asyncio
|
||||
import traceback
|
||||
import uuid
|
||||
from time import strftime
|
||||
from dataclasses import dataclass
|
||||
from typing import Callable, Dict, List, Optional
|
||||
|
||||
@@ -126,7 +125,7 @@ class MoviePilotAgent:
|
||||
# 系统提示词
|
||||
system_prompt = prompt_manager.get_agent_prompt(
|
||||
channel=self.channel
|
||||
).format(current_date=strftime("%Y-%m-%d"))
|
||||
)
|
||||
|
||||
# LLM 模型(用于 agent 执行)
|
||||
llm = self._initialize_llm()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""提示词管理器"""
|
||||
|
||||
from pathlib import Path
|
||||
from time import strftime
|
||||
from typing import Dict
|
||||
|
||||
from app.core.config import settings
|
||||
@@ -81,7 +82,8 @@ class PromptManager:
|
||||
# 始终替换占位符,避免后续 .format() 时因残留花括号报 KeyError
|
||||
base_prompt = base_prompt.format(
|
||||
markdown_spec=markdown_spec,
|
||||
verbose_spec=verbose_spec
|
||||
verbose_spec=verbose_spec,
|
||||
current_date=strftime("%Y-%m-%d")
|
||||
)
|
||||
|
||||
return base_prompt
|
||||
|
||||
Reference in New Issue
Block a user