I'm sending a long text to the AI analyze and resume, when testing on the chat.openai interface it works well, but when testing executing in code, it shows that error:
data: {
error: {
message: "This model's maximum context length is 4097 tokens, however you requested 15845 tokens (1845 in your prompt; 14000 for the completion). Please reduce your prompt; or completion length.",
type: 'invalid_request_error',
param: null,
code: null
}
that's my configuration:
const response = await openai.createCompletion({
model: "text-davinci-003",
prompt: "resume the following youtube video text transcription: " + prompt,
max_tokens: 14000,
temperature: 0.7,
});
why is that wrong? does chat.openai use different configuration? if so, what configuration?