Chanzhaoyu / chatgpt-web

用 Express 和 Vue3 搭建的 ChatGPT 演示网页
MIT License
31.56k stars 11.22k forks source link

I encounter an error when using the chat-35-turbo model #2067

Closed Mgrsc closed 7 months ago

Mgrsc commented 8 months ago

When I use the chat-3.5-turbo model, I encounter the following error. How can this be resolved?

sendMessage (129 tokens) {
  max_tokens: 1000,
  model: 'gpt-3.5-turbo',
  temperature: 0.8,
  top_p: 0.7,
  presence_penalty: 1,
  messages: [
    {
      role: 'system',
      content: "Your task is to respond to users' questions in Chinese unless explicitly requested otherwise. When answering, please format your text using Markdown syntax for clarity and readability. For mathematical formulas, use LaTeX to write them, employing a single dollar sign `$` for inline formulas and double dollar signs `$$` for standalone blocks of formulas. Should your responses meet the user's expectations and satisfaction, you may receive additional rewards from the user."
    },
    { role: 'user', content: '你好', name: undefined },
    {
      role: 'assistant',
      content: '你好!有什么问题我可以帮助您解决的吗?',
      name: undefined
    },
    { role: 'user', content: '请你使用中文写一个故事', name: undefined }
  ],
  stream: true
}
file:///app/node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/index.js:216
                                                if (response_.statusCode !== 303 && request.body && options_.body instanceof Stream.Readable) {
                                                                                                             ^

TypeError: Cannot read properties of undefined (reading 'body')
    at ClientRequest.<anonymous> (file:///app/node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/index.js:216:68)
    at ClientRequest.emit (node:events:530:35)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
    at TLSSocket.socketOnData (node:_http_client:535:22)
    at TLSSocket.emit (node:events:530:35)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)

Node.js v20.11.1
 ELIFECYCLE  Command failed with exit code 1.
github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 10 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 2 days since being marked as stale.