microsoft / data-formulator

🪄 Create rich visualizations with AI
https://arxiv.org/abs/2408.16119
MIT License
168 stars 12 forks source link

Trouble adding the OpenAI API key #34

Open Vivan-AK opened 5 days ago

Vivan-AK commented 5 days ago

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 commented 5 days ago

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 commented 4 days ago

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 commented 4 days ago

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 commented 3 days ago

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 commented 3 days ago

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