I am using gpt4o from the API and getting the following errors:
400 The input token count (1005272) exceeds the maximum number of tokens allowed (1000000)
However with tiktoken I get that my input is 8652 token.
And in anycase the context window for gpt4o is 128k so how does the number shown in the error message as the input limit (1000000) make sense?
I ran the gpt-4o alias up to 8000+ tokens by chat.
No errors.
You’re not attempting to send images the incorrect way, are you? You’re talking about OpenAI?
This is what is returned when exceeding the input context length of gpt-4o right now with more:
HTTP error 400: {
“error”: {
“message”: “This model’s maximum context length is 128000 tokens. However, your messages resulted in 200073 tokens. Please reduce the length of the messages.”,
You could have discovered a fluke in OpenAI shuffling things around on the API, just in case one were to want to send 0.953 MiToken to an AI model in the near future…but you show a completely different style of message.