openai-cookbook icon indicating copy to clipboard operation
openai-cookbook copied to clipboard

nextjs-with-flask-server: Error when asking a question ( TypeError: Cannot read properties of undefined (reading 'toLowerCase'))

Open Travis-Barton opened this issue 2 years ago • 3 comments

Uploaded two txts and asked a simple question and got this.

Screen Shot 2023-02-17 at 4 15 01 PM

Travis-Barton avatar Feb 18 '23 00:02 Travis-Barton

I am getting a similar error Screenshot 2023-02-18 at 18 21 50

seanbetts avatar Feb 18 '23 18:02 seanbetts

You are most likely hitting the maximum context length. https://platform.openai.com/docs/models/gpt-3

This model's maximum context length is 4097 tokens, however you requested 4231 tokens (3231 in your prompt; 1000 for the completion). Please reduce your prompt; or completion length.

mithatcak avatar Feb 22 '23 05:02 mithatcak

FYI @isafulf

ted-at-openai avatar Feb 22 '23 17:02 ted-at-openai