AS AgentScopeAPI 手册 / API Reference

AnthropicConversationMerger

public class AnthropicConversationMerger
源码Source io/agentscope/extensions/model/anthropic/formatter/AnthropicConversationMerger.java:31–111

Anthropic 会话 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
messagesList<Msg>会话消息的列出。List of conversation messages
conversationHistoryPromptString会话历史提示词(类型 `String`)。Prompt text to prepend
返回Returns List<Object>
返回列出。List of content blocks (text and images)
源码Source io/agentscope/extensions/model/anthropic/formatter/AnthropicConversationMerger.java:40–77
基于官方固定版本源码静态生成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.