chatgpt-java icon indicating copy to clipboard operation
chatgpt-java copied to clipboard

图片编辑接口editImages 代理报400

Open bianjie1314 opened this issue 1 year ago • 5 comments

使用代理服务器后,进行图片编辑接口请求editImages,会返回400报错,别的接口时正常,这个需要怎么解决

bianjie1314 avatar Jun 15 '23 09:06 bianjie1314

报错什么信息? @bianjie1314

使用代理服务器后,进行图片编辑接口请求editImages,会返回400报错,别的接口时正常,这个需要怎么解决

Grt1228 avatar Jun 15 '23 14:06 Grt1228

location /aiApi/ { proxy_pass https://api.openai.com/; proxy_ssl_server_name on; proxy_set_header Host api.openai.com; #proxy_set_header Connection ''; #proxy_http_version 1.1;

chunked_transfer_encoding off;

proxy_buffering off;

proxy_cache off;

       # proxy_set_header X-Forwarded-For $remote_addr;
       # proxy_set_header X-Forwarded-Proto $scheme;
    }

上面那代码就是使用服务进行代理nginx配置的,调用文本对话、文本绘图都是正常,但是调用图片编辑接口会报400 bad request

bianjie1314 avatar Jun 19 '23 16:06 bianjie1314

我也遇到了同样的问题

tcscat avatar Oct 15 '23 09:10 tcscat

location /aiApi/ { proxy_pass https://api.openai.com/; proxy_ssl_server_name on; proxy_set_header Host api.openai.com; #proxy_set_header Connection ''; #proxy_http_version 1.1;

chunked_transfer_encoding off;

proxy_buffering off;

proxy_cache off;

       # proxy_set_header X-Forwarded-For $remote_addr;
       # proxy_set_header X-Forwarded-Proto $scheme;
    }

上面那代码就是使用服务进行代理nginx配置的,调用文本对话、文本绘图都是正常,但是调用图片编辑接口会报400 bad request

我也遇到这样的问题,请问您解决了嘛?

Y0421 avatar Dec 02 '23 03:12 Y0421

@dongdong-gogogo 请问问题解决了吗

IMYR666 avatar Mar 10 '24 07:03 IMYR666