Skip to main content
AutoGen 是 Microsoft 用于构建多智能体 AI 应用的框架。它的 OpenAIChatCompletionClient 支持自定义 base_url,因此可以让智能体接入 siflow endpoint。 本文默认模型为 glm-5.2;完整模型列表和价格请查看 模型广场

配置

API 密钥 页面创建 API Key,并将其导出为环境变量:
安装 autogen-agentchatautogen-ext[openai],然后创建一个接入 siflow endpoint 的客户端。使用 autogen-ext[openai] 提供的 OpenAIChatCompletionClient,并将该客户端传给 AssistantAgent,即可运行多智能体团队。
自定义模型需要提供 model_info。如果没有提供,客户端会抛出 model_info is required。对于 glm-5.2 这类支持 tool calling 的模型,应设置 function_calling=True

验证

发送一条消息。如果返回正常回复,即表示连接成功: