Closed usawjq closed 5 months ago
前后端都在一个服务器
中断的时候停止按钮也消失了吗
中断后,发送按钮是灰色的,重新填入问题后,又可以发送了
看起来像是后端的问题,是否使用nginx之类的反代了
是的,我升级了ng,然后怎么配置都不行,最后只能绕过了NG,解决了问题,但是还是想请教一下 我是1.18nginx,配置中是这么写的,但是还是会返回流偶尔乱码,我这么配置是不对么,感谢
location /sse {
proxy_pass http://XXXX.XXX.COM;
proxy_http_version 1.1;
proxy_set_header Connection "keep-alive";
proxy_buffering off;
proxy_cache off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600s; # 根据需要增加超时时间
add_header Cache-Control 'no-cache';
add_header Content-Type 'text/event-stream';
}
按理说有个proxy_buffering off;是不会有这种问题,升级下nginx版本试试
是的,我升级了ng,然后怎么配置都不行,最后只能绕过了NG,解决了问题,但是还是想请教一下 我是1.18nginx,配置中是这么写的,但是还是会返回流偶尔乱码,我这么配置是不对么,感谢
location /sse { proxy_pass http://XXXX.XXX.COM; proxy_http_version 1.1; proxy_set_header Connection "keep-alive"; proxy_buffering off; proxy_cache off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 600s; # 根据需要增加超时时间 add_header Cache-Control 'no-cache'; add_header Content-Type 'text/event-stream'; }
有时候乱码是 temperature 参数给的太大接近2了。 openAI 就会乱码胡说。
Q:mf A:2022年,我们迎来了10个年头,这段旅程充满了挑战和成就。我们一
抓取的后端连接来看,内容是完整返回了的
{"choices": [{"index": 0, "delta": {"content": "2"}, "finish_reason": null}]} {"choices": [{"index": 0, "delta": {"content": "0"}, "finish_reason": null}]} {"choices": [{"index": 0, "delta": {"content": "2"}, "finish_reason": null}]} {"choices": [{"index": 0, "delta": {"content": "2"}, "finish_reason": null}]} {"choices": [{"index": 0, "delta": {"content": "年"}, "finish_reason": null}]} .....................