包package
agentscope.formatteragentscope.formatter
module agentscope.formatter
agentscope.formatter 属于消息·事件·格式化,统一消息模型与协议转换。 该包共收录 23 个公开类型。
The formatter module in agentscope.
源码Source
agentscope/formatter/__init__.py:1类Classes
AnthropicChatFormatter类class | Anthropic 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The Anthropic formatter class for chatbot scenario, where only a user and an agent are involved. We use the `role` field to identify different entities in the conversation. |
AnthropicMultiAgentFormatter类class | Anthropic Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 Anthropic formatter for multi-agent conversations, where more than a user and an agent are involved. |
DashScopeChatFormatter类class | DashScope 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The DashScope formatter class for chatbot scenario (OpenAI-compatible format), where only a user and an agent are involved. We use the ``role`` field to identify different entities in the conversation. |
DashScopeMultiAgentFormatter类class | DashScope Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 DashScope formatter for multi-agent conversations (OpenAI-compatible format), where more than a user and an agent are involved. |
DeepSeekChatFormatter类class | DeepSeek 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The DeepSeek formatter class for chatbot scenario, where only a user and an agent are involved. We use the `role` field to identify different entities in the conversation. |
DeepSeekMultiAgentFormatter类class | DeepSeek Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 DeepSeek formatter for multi-agent conversations, where more than a user and an agent are involved. |
FormatterBase类class | 消息格式转换基类 The base class for formatters. |
GeminiChatFormatter类class | Gemini 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The Gemini formatter class for chatbot scenario, where only a user and an agent are involved. We use the `role` field to identify different entities in the conversation. |
GeminiMultiAgentFormatter类class | Gemini Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The multi-agent formatter for Google Gemini API, where more than a user and an agent are involved. |
MiniMaxChatFormatter类class | MiniMax 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The MiniMax formatter for chatbot scenario. |
MiniMaxMultiAgentFormatter类class | MiniMax Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The MiniMax formatter for multi-agent conversations. |
MoonshotChatFormatter类class | Moonshot 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The Moonshot AI formatter for chatbot scenario. |
MoonshotMultiAgentFormatter类class | Moonshot Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 Formatter for the Moonshot AI API in multi-agent conversations. |
OllamaChatFormatter类class | Ollama 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The Ollama formatter class for chatbot scenario, where only a user and an agent are involved. We use the `role` field to identify different participants in the conversation. |
OllamaMultiAgentFormatter类class | Ollama Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 Ollama formatter for multi-agent conversations, where more than a user and an agent are involved. |
OpenAIChatFormatter类class | OpenAI 聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The OpenAI formatter class for chatbot scenario, where only a user and an agent are involved. We use the `name` field in OpenAI API to identify different entities in the conversation. |
OpenAIMultiAgentFormatter类class | OpenAI Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 OpenAI formatter for multi-agent conversations, where more than a user and an agent are involved. |
OpenAIResponseFormatter类class | OpenAIResponse 格式化器,在智能体、模型与前端之间传递结构化消息和事件。 Formatter for the OpenAI Responses API in chat (single-agent) mode. |
OpenAIResponseMultiAgentFormatter类class | OpenAIResponse Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 Formatter for the OpenAI Responses API in multi-agent mode. |
VolcengineChatFormatter类class | 火山引擎聊天格式化器,在智能体、模型与前端之间传递结构化消息和事件。 The Volcengine Ark formatter for a chatbot conversation. |
VolcengineMultiAgentFormatter类class | 火山引擎 Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 Volcengine formatter for multi-agent conversations, where more than a user and an agent are involved. |
XAIChatFormatter类class | 用于xAI 聊天模型的格式化器。 Formatter for the xAI chat model. |
XAIMultiAgentFormatter类class | xAI Multi 智能体格式化器,在智能体、模型与前端之间传递结构化消息和事件。 Formatter for the xAI chat model in multi-agent conversations. |