Can we manually control the thread lenght?

Is there a way to manually control the size of the thread? Besides creating a new one, I only need the most recent 5 messages. Having additional messages in the thread is both wasteful and reduces the accuracy of replies.

–jx

Try this: https://platform.openai.com/docs/api-reference/messages/listMessages#messages-listmessages-limit

Sorry, there is no control over the length of the threads. They will run the model up to the context limit of the model. OpenAI has made overtures of future changes or accountability, but nothing has changed since release.

Threads also cannot be recreated at a shorter length. OpenAI went out of their way to block placing assistant messages in threads.

Fortunately, you can’t see how many tokens are being consumed to estimate your costs, either.

1 Like