token_left

token_left(input: str | list | dict, model='gpt-3.5-turbo-0613') -> int

Count number of tokens left for an OpenAI model.

Parameters:
NameDescription
input(str, list, dict): Input to the model.

Type: str | list | dict
model='gpt-3.5-turbo-0613'
Returns:
TypeDescription
intint: Number of tokens left that the model can use for completion.