ChatGPTNextWeb / ChatGPTNextWeb/NextChat
[Bug] Unexpected return from /api/openai endpoint
Open
- Dominant language
- TypeScript
- Stars
- 88.8k
- Forks
- 59.1k
- PR merge metrics
- No merged PRs in 30d
Description
I set the OpenAI Enpoint to "/api/openai" and when I start a new chat with arbitrary message, it returns html code instead of a response.
```
NextChat
(self.__next_f=self.__next_f||[]).push([0])self.__next_f.push([1,"1:HL[\"/_next/static/css/cbfc412cab8c824e.css\",{\"as\":\"style\"}]\n0:\"$L2\"\n"])self.__next_f.push([1,"3:HL[\"/_next/static/css/fec8607a5fb5358f.css\",{\"as\":\"style\"}]\n4:HL[\"/_next/static/css/765ce86c7f30c399.css\",{\"as\":\"style\"}]\n"])self.__next_f.push([1,"5:I{\"id\":2353,\"chunks\":[\"272:static/chunks/webpack-57239b9fc060ef9d.js\",\"629:static/chunks/04b39fde-0b24a21fbfcaaf85.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":7330,\"chunks\":[\"272:static/chunks/webpack-57239b9fc060ef9d.js\",\"629:static/chunks/04b39fde-0b24a21fbfcaaf85.js\"],\"name\":\"\",\"async\":false}\n9:I{\"id\":9180,\"chunks\":[\"272:static/chunks/webpack-57239b9fc060ef9d.js\",\"629:static/chunks/04b39fde-0b24a21fbfcaaf85.js\"],\"name\":\"default\",\"async\":false}\na:I{\"id\":2306,\"chunks\":[\"272:static/chunks/webpack-57239b"])self.__next_f.push([1,"9fc060ef9d.js\",\"629:static/chunks/04b39fde-0b24a21fbfcaaf85.js\"],\"name\":\"default\",\"async\":false}\n"])self.__next_f.push([1,"2:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/cbfc412cab8c824e.css\",\"precedence\":\"next\"}]],[\"$\",\"$L5\",null,{\"buildId\":\"dtZUZrfPkIHXzRgKdHYtn\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialHead\":[\"$L6\",null],\"globalErrorComponent\":\"$7\",\"notFound\":[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"config\",\"content\":\"{\\\"version\\\":\\\"v2.10.1\\\",\\\"commitDate\\\":\\\"1703691940000\\\",\\\"commitHash\\\":\\\"d17000975fe58c84e576f89be552c76b91bcb827\\\",\\\"buildMode\\\":\\\"export\\\",\\\"isApp\\\":true}\"}],[\"$\",\"link\",null,{\"rel\":\"manifest\",\"href\":\"/site.webmanifest\"}],[\"$\",\"script\",null,{\"src\":\"/serviceWorkerRegister.js\",\"defer\":true}]]}],[\"$\",\"body\",null,{\"children\":[\"$L8\",\"$undefined\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]]}]]}],\"asNotFound\":false,\"children\":[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"config\",\"content\":\"{\\\"version\\\":\\\"v2.10.1\\\",\\\"commitDate\\\":\\\"1703691940000\\\",\\\"commitHash\\\":\\\"d17000975fe58c84e576f89be552c76b91bcb827\\\",\\\"buildMode\\\":\\\"export\\\",\\\"isApp\\\":true}\"}],[\"$\",\"link\",null,{\"rel\":\"manifest\",\"href\":\"/site.webmanifest\"}],[\"$\",\"script\",null,{\"src\":\"/serviceWorkerRegister.js\",\"defer\":true}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$Lb\",null],\"segment\":\"__PAGE__\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/fec8607a5fb5358f.css\",\"precedence\":\"next\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/765ce86c7f30c399.css\",\"precedence\":\"next\"}]]}]}]]}],null]}]]\n"])self.__next_f.push([1,"c:I{\"id\":5766,\"chunks\":[\"629:static/chunks/04b39fde-0b24a21fbfcaaf85.js\",\"931:static/chunks/app/page-e54af9ade279aa29.js\"],\"name\":\"Home\",\"async\":false}\nb:[[\"$\",\"$Lc\",null,{}],false]\n8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])self.__next_f.push([1,"6:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"NextChat\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Your personal ChatGPT Chat Bot.\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#fafafa\"}],[\"$\",\"meta\",\"4\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#151515\"}],[\"$\",\"meta\",\"5\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"NextChat\"}],[\"$\",\"meta\",\"8\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}]]\n"])
```
None of the other end points I tested work, including https://gpt.nextapi.fun/api/proxy
**Deployment**
Native App: v2.10.1
**Desktop**
- OS: MacOS Sonoma 14.2.1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.