fix current_date

This commit is contained in:
jxxghp
2026-03-27 21:55:09 +08:00
parent aaeb4d2634
commit f859d99d91
2 changed files with 36 additions and 35 deletions
+1 -2
View File
@@ -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()
+3 -1
View File
@@ -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