Prompts
public class Prompts
io/agentscope/core/memory/autocontext/Prompts.java:31–217提示词,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.core.memory.autocontext 包。核心成员包括 COMPRESSION_MESSAGE_LIST_END、PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT、PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT、CONTEXT_OFFLOAD_TAG_FORMAT、CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT、CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT。
Prompt templates for AutoContextMemory compression strategies.
Prompts are organized by compression strategy in progressive order (from lightweight to heavyweight):
-
Strategy 1: Tool invocation compression
-
Strategy 2-3: Large message offloading
-
Strategy 4: Previous round conversation summary
-
Strategy 5: Current round large message summary
-
Strategy 6: Current round message compression
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
COMPRESSION_MESSAGE_LIST_ENDstaticfinal | String | 压缩消息列表结束字段。 Generic prompt end marker for compression operations. |
PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPTstaticfinal | String | 上一个 ROUND 工具 INVOCATION 压缩提示词字段。 Prompt for compressing previous round tool invocations independently. |
PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPTstaticfinal | String | 上一个 ROUND 会话摘要提示词字段。 Prompt for summarizing previous round conversations. |
CONTEXT_OFFLOAD_TAG_FORMATstaticfinal | String | 用于上下文卸载标签的格式。 Format for context offload tag. |
CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPTstaticfinal | String | 当前 ROUND LARGE 消息摘要提示词字段。 Prompt for summarizing current round large messages. |
CURRENT_ROUND_MESSAGE_COMPRESS_PROMPTstaticfinal | String | 当前 ROUND 消息压缩提示词字段。 Prompt for compressing current round messages (main instruction, without character count requirement). |
CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENTstaticfinal | String | 当前 ROUND 消息压缩 CHAR REQUIREMENT字段。 Character count requirement template for current round message compression. |
字段详情Field Detail
COMPRESSION_MESSAGE_LIST_END
public static final String COMPRESSION_MESSAGE_LIST_END
压缩消息列表结束字段。声明为 public static final String COMPRESSION_MESSAGE_LIST_END。
Generic prompt end marker for compression operations.
io/agentscope/core/memory/autocontext/Prompts.java:44–45PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT
public static final String PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT
上一个 ROUND 工具 INVOCATION 压缩提示词字段。声明为 public static final String PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT。
Prompt for compressing previous round tool invocations independently.
io/agentscope/core/memory/autocontext/Prompts.java:52–71PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT
public static final String PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT
上一个 ROUND 会话摘要提示词字段。声明为 public static final String PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT。
Prompt for summarizing previous round conversations.
io/agentscope/core/memory/autocontext/Prompts.java:82–118CONTEXT_OFFLOAD_TAG_FORMAT
public static final String CONTEXT_OFFLOAD_TAG_FORMAT
用于上下文卸载标签的格式。
Format for context offload tag.
io/agentscope/core/memory/autocontext/Prompts.java:121CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT
public static final String CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT
当前 ROUND LARGE 消息摘要提示词字段。声明为 public static final String CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT。
Prompt for summarizing current round large messages.
io/agentscope/core/memory/autocontext/Prompts.java:128–144CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT
public static final String CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT
当前 ROUND 消息压缩提示词字段。声明为 public static final String CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT。
Prompt for compressing current round messages (main instruction, without character count requirement).
io/agentscope/core/memory/autocontext/Prompts.java:151–201CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENT
public static final String CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENT
当前 ROUND 消息压缩 CHAR REQUIREMENT字段。声明为 public static final String CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENT。
Character count requirement template for current round message compression.
io/agentscope/core/memory/autocontext/Prompts.java:208–216