AS AgentScopeAPI 手册 / API Reference
包package agentscope.formatter

agentscope.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.
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.