The video on using the ChatGPT API showed returning the token count using this line of code:
token_dict = {‘prompt_tokens’:response[‘usage’][‘prompt_tokens’],
‘completion_tokens’:response[‘usage’][‘completion_tokens’],
‘total_tokens’:response[‘usage’][‘total_tokens’],}
Am I right in thinking that ['prompt_tokens], [‘completion_tokens’] and [‘total_tokens’] are defined within the GPT API?