类 DashScopeMessageConverter

java.lang.Object
io.agentscope.core.formatter.dashscope.DashScopeMessageConverter

public class DashScopeMessageConverter extends Object
Converts AgentScope Msg objects to DashScope DTO message types.

This class provides unified conversion methods for both simple text messages and multimodal messages containing images, videos, and audio.

  • 构造器详细资料

  • 方法详细资料

    • convertToMessage

      public DashScopeMessage convertToMessage(Msg msg, boolean useMultimodalFormat)
      Convert single Msg to DashScopeMessage.

      This is the main entry point for message conversion. It automatically selects the appropriate format based on the message content and the hasMediaContent flag.

      参数:
      msg - The message to convert
      useMultimodalFormat - Whether to use multimodal content format (List of content parts)
      返回:
      The converted DashScopeMessage