Trying to develop a personalised sentiment analyser with API calls

Hello community! so… I’m a newbie at this and do not have a full knowledge of how things really work when im making requests from my scripts to the API.

At the moment, I am trying to create a sentiment analyser which takes into consideration specific things i am specifying in a prompt. It seems to work pretty well but when i want to escalate the analysis to say… 100 excel cells with pretty short texts (they’re reviews) I keep getting a “timeout” warning or error. Even with 10 texts it is still pretty slow… would any of you be so kind to explain to me why is this happening? handling 100 texts shouldn’t be that big of a problem, right?

I am using the following parameters in a java script:

const temperature = 0;
const maxTokens = 2050;

and the model is gpt 3.5 turbo

edit note:
i am using the extension “app script” to write a java code in Google Sheets, which allows you to do this kind of integrations.

thanks in advance for any clarification

If you are running on someone else’s cloud platform, it may have http timeouts that are low, and close the connection on you before you receive a response. Often about 60 seconds.

You can use the API’s streaming=True option to then received chunked SSE stream of responses, where the continued activity may keep the connection alive.

Otherwise, you’ll need to see what about the environment is within your control.

OpenAI has slowed the gpt-3.5-turbo token response rate on accounts that haven’t paid them $50 or more in credits. Just to be rude.

1 Like

Hey! thank you for your reply. Well, I am using google sheets through their “app script” extension. I am not sure if it may be affecting the rate limit, but i think i understand your point. Would you think that if i do the same operation on my local machine it could work better than if i do it on a cloud service?