michaelthwan / searchGPT

Grounded search engine (i.e. with source reference) based on LLM / ChatGPT / OpenAI API. It supports web search, file content search etc.
MIT License
600 stars 62 forks source link

Get bug here #92

Open gongyuanze111 opened 7 months ago

gongyuanze111 commented 7 months ago

I noticed that when I search for "In-situ Flow Information Telemetry", I will encounter an error written below:

openai.error.InvalidRequestError: This model's maximum context length is 8192 tokens, however you requested 12301 tokens (12301 in your prompt; 0 for the completion). Please reduce your prompt; or completion length. sp20231219_112132_778 the same thing happened when I run it locally. Please check your text length limit to see if the restriction you define don't meet with the token length limit.

gongyuanze111 commented 7 months ago

I think that the chunk you set is 1000, and the sentences length you require is larger than 8. that means that the text chunk you send to openai is possible to cause that problem, since it is larger than 8000.