类 OpenAIMultiAgentFormatter
java.lang.Object
io.agentscope.core.formatter.AbstractBaseFormatter<OpenAIMessage,OpenAIResponse,OpenAIRequest>
io.agentscope.core.formatter.openai.OpenAIBaseFormatter
io.agentscope.core.formatter.openai.OpenAIChatFormatter
io.agentscope.core.formatter.openai.OpenAIMultiAgentFormatter
- 所有已实现的接口:
Formatter<OpenAIMessage,OpenAIResponse, OpenAIRequest>
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.
-
字段概要
从类继承的字段 io.agentscope.core.formatter.openai.OpenAIBaseFormatter
messageConverter, responseParser -
构造器概要
构造器构造器说明Create an OpenAIMultiAgentFormatter with default conversation history prompt.OpenAIMultiAgentFormatter(String conversationHistoryPrompt) Create an OpenAIMultiAgentFormatter with custom conversation history prompt. -
方法概要
从类继承的方法 io.agentscope.core.formatter.openai.OpenAIChatFormatter
applyAdditionalBodyParams, applyMaxTokens, applyOptions, applyToolChoice, applyTools, supportsStrict从类继承的方法 io.agentscope.core.formatter.openai.OpenAIBaseFormatter
applyCacheControl, applyToolChoice, applyTools, buildRequest, buildRequest, parseResponse从类继承的方法 io.agentscope.core.formatter.AbstractBaseFormatter
convertToolResultToString, extractTextContent, extractTextContent, format, formatRoleLabel, getOptionOrDefault, hasMediaContent, saveBase64DataToTempFile, shouldBypassHistory
-
构造器详细资料
-
OpenAIMultiAgentFormatter
public OpenAIMultiAgentFormatter()Create an OpenAIMultiAgentFormatter with default conversation history prompt. -
OpenAIMultiAgentFormatter
Create an OpenAIMultiAgentFormatter with custom conversation history prompt.- 参数:
conversationHistoryPrompt- The prompt to prepend before conversation history
-
-
方法详细资料
-
doFormat
- 覆盖:
doFormat在类中OpenAIChatFormatter
-