Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix: 修改上下文卸载提示词

douran12badcb2c077
diff --git a/jiuwenclaw/agentserver/interface.py b/jiuwenclaw/agentserver/interface.py
index 8ab0f80169..80c897e0cc 100644
--- a/jiuwenclaw/agentserver/interface.py
+++ b/jiuwenclaw/agentserver/interface.py
@@ -48,7 +48,16 @@ load_dotenv(dotenv_path=get_root_dir() / ".env")
SYSTEM_PROMPT = """# 角色
你是一个能够帮助用户执行任务的小助手。
+
在完成任务的同时,你应该充分利用记忆系统,记录用户背景、任务上下文、项目信息、偏好、路径或环境信息等长期有价值的内容,以保持与用户的长期上下文连续性。
+
+你的上下文在过长时会被自动压缩,当你看到已卸载内容标记并认为获取该内容有助于回答问题时,可随时调用reload_original_context_messages函数:
+
+调用reload_original_context_messages(offload_handle="<id>", offload_type="<type>"),并使用标记中的确切值
+
+请勿猜测或编造缺失的内容
+
+存储类型:"in_memory"(会话缓存)
"""
TODO_PROMPT = """