AS AgentScopeAPI 手册 / API Reference

Prompts

public class Prompts
源码Source 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_END
staticfinal
String
压缩消息列表结束字段。
Generic prompt end marker for compression operations.
PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT
staticfinal
String
上一个 ROUND 工具 INVOCATION 压缩提示词字段。
Prompt for compressing previous round tool invocations independently.
PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT
staticfinal
String
上一个 ROUND 会话摘要提示词字段。
Prompt for summarizing previous round conversations.
CONTEXT_OFFLOAD_TAG_FORMAT
staticfinal
String
用于上下文卸载标签的格式。
Format for context offload tag.
CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT
staticfinal
String
当前 ROUND LARGE 消息摘要提示词字段。
Prompt for summarizing current round large messages.
CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT
staticfinal
String
当前 ROUND 消息压缩提示词字段。
Prompt for compressing current round messages (main instruction, without character count requirement).
CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENT
staticfinal
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
staticfinal

压缩消息列表结束字段。声明为 public static final String COMPRESSION_MESSAGE_LIST_END。

Generic prompt end marker for compression operations.

源码Source io/agentscope/core/memory/autocontext/Prompts.java:44–45

PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT

public static final String PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT
staticfinal

上一个 ROUND 工具 INVOCATION 压缩提示词字段。声明为 public static final String PREVIOUS_ROUND_TOOL_INVOCATION_COMPRESS_PROMPT。

Prompt for compressing previous round tool invocations independently.

源码Source io/agentscope/core/memory/autocontext/Prompts.java:52–71

PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT

public static final String PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT
staticfinal

上一个 ROUND 会话摘要提示词字段。声明为 public static final String PREVIOUS_ROUND_CONVERSATION_SUMMARY_PROMPT。

Prompt for summarizing previous round conversations.

源码Source io/agentscope/core/memory/autocontext/Prompts.java:82–118

CONTEXT_OFFLOAD_TAG_FORMAT

public static final String CONTEXT_OFFLOAD_TAG_FORMAT
staticfinal

用于上下文卸载标签的格式。

Format for context offload tag.

源码Source io/agentscope/core/memory/autocontext/Prompts.java:121

CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT

public static final String CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT
staticfinal

当前 ROUND LARGE 消息摘要提示词字段。声明为 public static final String CURRENT_ROUND_LARGE_MESSAGE_SUMMARY_PROMPT。

Prompt for summarizing current round large messages.

源码Source io/agentscope/core/memory/autocontext/Prompts.java:128–144

CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT

public static final String CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT
staticfinal

当前 ROUND 消息压缩提示词字段。声明为 public static final String CURRENT_ROUND_MESSAGE_COMPRESS_PROMPT。

Prompt for compressing current round messages (main instruction, without character count requirement).

源码Source io/agentscope/core/memory/autocontext/Prompts.java:151–201

CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENT

public static final String CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENT
staticfinal

当前 ROUND 消息压缩 CHAR REQUIREMENT字段。声明为 public static final String CURRENT_ROUND_MESSAGE_COMPRESS_CHAR_REQUIREMENT。

Character count requirement template for current round message compression.

源码Source io/agentscope/core/memory/autocontext/Prompts.java:208–216
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.