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

Deprecation Error: Update Required for text-davinci-003 Model in OpenAI API Call #1

Open
sreeharsha-rav opened this issue Aug 8, 2024 · 0 comments

Comments

@sreeharsha-rav
Copy link

sreeharsha-rav commented Aug 8, 2024

Issue Description

Summary

The task execution failed with an error when trying to create a completion using the OpenAI API.

Deno Version: 1.45.4

Steps to Reproduce

  1. Run the following command:
    deno task start
  2. The task tries to create a completion with the following parameters:
    {
      "model": "text-davinci-003",
      "prompt": "Write a haiku about the weather.",
      "temperature": 0,
      "maxTokens": 50
    }

Expected Result

Something like this:

{
  id: "cmpl-6uoXafOpP0Iu54UshgZPyMwOFtXjE",
  object: "text_completion",
  created: 1678998666,
  model: "text-davinci-003",
  choices: [
    {
      text: "\n\nSunny day, so bright\nA gentle breeze, so light\nA perfect summer day",
      index: 0,
      logprobs: null,
      finish_reason: "stop"
    }
  ],
  usage: { prompt_tokens: 8, completion_tokens: 20, total_tokens: 28 }
}

Actual Result

An error occurred with the following message:

{
  "error": {
    "message": "The model `text-davinci-003` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
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

1 participant