Skip to main content
agentscope-extensions-model-openai 接入 OpenAI Chat Completions 风格的模型。OpenAI 兼容端点也使用这个适配模块,例如 DeepSeek、GLM、Kimi、MiniMax 等遵循 OpenAI API 载荷格式的服务。

添加依赖

ModelRegistry

设置 OPENAI_API_KEY 后,使用 openai:<model> 字符串 id:

显式 builder

需要自定义 endpoint、formatter、transport 或生成参数时,使用 builder:

Spring Boot

Spring Boot 应用可以使用 OpenAI starter:
完整 builder 选项、formatter、credential 和 registry context 细节见 模型