-
Notifications
You must be signed in to change notification settings - Fork 939
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
"warning":"This model version is deprecated. Migrate before January 4, 2024 #208
Comments
The same here This is definitely a bug.
As you can see, the data comes in two parts: each new chunk contains the end of the previous one and the beginning of the current one. And of course, this can't be parsed with a simple JSON.parse(). Before, chunks came entirely, for example:
Is anyone working on this? |
It seems completion is deprecated, and they recommend using chat completion. If you change the code to use you will get an error that the model does not exist. You can check that by calling the What I did was change the However, I have to change a little bit the code that processes the response in my project. This is the only workaround that I was able to make it work. |
@and-zverev @kevinccbsg thanks for the responses and confirming same - beyond just changing the model, for me see that the TPM is vastly reduced from 150K to 40K. I assume that can be increased on request. I also note that gpt-3.5-turbo is not the equivalent model of text-davinci-003 as shown here: Changing to createChatCompletion, using the instruct model: (which as you show requires a change to use messages in the fucntion call object)
Why depreciate something before the declared replacement is broadly available? The docs at the moment also show that it is still available : I get things have to change, and that fantastic to see progress, but breaking changes need hard changes to instructions. All of the document examples are still showing the depreciated models - someone needs to think about version details on those pages to remove all doubts on what will work. From how I now see it, there will be no instruct specific models, just gpt-3.5 turbo variants using chat completions. The cost of these models does appear cheaper than the older davinci ones, but I'm unsure at the moment if the new structure simply uses more tokens on both sides to increase the use and therefore cost. Cheers |
Hey @kevinccbsg |
This is not an SDK bug, but I am sorry about the frustration caused by this API change. As the deprecation page mentions:
The streaming chunks being broken that @and-zverev mentions here does look like a possible bug, I'll take that back to the team for discussion. |
@rattrayalex the Warning message I suspect is the cause here, as you would be pushing chunks out into the stream at a consistent buffer size, and previously the serialised object would have easily fit the chunk size. Given that we're supposed to move to createChatCompletion instead, which model is the correct choice to replace text-davinci-003 at the moment? I'd really like to change this out now if possible. Many thanks |
For chat completions, |
Sorry about the trouble here all – the (pre-V4) versions of this SDK never supported streaming natively, so unfortunately we were force to just publish a workaround on github issues: But the workaround is naive and clearly breaks when the buffer size is too large, sorry about that. If you wish to continue using the v3 SDK, this solution might work better for you: #18 (comment) All that said, I encourage you to check out our v4 beta SDK, which @rattrayalex and team have been working – it has native streaming support and will become the official package version within the next week or two: #182 |
Just to clarify David's comment a bit, you can use const OpenAI = require("openai");
const openAI = new OpenAI();
async function main() {
const stream = await openAI.completions.create({
model: "text-davinci-003",
prompt: "hello",
stream: true,
});
for await (const part of stream) {
console.log(part);
}
}
main(); This streaming implementation does not choke on the If you use the v4, this warning should not break your code, and you have until January to migrate off of text-davinci-003. |
Describe the bug
Im using v3.3.0 attempting to make a call with text-davinci-003
I get this sort of return: {"warning":"This model version is deprecated. Migrate before January 4, 2024 to avoid disruption of service. Learn more https://platform.openai.com/docs/deprecations"......
I go to my account and try then use - gpt-3.5-turbo-instruct for the model, and promptly get a response of Model does not exist.
The information provided in the blog posts, says this is a drop in replacement. I'm kinda stuck, and I don't believe an API call should return a warning as the object and a 200 response.
To Reproduce
Code snippets
The text was updated successfully, but these errors were encountered: