semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

"InvalidRequest: The request is not valid, HTTP status: 400" When running Jupiter notebooks

Open mkulisic opened this issue 1 year ago • 1 comments

Describe the bug I am trying to get started using sematic kernel but I keep running into the same exception "InvalidRequest: The request is not valid, HTTP status: 400" when running the "00-getting-started.ipynb" notebook for dotnet.

To Reproduce Steps to reproduce the behavior:

  1. Created a azure openai instance and deployed a model called gpt-4
  2. Installed .Net 7 and polyglot as stated by the notebook 00-getting-started.ipynb
  3. Edited the config/settings.json file to contain my endpoint, model name and key: image
  4. Changed step 2 to use AzureOpenAi image
  5. Changed the service id in step 3 (unclear if this matters) image
  6. Ran the code

Expected behavior I would expect this to return an answer using the "Joke" skill the notebook uses, but instead I get an exception.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 11
  • IDE: Visual studio code
  • NuGet Package Version: Microsoft.SemanticKernel, 0.12.207.1-preview"

Additional context I got the same error when I attempted to configure the visual studio code extension as stated in the documentation.

mkulisic avatar Apr 25 '23 22:04 mkulisic

I am facing similar issue. The error that I got -

The chatCompletion operation does not work with the specified model, text-davinci-003. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993. Status: 400 (Bad Request) ErrorCode: OperationNotSupported

ankiga-MSFT avatar Apr 26 '23 17:04 ankiga-MSFT

@ankiga-MSFT You may be running into a different problem than me. I just tested with "text-davinci-003" and with this model I can actually get this to work. Most likely the schema has changed for gpt4 and that is why I couldn't get it to work before. I'll be closing this issue.

mkulisic avatar Apr 26 '23 18:04 mkulisic

I am getting the same issue with gpt-35-turbo

anandaganesh84 avatar Sep 11 '23 22:09 anandaganesh84