Playground works (128k) but not API

I can access gpt-4-1106-preview via the Playground. And it does allow more than 8k input context window. But when I try using the same model via the API, it throws an error that I’m using more than 8k …

Anyone have the same problem?

Hi and welcome to the Developer Forum!

Can you please include a code snippet of your API call, thanks.

Do you want a trace of the HTTP request?
I’m using a Delphi OpenAI library to access the API … I could log the HTTP request if I modify code.

I see, I think there may be an issue in the Delphi API if that is the case, this is not an issue in the OpenAI built and maintained Python or Node.js libraries.

My guess is they have not updated it for GPT-4-Preview/Turbo or if they have they forgot to increase the max limit.

oh … I simply changed the model to “gpt-4-1106-preview”. But you bring up a good point about max tokens. So you think there is somewhere in the API where we specify input context max tokens?

Yes, that would be my guess. They build the API looking at the limits of the time and set that to 8k, but allowed an open model name for futureproofing.

OK It’s working now. I updated the API library code to support Tools. But I think it was a simpler error where the model name that was being sent wasn’t correct.

happy to work with 128k!

1 Like