Skip to content

[Bug] Inputting OpenAI API key throws weird error #1900

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

Closed
1 task done
nate235 opened this issue May 17, 2024 · 6 comments
Closed
1 task done

[Bug] Inputting OpenAI API key throws weird error #1900

nate235 opened this issue May 17, 2024 · 6 comments
Assignees
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version

Comments

@nate235
Copy link

nate235 commented May 17, 2024

Is there an existing issue for this?

  • Yes, I have searched the existing issues and none of them match my problem.

Product Variant

Self-Hosted

Current Behavior

Inputting the API key into the relevant field throws an error, I assume, as API Key turns red and random red character appear below the input field "WtwH+r" (???) . This then triggers another error, I've never seen before triggers, saying chrome is unreachable (screenshotted). App behaves as expected beyond this. Took a long time to get RxV4 working so bummer to now deal with this when I get access to OpenAI.

Expected Behavior

Entering the OpenAI API key works as suggested by the app.

Steps To Reproduce

No response

What browsers are you seeing the problem on?

Firefox

What template are you using?

Azurill

Anything else?

api
chrome

Chrome log:

chromelog

@nate235 nate235 added bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version labels May 17, 2024
@nate235 nate235 changed the title [Bug] Inputting OpenAI API key through weird error [Bug] Inputting OpenAI API key throws weird error May 17, 2024
@pelicangris
Copy link

Hi,
I have a similar issue where i can not store my OpenAI Key:
image

I am using the latest version of rxresume which is self hosted using docker.

@hnk
Copy link

hnk commented Jun 2, 2024

I was running into this issue myself but believe to have found the root cause:

OpenAI is replacing user API keys with project API keys:
openai_user_api_keys

User API keys follow the format sk-xxxx... whereas Project API keys are formatted sk-proj-xxxx....

My guess is that the validator for the input field does not accept that new format. When I paste a user API key into that field, it works as expected.

I expect the form validation to fail, because the regex check fails in /dashboard/settings/_sections
/openai.tsx
.

@lgwapnitsky
Copy link

this is occurring on the publicly hosted version as well

@IXEguy
Copy link

IXEguy commented Jun 3, 2024

Confirmed that this is only happening with the new proj type keys @hnk mentioned above.

I generated a legacy key and I no longer get the WtwH+r error when I click on the Store Locally button.

@JackTheTripperr
Copy link

A quick visual guide for users trying to solve this issue:

  1. Log into platform.openai.com and click on "API Keys" in the menu on the lefthand side of the screen.

00

  1. In the top right corner of the screen, click "View User API Keys"

01

  1. Click on "Create New Secret Key"

02

  1. Name your key and click "Create secret key"

03

  1. Click on "Copy" (you need to copy this key right now, you won't been shown it again) and input this key in the settings of Reactive Resume. You'll know you are using the correct key because it will start with "sk-xxxx" instead of sk-proj-xxxx"

04

  1. The error should no longer be present when entering the key.

AmruthPillai added a commit that referenced this issue Jun 10, 2024
…api-key-throws-weird-error

#1900 - bug inputting openai api key throws weird error
@ChristopheAwad
Copy link

I think this may need to be reopened, as OpenAI no longer allows the creation of user API Keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version
Projects
None yet
Development

No branches or pull requests

8 participants