Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'status') #85

Closed
AchuAshwath opened this issue Nov 16, 2023 · 2 comments · Fixed by #86
Closed

TypeError: Cannot read properties of undefined (reading 'status') #85

AchuAshwath opened this issue Nov 16, 2023 · 2 comments · Fixed by #86
Labels
bug Something isn't working

Comments

@AchuAshwath
Copy link

C:>tgpt chat

**************** Welcome to terminalGPT ****************

 __

<(o )___
( ._> /
`---'

usage:
TerminalGPT will ask you to add your OpenAI API key. Don't worry, it will be saved on your machine locally.

Terminal will prompt you to enter a message. Type your message and press enter.
Terminal will then prompt you to enter a response. Type your response and press enter.

To exit, type "exit" and press enter.

# Commands

√ You: ... hi
Something went wrong!! TypeError: Cannot read properties of undefined (reading 'status')
? Try again? » - Use arrow-keys. Return to submit.

Yes
No - exit

@AchuAshwath AchuAshwath added the bug Something isn't working label Nov 16, 2023
@1llyaa
Copy link

1llyaa commented Nov 21, 2023

I get same error message

@jucasoliveira
Copy link
Owner

I'll need to seek further investigation on this error.

as of 21/11/2023 I've notice this error using npx .

Ive verified I also have the library installed on my local machine and using an old api key.

After removing the package and using npx again it prompt the API key

After adding a new key the package worked as expected:

npx terminalgpt chat

  **************** Welcome to terminalGPT ****************

     __
<(o )___
 ( ._> /
  `---'

  usage:
    TerminalGPT will ask you to add your OpenAI API key. Don't worry, it will be saved on your machine locally.

    Terminal will prompt you to enter a message. Type your message and press enter.
    Terminal will then prompt you to enter a response. Type your response and press enter.

    To exit, type "exit" and press enter.

    # Commands


✔ Enter your OpenAI API key: … ***************************************************
✔ You:  … Hello
GPT:
Hello! How can I assist you today? If you have any questions or need help with something, feel free to ask.
? You:  ›

I've also did with tgpt command and it worked as well:

tgpt chat --markdown

  **************** Welcome to terminalGPT ****************

     __
<(o )___
 ( ._> /
  `---'

  usage:
    TerminalGPT will ask you to add your OpenAI API key. Don't worry, it will be saved on your machine locally.

    Terminal will prompt you to enter a message. Type your message and press enter.
    Terminal will then prompt you to enter a response. Type your response and press enter.

    To exit, type "exit" and press enter.

    # Commands


✔ Enter your OpenAI API key: … ***************************************************
✔ You:  … hello
GPT:
Hello! How can I assist you today? If you have any questions or need support with something, feel free to ask.


? You:  ›

The troubleshooting I have for now is to uninstall the application:

npm uninstall -g terminalgpt

install it again and add a new api key.

Further needed:

tgpt delete is not removing the api key, so I'll leave this issue open to solve that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants