microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
21.36k stars 3.14k forks source link

use OpenAI's gpt-3.5-turbo model, an Http request error 404 #942

Closed joisonwk closed 1 year ago

joisonwk commented 1 year ago

When I use OpenAI's gpt-3.5-turbo model, an 404 error will be reported.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Skills' Directory
  2. When I selected the gpt-3.5-turbo AI ENDPOINTS,and then Click to run any Function. Error: InvalidRequest: The request is not valid, HTTP status: 404.

The following is the log of two different model executions, one error and one normal work Terminal Output

AI Provider: OpenAI Model: gpt-3.5-turbo Execute: WriterSkill.Acronym Parameters: input: Organization to protect the freedom and security of its member countries in North America and Europe.

Prompt: Generate a suitable acronym pair for the concept. Creativity is encouraged, including obscure references. The uppercase letters in the acronym expansion must agree with the letters of the acronym

Q: A technology for detecting moving objects, their distance and velocity using radio waves.
A: R.A.D.A.R: RAdio Detection And Ranging.

Q: A weapon that uses high voltage electricity to incapacitate the target A. T.A.S.E.R: Thomas A. Swift’s Electric Rifle

Q: Equipment that lets a diver breathe underwater A: S.C.U.B.A: Self Contained Underwater Breathing Apparatus.

Q: Reminder not to complicated subject matter. A. K.I.S.S: Keep It Simple Stupid

Q: A national organization for investment in space travel, rockets, space ships, space exploration A. N.A.S.A: National Aeronautics Space Administration

Q: Agreement that governs trade among North American countries. A: N.A.F.T.A: North American Free Trade Agreement.

Q: Organization to protect the freedom and security of its member countries in North America and Europe. A: N.A.T.O: North Atlantic Treaty Organization.

Q:Organization to protect the freedom and security of its member countries in North America and Europe.

fail: Microsoft.SemanticKernel.IKernel[0] Something went wrong while rendering the semantic function or while executing the text completion. Function: WriterSkill.Acronym. Error: InvalidRequest: The request is not valid, HTTP status: 404. Details: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions? Status: 404 (Not Found)

  Content:
  {

"error": { "message": "This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?", "type": "invalid_request_error", "param": "model", "code": null } }

  Headers:
  Date: Thu, 11 May 2023 08:02:40 GMT
  Connection: keep-alive
  Access-Control-Allow-Origin: REDACTED
  openai-organization: REDACTED
  openai-processing-ms: REDACTED
  openai-version: REDACTED
  Strict-Transport-Security: REDACTED
  x-ratelimit-limit-requests: REDACTED
  x-ratelimit-limit-tokens: REDACTED
  x-ratelimit-remaining-requests: REDACTED
  x-ratelimit-remaining-tokens: REDACTED
  x-ratelimit-reset-requests: REDACTED
  x-ratelimit-reset-tokens: REDACTED
  X-Request-ID: REDACTED
  CF-Cache-Status: REDACTED
  Server: cloudflare
  CF-RAY: REDACTED
  Alt-Svc: REDACTED
  Content-Type: application/json
  Content-Length: 227

  Microsoft.SemanticKernel.AI.AIException: InvalidRequest: The request is not valid, HTTP status: 404
     at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
     at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalCompleteTextAsync(String text, CompleteRequestSettings requestSettings, CancellationToken cancellationToken)
     at Microsoft.SemanticKernel.Orchestration.SKFunction.<>c__DisplayClass18_0.<<FromSemanticConfig>g__LocalFunc|0>d.MoveNext()

fail: Microsoft.SemanticKernel.IKernel[0] Function call fail during pipeline step 0: WriterSkill.Acronym. Error: InvalidRequest: The request is not valid, HTTP status: 404 Result: Organization to protect the freedom and security of its member countries in North America and Europe.

Tokens: Input tokens: 265 Output tokens: 17 Total: 282

========== Function execution was finished. ==========

AI Provider: OpenAI Model: text-davinci-003 Execute: WriterSkill.Acronym Parameters: input: Agreement that governs trade among North American countries.

Prompt: Generate a suitable acronym pair for the concept. Creativity is encouraged, including obscure references. The uppercase letters in the acronym expansion must agree with the letters of the acronym

Q: A technology for detecting moving objects, their distance and velocity using radio waves.
A: R.A.D.A.R: RAdio Detection And Ranging.

Q: A weapon that uses high voltage electricity to incapacitate the target A. T.A.S.E.R: Thomas A. Swift’s Electric Rifle

Q: Equipment that lets a diver breathe underwater A: S.C.U.B.A: Self Contained Underwater Breathing Apparatus.

Q: Reminder not to complicated subject matter. A. K.I.S.S: Keep It Simple Stupid

Q: A national organization for investment in space travel, rockets, space ships, space exploration A. N.A.S.A: National Aeronautics Space Administration

Q: Agreement that governs trade among North American countries. A: N.A.F.T.A: North American Free Trade Agreement.

Q: Organization to protect the freedom and security of its member countries in North America and Europe. A: N.A.T.O: North Atlantic Treaty Organization.

Q:Agreement that governs trade among North American countries.

Result: A: C.A.F.T.A: Central American Free Trade Agreement.

Tokens: Input tokens: 306 Output tokens: 19 Total: 325

========== Function execution was finished. ==========

evchaki commented 1 year ago

@joisonwk , thanks for using the VS Code Extension to do prompt engineering. Please make sure you update to the latest version of the extension. Turbo chat completions are not supported currently for this. But we are working on it.

feiyun0112 commented 1 year ago

you use wrong model

Details: This is a chat model and not supported in the v1/completions endpoint.

you should use text-davinci-003 for TextCompletionService

650

craigomatic commented 1 year ago

@joisonwk were you able to get unblocked?

lemillermicrosoft commented 1 year ago

I tried this locally, no longer repros. Please re-open if still having issues.