chatgpt-clone icon indicating copy to clipboard operation
chatgpt-clone copied to clipboard

list index out of range None

Open Raccoon254 opened this issue 2 years ago • 10 comments
trafficstars

The Error in the CLI is .... image

The opened Port Results are.... image

Platform Windows

Raccoon254 avatar Apr 26 '23 22:04 Raccoon254

same

amihos avatar Apr 26 '23 23:04 amihos

Trying to fix it

Raccoon254 avatar Apr 26 '23 23:04 Raccoon254

you didn't add your OpenAI API to config.json

revbin avatar Apr 27 '23 01:04 revbin

您没有将 OpenAI API 添加到 config.json

how

ZexiChen502 avatar Apr 27 '23 03:04 ZexiChen502

Facing the same issue. (I've added my OpenAI API key).

pz1971 avatar Apr 27 '23 04:04 pz1971

you didn't add your OpenAI API to config.json

I've added my OpenAI API key too(form the "platform.openai.com/account/api-keys:+Create new secret key" to "the local/chatgpt-clone-main/config.json: openai_key:" ) . I still encounter this bug, and I'm not sure if it's necessary to add an api, because it's not in the author's tutorial

ZexiChen502 avatar Apr 27 '23 04:04 ZexiChen502

Hi

you must use your own OpenAI API key , be sure also to use the correct OpenAi Model.

if you dont have access to GPT-4 so select GPT-3.5 model and it work .

i got the same error when i installed the script without API key and used the GPT-4 Model which i dont have access yet .

so the solution which worked for me .: -Add your API Key to config.json -clear your web browser cache -restart the server -choose the right OpenAI model you have access to.

regards

revbin avatar Apr 27 '23 14:04 revbin

I tried all the suggested solutions (verified API key is correct, proxy set to false) and still get no response and console shows this for every request:

127.0.0.1 - - [01/May/2023 20:03:45] "POST /backend-api/v2/conversation HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET / HTTP/1.1" 302 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET /chat HTTP/1.1" 308 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET /chat/ HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET /assets/js/highlight.min.js HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET /assets/js/icons.js HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET /assets/js/highlightjs-copy.min.js HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET /assets/css/style.css HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:04:50] "GET /assets/js/chat.js HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:05:08] "GET /assets/img/site.webmanifest HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:05:08] "GET /assets/img/favicon-32x32.png HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:05:50] "GET /assets/img/user.png HTTP/1.1" 200 - 127.0.0.1 - - [01/May/2023 20:05:50] "GET /assets/img/gpt.png HTTP/1.1" 200 - list index out of range None list index out of range None list index out of range None list index out of range None list index out of range None list index out of range None list index out of range None list index out of range None 127.0.0.1 - - [01/May/2023 20:05:52] "POST /backend-api/v2/conversation HTTP/1.1" 200 -

neildmd avatar May 01 '23 23:05 neildmd

I added an additional log to ./server/backend.py after gpt_resp initialization

print(gpt_resp.text)

And I got an error response with the message "You exceeded your current quota, please check your plan and billing details." I suggest that you look at your log in the same way.

Possible solution: Setup your paid plan

sA1mon avatar May 06 '23 10:05 sA1mon

UI is giving correct output, but CLI still log this:

"list index out of range
None" * n

Expecting value: line 1 column 2 (char 1)
<traceback object at 0x7feb6f4d6640>
list index out of range
None

Originalimoc avatar Jul 21 '23 03:07 Originalimoc