computeContextLength
Computes the context length for a given prompt and language model. This may involve calculating the number of tokens used in the prompt and determining if it fits within the model's context length constraints.
Return
The context length as a Long, indicating the number of tokens used in the prompt, or null
if it cannot be calculated.