This also solves the issue where we would request more tokens, than the model is capable of (over 4096)
also document the toOpenAIMssages.ts file