Find answers from the community

Updated 8 months ago

Hello. I'm trying to replicate the

Hello. I'm trying to replicate the simpledirectoryReader example and vectorstoreindex example (the paul graham essay one) with my openai api key. However, I get this error: BadRequestError: Error code: 400 - {'error': {'message': "This model's maximum context length is 8192 tokens, however you requested 16723 tokens (16723 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.", 'type': 'invalid_request_error', 'param': None, 'code': None}}. Do you know if there's a modification or something i need to do in open ai for it to run the vectorstoreinde
L
a
3 comments
I think this means you are embedding some very large text chunks

Do you have a copy of the code you ran?
Literally the code that's on the embeddings example. This one: https://docs.llamaindex.ai/en/stable/getting_started/starter_example/
I run that code nearly every day πŸ˜… never encountered an issue
Add a reply
Sign up and join the conversation on Discord