类 OpenAIMultiAgentFormatter

所有已实现的接口:
Formatter<OpenAIMessage,OpenAIResponse,OpenAIRequest>
直接已知子类:
DeepSeekMultiAgentFormatter, GLMMultiAgentFormatter

public class OpenAIMultiAgentFormatter extends OpenAIChatFormatter
Multi-agent formatter for OpenAI Chat Completion HTTP API. Converts AgentScope Msg objects to OpenAI DTO types with multi-agent support.

This formatter extends OpenAIChatFormatter and handles conversations between multiple agents by:

  • Grouping multi-agent messages into conversation history
  • Using special markup (e.g., history tags) to structure conversations
  • Consolidating multi-agent conversations into single user messages

Inherits all option, tool, and tool_choice handling from OpenAIChatFormatter.

  • 构造器详细资料

    • OpenAIMultiAgentFormatter

      public OpenAIMultiAgentFormatter()
      Create an OpenAIMultiAgentFormatter with default conversation history prompt.
    • OpenAIMultiAgentFormatter

      public OpenAIMultiAgentFormatter(String conversationHistoryPrompt)
      Create an OpenAIMultiAgentFormatter with custom conversation history prompt.
      参数:
      conversationHistoryPrompt - The prompt to prepend before conversation history
  • 方法详细资料