Sends a chat request to the OpenAI API.
This function first calculates the number of tokens in the request and determines the appropriate GPT model to use based on the token count.
If the request is too large, the function will exit and prompt the user to try again with a smaller request.
If the request is within the acceptable token range, the function will send the request to the OpenAI API using the selected GPT model.
The function then counts the tokens in the response and returns the response.
Exits the process if the request is too large.
Sends a chat request to the OpenAI API. This function first calculates the number of tokens in the request and determines the appropriate GPT model to use based on the token count. If the request is too large, the function will exit and prompt the user to try again with a smaller request. If the request is within the acceptable token range, the function will send the request to the OpenAI API using the selected GPT model. The function then counts the tokens in the response and returns the response. Exits the process if the request is too large.