Closed jschuur closed 1 year ago
➜ gpt chatgpt-repl
┌ Interact with ChatGPT (max tokens: 1024, history: 3, temp: 1, model: gpt-3.5-turbo)
│
◇ Prompt? (Ctrl-C or enter to exit)
│ write a javascript function to sum two arguments
│
│
◇ Response in 503ms. unknown
│
◆ Prompt? (Ctrl-C or enter to exit)
│ _
└
➜ gpt chatgpt-repl -v
ChatGPT REPL v0.0.8
➜ gpt
I used npm install as you suggested.
Okay i've updated nodejs, npm and everything else and now have v0.0.9 of chatgpt-repl.
However, the result is the same:
Response in 1.8s. unknown
I've changed the error capturing and rendering in 0.1.0. Could you update it and see what error you get now, @mmower?
Technically, issue #8 covers your problem. This one was about how error messages weren't being displayed, so I'll close this one based on 0.1.0's update.
The try/catch doesn't seem to show all non-401 status code errors. It hits the
catch
block, but ignore this part, leading to a confusing blank response when there's an issue with theopenai.createChatCompletion
payload.https://github.com/jschuur/chatgpt-repl/blob/8dd438a8b21057c83be80827c56d97c85cc9197e/src/openai.js#L98
Just doing
console.error(error)
at the top of the catch block shows the error though.