OpenAIChatCompletionClient 支持自定义 base_url,因此可以让智能体接入 siflow endpoint。
本文默认模型为 glm-5.2;完整模型列表和价格请查看 模型广场。
配置
在 API 密钥 页面创建 API Key,并将其导出为环境变量:autogen-agentchat 和 autogen-ext[openai],然后创建一个接入 siflow endpoint 的客户端。使用 autogen-ext[openai] 提供的 OpenAIChatCompletionClient,并将该客户端传给 AssistantAgent,即可运行多智能体团队。
自定义模型需要提供
model_info。如果没有提供,客户端会抛出 model_info is required。对于 glm-5.2 这类支持 tool calling 的模型,应设置 function_calling=True。
