Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt exceeding OpenAI's rate limit #49

Open
webermatias opened this issue Mar 10, 2024 · 4 comments
Open

Prompt exceeding OpenAI's rate limit #49

webermatias opened this issue Mar 10, 2024 · 4 comments
Labels
bug Something isn't working P1

Comments

@webermatias
Copy link
Contributor

I asked Skyvern to perform a search in google and do an exploration. One of the results was a YouTube page with many comments. In this step, it hit the rate limit several times, resulting in OpenAI marking the key as unavailable.

2024-03-10T15:25:57 064833_a_233651193154000422_screenshot_final
2024-03-10T15:25:54.087388_a_233651180269098532_llm_request.json
2024-03-10T15:25:54.039585_a_233651180269098518_llm_prompt.txt

The errors:

OpenAI rate limit exceeded, marking key as unavailable. error_code=rate_limit_exceeded error_message=Error code: 429 - {'error': {'message': 'Request too large for gpt-4-vision-preview in organization org-KvD1ZUhg9B7cNvz3mxtyAZBX on tokens per min (TPM): Limit 40000, Requested 53355. The input or output tokens must be reduced in order to run successfully. Visit https://platform.openai.com/account/rate-limits to learn more.', 'type': 'tokens', 'param': None, 'code': 'rate_limit_exceeded'}}

openai.RateLimitError: Error code: 429 - {'error': {'message': 'Request too large for gpt-4-vision-preview in organization org-KvD1ZUhg9B7cNvz3mxtyAZBX on tokens per min (TPM): Limit 40000, Requested 53355. The input or output tokens must be reduced in order to run successfully. Visit https://platform.openai.com/account/rate-limits to learn more.', 'type': 'tokens', 'param': None, 'code': 'rate_limit_exceeded'}}

@suchintan
Copy link
Contributor

It's very likely that this is happening because every url within the comments is interactable, and we generate 800 tokens tokens per comment 😱

{'id': 392, 'tagName': 'a', 'attributes': {'href': '/@TimKitchens7'}, 'children': [{'id': 393, 'tagName': 'img', 'attributes': {'alt': '', 'src': 'https://yt3.ggpht.com/e1atGPiP24JyimquGvvBoeKxiclrfjatbAIMMepSfSYEiX8fzpF-0bvYQ843xvW96Rbac1T21g=s88-c-k-c0x00ffffff-no-rj'}}]}, {'id': 394, 'tagName': 'a', 'attributes': {'href': '/@TimKitchens7'}, 'text': '@TimKitchens7', 'children': [{'id': 395, 'tagName': 'span', 'text': '@TimKitchens7'}]}, {'id': 396, 'tagName': 'a', 'attributes': {'href': '/watch?v=Jl6BuoXcZPE&lc=UgxAY3LFLkZDxT4l_ZB4AaABAg'}, 'text': '10 days ago'}, {'id': 397, 'tagName': 'a', 'attributes': {'aria-label': 'Like this comment along with 0 other people', 'title': '', 'href': 'https://accounts.google.com/ServiceLogin?service=youtube&uilel=3&passive=true&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den%26next%3D%252Fwatch%253Fv%253DJl6BuoXcZPE&hl=en'}, 'children': [{'id': 398, 'tagName': 'div', 'children': [{'id': 399, 'tagName': 'div'}]}, {'id': 400, 'tagName': 'div', 'children': [{'id': 401, 'tagName': 'div'}, {'id': 402, 'tagName': 'div'}]}]}, {'id': 403, 'tagName': 'a', 'attributes': {'aria-label': '', 'title': '', 'href': 'https://accounts.google.com/ServiceLogin?service=youtube&uilel=3&passive=true&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den%26next%3D%252Fwatch%253Fv%253DJl6BuoXcZPE&hl=en'}, 'children': [{'id': 404, 'tagName': 'div', 'children': [{'id': 405, 'tagName': 'div'}]}, {'id': 406, 'tagName': 'div', 'children': [{'id': 407, 'tagName': 'div'}, {'id': 408, 'tagName': 'div'}]}]}, {'id': 409, 'tagName': 'a', 'attributes': {'aria-label': 'Reply', 'title': '', 'href': 'https://accounts.google.com/ServiceLogin?service=youtube&uilel=3&passive=true&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den%26next%3D%252Fwatch%253Fv%253DJl6BuoXcZPE&hl=en'}, 'text': 'Reply', 'children': [{'id': 410, 'tagName': 'div', 'text': 'Reply', 'children': [{'id': 411, 'tagName': 'span', 'text': 'Reply'}]}, {'id': 412, 'tagName': 'div', 'children': [{'id': 413, 'tagName': 'div'}, {'id': 414, 'tagName': 'div'}]}]}, {'id': 415, 'tagName': 'a', 'attributes': {'href': '/@ahassan7270'}

image

https://platform.openai.com/tokenizer

@suchintan suchintan added the bug Something isn't working label Mar 11, 2024
@theRealWardo
Copy link

I bumped into this one as well. For sites with a large number of links, the project really just doesn't work due to number of tokens required and even for sites with a moderate number of links it can be pretty expensive to run due to this prompting technique.

When some improvements are made here, I'll try the project again. Until then, I can't really automate my workflows with this project.

@suchintan
Copy link
Contributor

@theRealWardo we will investigate and get back to you when it's fixed!

@suchintan suchintan added the P1 label Mar 22, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

No branches or pull requests

3 participants