chatgpt-web-dev / chatgpt-web

A third-party ChatGPT Web UI page built with Express and Vue3, through the official OpenAI completion API. / 用 Express 和 Vue3 搭建的第三方 ChatGPT 前端页面, 基于 OpenAI 官方 completion API.
https://chatgpt-web.dev
MIT License
1.61k stars 441 forks source link

BUG: 最新版本(v2.13.8) 使用gpt-4-32k模型报错 #397

Open liuchao0807 opened 8 months ago

liuchao0807 commented 8 months ago

报错内容如下: ChatGPT error 400: {"error":{"message":"This model's maximum context length is 8192 tokens. However, you requested 8231 tokens (39 in the messages, 8192 in the completion). Please reduce the length of the messages or completion. (request id: 2023123109520868656415911VYDkgd) (request id: 20231231095208677010269ns8m5oMC)","type":"invalid_request_error","param":"","code":null}}

  1. 确认没有太长的提示词,也没有历史聊天记录,第一句话就报这个错。
  2. 其他模型正常,包括长度更小的gpt-4模型
  3. 在其他项目(ChatGPT-Next-Web),使用同一个key,同一个模型,可以正常使用
liuchao0807 commented 8 months ago

好像还不是必现,今天试了下又可以了...

Kerwin1202 commented 8 months ago

以前我自己也遇到过一两次,后面我找空再分析下代码