You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用OpenAI Assistant API时,GPT-4 Turbo模型不支持json_schema类型response_format的问题咨询

调用OpenAI Assistant API时,GPT-4 Turbo模型不支持json_schema类型response_format的问题咨询

我最近在折腾OpenAI Assistant API的时候碰到个麻烦事儿,想跟大家请教下。

我从OpenAI的官方文档里看到,咱们是可以按指定方式设置response_format的,文档里的示例是这样的:

OpenAI官方文档中response_format示例截图

于是我照着这个思路,在Postman里构造了这样的请求体:

{
    "instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
    "name": "Math Tutor",
    "tools": [{"type": "code_interpreter"}],
    "model": "GPT-4 Turbo",
    "type": "json_schema"
 }

可发送请求后,我却收到了错误返回:

{
&...

备注:内容来源于stack exchange,提问作者Bhargav

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 15:35:29