Class AnthropicConversationMerger

java.lang.Object
io.agentscope.extensions.model.anthropic.formatter.AnthropicConversationMerger

public class AnthropicConversationMerger extends Object
Merges multi-agent conversation messages into a formatted conversation history for Anthropic API.
  • Constructor Details

    • AnthropicConversationMerger

      public AnthropicConversationMerger()
  • Method Details

    • mergeConversation

      public static List<Object> mergeConversation(List<io.agentscope.core.message.Msg> messages, String conversationHistoryPrompt)
      Merge conversation messages into formatted blocks with history tags.
      Parameters:
      messages - List of conversation messages
      conversationHistoryPrompt - Prompt text to prepend
      Returns:
      List of content blocks (text and images)