确认PokieTicker新闻库数据源

This commit is contained in:
2026-03-16 02:19:25 +08:00
parent 78f133617f
commit 564c92c0c8
182 changed files with 6436 additions and 1050 deletions

View File

@@ -39,12 +39,12 @@ class RiskAgent(ReActAgent):
config: Configuration dictionary
long_term_memory: Optional ReMeTaskLongTermMemory instance
"""
self.config = config or {}
self.agent_id = name
object.__setattr__(self, "config", config or {})
object.__setattr__(self, "agent_id", name)
if toolkit is None:
toolkit = Toolkit()
self.toolkit = toolkit
object.__setattr__(self, "toolkit", toolkit)
sys_prompt = self._load_system_prompt()
@@ -99,4 +99,12 @@ class RiskAgent(ReActAgent):
self.config.get("config_name", "default"),
active_skill_dirs=active_skill_dirs,
)
self.sys_prompt = self._load_system_prompt()
self._apply_runtime_sys_prompt(self._load_system_prompt())
def _apply_runtime_sys_prompt(self, sys_prompt: str) -> None:
"""Update the prompt used by future turns and the cached system msg."""
self._sys_prompt = sys_prompt
for msg, _marks in self.memory.content:
if getattr(msg, "role", None) == "system":
msg.content = sys_prompt
break