AnthropicConversationMerger
public class AnthropicConversationMerger
源码Source
io/agentscope/extensions/model/anthropic/formatter/AnthropicConversationMerger.java:31–111Anthropic 会话 Merger,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.anthropic.formatter 包。核心成员包括 mergeConversation。
Merges multi-agent conversation messages into a formatted conversation history for Anthropic API.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static List<Object> mergeConversation(List<Msg> messages, String conversationHistoryPrompt)static | 合并会话。 Merge conversation messages into formatted blocks with history tags. |
方法详情Method Detail
mergeConversation
public static List<Object> mergeConversation(List<Msg> messages, String conversationHistoryPrompt)
static
合并会话。
Merge conversation messages into formatted blocks with history tags.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
messages | List<Msg> | 会话消息的列出。List of conversation messages |
conversationHistoryPrompt | String | 会话历史提示词(类型 `String`)。Prompt text to prepend |
List<Object>返回列出。List of content blocks (text and images)
源码Source
io/agentscope/extensions/model/anthropic/formatter/AnthropicConversationMerger.java:40–77