carlrobertoh / CodeGPT

The leading open-source AI copilot for JetBrains. Connect to any model in any environment, and customize your coding experience in any way you like.
https://codegpt.ee
Apache License 2.0
1.11k stars 236 forks source link

Sending prompt before entering API key results in chat not working after entering the API key #416

Open Zoltesh opened 8 months ago

Zoltesh commented 8 months ago

What happened?

When I first open PyCharm, I click on an existing chat and send a prompt. It says I have to reenter my API key. After I reenter my API key, I click the regenerate button and CodeGPT responds to my prompt. However, after receiving that first response in my existing chat after having regenerated it, I cannot send any more prompts. The text remains in the textbox and will not send when I click the Send icon. In this scenario, I have to create a new chat to be able to use CodeGPT.

If I open PyCharm and go directly to the settings to reenter my API key BEFORE sending any prompts, the chats will work as intended. It's only when I try to continue a chat without first reentering my API key that I run into issues.

Relevant log output or stack trace

No response

Steps to reproduce

Using GPT-4 Turbo (Legacy)(128k) in PyCharm Professional 2023.3.4 Build PY-233.14475.56, built on February 25, 202 License for educational use only Django Project using virtual environment with Python 3.10

  1. Open PyCharm
  2. Send prompt in existing chat
  3. Told to go reenter API key to proceed
  4. After entering API key, regenerate the response and get a valid response
  5. Additional prompts won't send in this chat and thus won't receive a response
  6. Either start a new chat to fix OR restart PyCharm and enter the API key BEFORE sending any messages in a chat

CodeGPT version

2.5.1

Operating System

Windows

reneleonhardt commented 8 months ago

Can you reproduce the bug and post the stacktrace?