iterativecloud / jupyter-notebook-chatcompletion

Jupyter Notebook ChatCompletion is VSCode extension that brings the power of OpenAI's ChatCompletion API to your Jupyter Notebooks!
https://www.iterative.cloud/
MIT License
6 stars 2 forks source link

Request failed with status code 404 #6

Closed jabowery closed 1 year ago

jabowery commented 1 year ago

The text entered in the Markdown cell is exactly as in your example. Entry was with CTRL-SHIFT-ENTER.

image

AlexandreDeRiemaecker commented 1 year ago

Hi @jabowery, Thank you for reporting this!

I have a few questions:

  1. Does this always happen, no matter what you do? If it only happens under specific conditions, please attach the jupyter notebook to this issue so I can reproduce it.
  2. If you go to View -> Output -> Notebook ChatCompletion, what kind of output do you see?
  3. Which OS and VSCode version do you have?

By the way, the prompt in my example gif could be better. It was more of a lame attempt at being funny. I'll change that in a future update.

AlexandreDeRiemaecker commented 1 year ago

Apparently, the OpenAI API may return 404 if an unavailable model is set. I see two possibilities:

Otherwise, the 404 Not Found would be related to an incorrect URL, but that cannot be the case, as it works for me.

AlexandreDeRiemaecker commented 1 year ago

@jabowery

I found a potential explanation: missing access to GPT-4. By default, the model is set to GPT-4, and I forgot that not everybody can access it. So, unfortunately, most users that try out the extension will encounter that error. Sadly, I cannot test this behaviour because I have received access.

Could you please do me a favour and try with GPT-3.5-turbo (using "Set Model")?

If that's the issue, I'll consider changing the default to GPT-3.5-turbo. Or at least I'll make a first-time notice that GPT-4 is set by default.

AlexandreDeRiemaecker commented 1 year ago

I created a second account to check for the behaviour myself. It is certain to be tied to missing access to GPT-4.

Therefore, I'll soon introduce three changes:

  1. a new setting for the default mode, which is used when no model was set for a notebook
  2. a first-time message pointing out that GPT-4 is set as default and that this can be changed in the settings or via "Set Model" in the notebook
  3. an error message for HTTP 404 errors that points out that the OpenAI account in use might not have the desired model.

This issue is reclassified as an improvement instead of a bug.