janhq / cortex.cpp

Local AI API Platform
https://cortex.so
Apache License 2.0
2.05k stars 116 forks source link

bug: ChatGPT-Next-Web does not work properly with nitro #336

Closed caizongchao closed 9 months ago

caizongchao commented 10 months ago

Chat GPT Next (https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git) reports "fetch error" while connecting to nitro server.

Recompile nitro with ALLOW_ALL_CORS resolved this issue, but it still cannot work properly in streaming mode. The content-type of nitroStreamResonse has to be set to "text/event-stream" to make response streaming work properly.

drogon::HttpResponse::newStreamResponse(callback, attachmentFileName, drogon::CT_CUSTOM, "text/event-stream");

tikikun commented 9 months ago

I have the same issue as you also, even tho it seems working fine on other UIs, very strange

tikikun commented 9 months ago

if you're familiar with chatgptnextweb, can support debugging on that end

tikikun commented 9 months ago

close due to non responding