Tokenize the completion request using the tokenization endpoint.
If the request fits then go to step #4.
If the request does not fit, reduce the number of messages or message sizes then repeat step #1.
Send the request to the chat completion endpoint.
The truncation endpoint aids in managing history size by allowing for the discarding of old messages.