-
Notifications
You must be signed in to change notification settings - Fork 27
quota error? #1
Comments
That's not a software installation problem, that's a problem with your OpenAI account. You can go to https://beta.openai.com/account/usage to see your overall daily/cumulative usage, and a breakdown of a given day's usage down to the level of individual 5 minute periods by model. You can also go to https://beta.openai.com/account/billing/limits to set monthly usage limits, as well as a soft limit (email warning). If you see a large number of text-davinci requests at the time you were running this script, let me know. The number of requests should match the number of summaries you see generated in the command-line output. |
For comparison, here's what I see on https://beta.openai.com/account/usage for the two script runs used to generate the https://github.com/scottleibrand/gpt-summarizer/tree/main/examples. At $0.02 per 10k tokens, that totals to $0.76 worth of usage to summarize those two documents. Not cheap, but if they're documents I'd have had to read otherwise and my free time is worth $20/hr, that means the summaries would need to save me at least 1-2 minutes of reading time per document to be worth doing. |
Thanks! Yes, that makes sense; I hadn't realized that this was the same account I had been using to play with Dall-e. In a different vein though, I was curious how this would do on a mathematics paper, so I ran one of my papers through this and got a summary that is clearly unrelated to the paper. I have attached the files in case you want to try to figure out what went wrong... HHS_quasiflats.full.txt |
That has a TOC that was tripping up my code, in the format:
It was stripping everything after that instance of References, which isn't helpful in this case. ;-) As a quick fix (commit c2a1d9b), I modified the regex to require two newlines before References to treat it as a "real" References section and strip it out. But we should probably figure out a more durable fix. |
That overall summary is only based on the first 3000 tokens of the section summaries:
|
It should probably summarize each section based on the section part summaries, and then use only the section summaries to generate the overall summary, but that didn't work in this case. Here's the full output:
|
Thanks. It is good to know that AI won't be taking over the world so quickly. |
Scott,
I haven't played with openai at all, but your project looked cool, so I set up an account and thought I'd see how it worked. I've run it on a few pdfs and keep getting the same error. Maybe you can let me know if you think this is on my end or is a bug.
Below is what I get when it runs. I just updated my python and all relevant packages.
Thanks,
Jason
iMac ~/Downloads/gpt-summarizer-main $ python summarize.py test.pdf
Text extracted from test.pdf and written to test.full.txt
Total token count: 19034
Header: Title-Abstract
Title-Abstract (7357 characters, 2095 tokens) written to test.TitleAbstract.full.txt
Traceback (most recent call last):
File "/Users/jason/Downloads/gpt-summarizer-main/summarize.py", line 453, in
summary = generate_summary(subcontent, prompt, model_engine, max_tokens)
File "/Users/jason/Downloads/gpt-summarizer-main/summarize.py", line 295, in generate_summary
completions = openai.Completion.create(
File "/usr/local/lib/python3.10/site-packages/openai/api_resources/completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 115, in create
response, _, api_key = requestor.request(
File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 181, in request
resp, got_stream = self._interpret_response(result, stream)
File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 396, in _interpret_response
self._interpret_response_line(
File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 429, in _interpret_response_line
raise self.handle_error_response(
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.
iMac ~/Downloads/gpt-summarizer-main $
The text was updated successfully, but these errors were encountered: