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

[Bug]: #1000

Open
bhagatsameer opened this issue Jun 5, 2024 · 10 comments
Open

[Bug]: #1000

bhagatsameer opened this issue Jun 5, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@bhagatsameer
Copy link

Version

VisualStudio Code extension

Operating System

Ubuntu Linux

What happened?

Since the new update yesterday 0.2.3 we are getting below error. Even though the OpenAPI key is correctly updated in the config.json file, Pythagora is giving below error.

API check for openai failed with: [BricksLLM] key sk-bk********************************************** has been revoked
API check for openai failed with: [BricksLLM] key sk-bk********************************************** has been revoked
Pythagora cannot start because the LLM API is not reachable.

If i run python3 main.py on Terminal it works properly.

@bhagatsameer bhagatsameer added the bug Something isn't working label Jun 5, 2024
@senko
Copy link
Collaborator

senko commented Jun 6, 2024

Sounds like the VSCode extension didn't pick up the fact that you're using your own key, and tries to use the (expired) trial key. You can verify if that's the case by going to Settings and checking whether it days "You're using your own key".

If you haven't already, try closing vscode completely and restarting it, which should force the extension to re-check this. Please let me know if that works around the issue for you.

@EyeSeeThru
Copy link

I am having the same problem. Closing and re-opening VS Code did not resolve it, nor did disabling and enabling the extension again.

@senko
Copy link
Collaborator

senko commented Jun 6, 2024

@EyeSeeThru thanks for confirming. When you go to Pythagora Settings panel, does it say "You're using your own key" or "Your free trial has expired" ?

@EyeSeeThru
Copy link

EyeSeeThru commented Jun 6, 2024

Said expired, but I found info in the Discord that actually explains that there is a new config.json file replacing the .env file.
Had to go in there and re-enter my API stuff, so it has changed to say I am using my own API Keys. It has now successfully started a new project and is in the planning phase.

Should update the info at: https://github.com/Pythagora-io/gpt-pilot/wiki/Using-GPT%E2%80%90Pilot-with-Local-LLMs#local-llm-routers

@senko
Copy link
Collaborator

senko commented Jun 6, 2024

Should update the info at: https://github.com/Pythagora-io/gpt-pilot/wiki/Using-GPT%E2%80%90Pilot-with-Local-LLMs#local-llm-routers

Good callout, updated, with some extra info on how to tweak the prompts (we've made it easier now).

@livingstonlarus
Copy link

@livingstonlarus
Copy link

Also you may give more details, like:

At the top of config.json, you'll find:

{
  "llm": {
    "openai": {
      "base_url": null,
      "api_key": null,
      "connect_timeout": 60.0,
      "read_timeout": 10.0
    }
  },

For base_url, replace null with https://api.openai.com/v1

And for api_key, replace null with your own API key that you can create at https://platform.openai.com/api-keys

@senko
Copy link
Collaborator

senko commented Jun 6, 2024

@livingstonlarus 👍 thanks for the prod, I dropped the ball on that one too; updated

@Jim-Kay
Copy link

Jim-Kay commented Jun 16, 2024

I ran into a similar issue where my OpenAI key wasn't being recognized. I removed the helpful comments that were in the config.json file, and then everything worked.

@quloos
Copy link

quloos commented Jun 25, 2024

I ran into a similar issue where my OpenAI key wasn't being recognized. I removed the helpful comments that were in the config.json file, and then everything worked.

Your answer saved me! THX

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

No branches or pull requests

6 participants