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

Trouble adding the OpenAI API key #34

Open
Vivan-AK opened this issue Oct 16, 2024 · 8 comments
Open

Trouble adding the OpenAI API key #34

Vivan-AK opened this issue Oct 16, 2024 · 8 comments

Comments

@Vivan-AK
Copy link

Image

I'm having trouble adding the OpenAI API key. It's showing a warning sign. Can you help me fix this?

Thanks in Advance

@Chenglong-MS
Copy link
Collaborator

I suspect the issue is that gpt-4o somehow is not accessible with your OpenAI API key.

How about trying:

  1. try a different model, e.g., gpt-4o-mini, gpt-3.5-turbo to check if it works
  2. Take a look at the backend command line message, if the model is not avaiable, something like this will appear (in this example I mistyped the model name to gpt-35-turbo so it is not available...)

Image

@Vivan-AK
Copy link
Author

I have reviewed all the models, including the 3.5 turbo, 4, and 4.0 versions. Additionally, I attempted to resolve the issue on a PC by installing the software locally, but the problem persisted there as well.

Thanks

@Chenglong-MS
Copy link
Collaborator

Interesting! Wondering if there is any error message popping up in the console where you launch data formulator on PC (like the one I posted above)?

At the mean time, I'll work out a patch to display error messages in the website to make it easier to identify issues. Thanks!

@Vivan-AK
Copy link
Author

When I enter the API key, only a warning sign appears (image attached in first post), and no error message is displayed. Upon beginning work, it says no models are associated with this account.

@Chenglong-MS
Copy link
Collaborator

Please try out the new version, which displays error messages in the user interface. You can install the new version (0.1.3) with the following command (or using pip install data-formulator --upgrade)

pip install data-formulator==0.1.3

For example, an openai key related errors will be displayed in this way:

Image

@Vivan-AK
Copy link
Author

Image
I upgraded data formulator but still problem persist.

Again I tried all the model 3.5 turbo, 4 & 4o but no luck

I don't have azure openai access

Image

@Chenglong-MS
Copy link
Collaborator

This looks like an OpenAI model name issue!

You can use the following command to list models available to your openAI key (based on https://platform.openai.com/docs/api-reference/models/list)

curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY"

And then find a model exist with your key and type it into the Model field. :)

@obed-espina
Copy link

I had a similar issue where it only showed the warning symbol. Once I went back to the Codespace VS Code, I looked at the "View Creation Log" to see that my error was a quota/billing issue. Once I fixed that on the OpenAI side, it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants