Hey Everyone, I have a question I hoppe someone can help me with!
I am creating my index with the following line:
Settings.llm = OpenAI(model="gpt-4-0125-preview", temperature=0.1)
Settings.embed_model = OpenAIEmbedding()
index = VectorStoreIndex(nodes=nodes)
So why am I getting the following error:
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': "This model's maximum context length is 8192 tokens, however you requested 11486 tokens (11486 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.", 'type': 'invalid_request_error', 'param': None, 'code': None}
When it is specified in the
OpenAI documentation that the
gpt-4-025-preview
has a context length of 128.000 tokens and not 8192 (which vanilla gpt-4 has)