Closed SolarDriftCom closed 2 weeks ago
I also got the Rate Limit Error on my first attempt when using the 'b' and 'lat' tokens I got from Poe.com. But when I used the tokens from Quora.com itself, it started working.
This is fixed in the v1.4.3. Please check documentation for new config.
@snowby666 I installed the latest version 2 days ago using pip, and the error still exists? Can you let me know what I am doing wrong? Thanks
UPDATE: Apologies, I see you just recently updated the library, thanks
@snowby666 I installed the latest version 2 days ago using pip, and the error still exists? Can you let me know what I am doing wrong? Thanks
UPDATE: Apologies, I see you just recently updated the library, thanks
Keep me update if there is any error ^^
OK
I have the value of this from Chrome:
2nd Method: Devtools > Console > Type: allow pasting > Paste this script: window.ereNdsRqhp2Rd3LEW()
Copy the result
I also have all these:
tokens = { 'p-b': 'p-b cookie here', 'p-lat': 'p-lat cookie here', 'formkey': 'formkey here', '__cf_bm': '__cf_bm cookie here', 'cf_clearance': 'cf_clearance cookie here' }
(Obviously with the correct values)
From poe.com
But get this:
Traceback (most recent call last):
File "/var/www/readfile.ai/public_html/api/routes/test-poe-api/poeTest2.py", line 11, in
OK
I have the value of this from Chrome:
2nd Method: Devtools > Console > Type: allow pasting > Paste this script: window.ereNdsRqhp2Rd3LEW()
Copy the result
I also have all these:
tokens = { 'p-b': 'p-b cookie here', 'p-lat': 'p-lat cookie here', 'formkey': 'formkey here', '__cf_bm': '__cf_bm cookie here', 'cf_clearance': 'cf_clearance cookie here' }
(Obviously with the correct values)
From poe.com
But get this:
Traceback (most recent call last): File "/var/www/readfile.ai/public_html/api/routes/test-poe-api/poeTest2.py", line 11, in client = PoeApi(tokens=tokens) File "/home/secureuser/miniconda3/lib/python3.10/site-packages/poe_api_wrapper/api.py", line 34, in init raise ValueError("Please provide valid p-b, p-lat and formkey") ValueError: Please provide valid p-b, p-lat and formkey
please check your tokens again if you are missing "," or anything
Not missing anything? See:
tokens = { # Copy the values of m-b and m-lat cookies AFTER LOGGING IN TO POE.COM 'b': 'Wkl5BTsMQTuwXiHR54e2Kg%3D', 'lat': 'tJlVQGYrHtLN0v53VDD7ud6x', 'formKey': 'bbd527e2e00cb1381b3ab613', '__cf_bm': '_5btmwPIYfuPHeSh0.WQwVwyahvWt1G.UMlqBL5FKjI-1718644023-1.0.1.1-WkytrqBKkRNN7z2DXh33xNSnz0QBeZNpI1h4Xxff.iJREg3sRzkIIX', 'cfclearance': '0JmfJ9a1PpRBPTy.bmXeKDIYE4v1GZRDjzDcBLPYGnw-1718644024-1.0.1.1-FwPORPEd1.LpcypYAb0IDturJM5wmPdX4lBKySC8eStsl2vKc75n***' }
client = PoeApi(tokens=tokens) bot = "GPT-4o-128k"
file_urls = ["https://readfileaiprocessed.pdf"] for chunk in client.send_message(bot, "Taking the attached document answer all of the following questions in JSON format:\nWhat is the customers full name and title in the attached document?\n", file_path=file_urls): print(chunk["response"], end="", flush=True)
Same error? I am desperate to get this working. Currently I am manually processing 1000 documents a day :-)
I've just changed the config for client. They should be "p-b" and "p-lat" not "b" and "lat". Theres a typo for formkey with "K" instead of "k" btw ^^
Ok thanks, that seems to have got me a bit further. But I now get this:
File "/home/secureuser/miniconda3/lib/python3.10/site-packages/poe_api_wrapper/api.py", line 654, in send_message message_data = self.send_request(apiPath, 'SendMessageMutation', variables, file_form) File "/home/secureuser/miniconda3/lib/python3.10/site-packages/poe_api_wrapper/api.py", line 117, in send_request "poe-tag-id": hashlib.md5((payload + self.formkey + "4LxgHM6KpFqokX0Ox").encode()).hexdigest(), TypeError: can't concat str to bytes
Thanks Paul
Theres a patch for uploading file now in v1.4.5
Ok, any documentation for the patch? I can only see tags up to v1.4.3? Thanks
just update the lib and it should work now
OK :-)
Honestly your a genius and a legend! Thank you so much :-) Now my wrists and hands can remain intact from processing manually so much.
Glad it helps :D
I'm closing this issue now.
Hi,
I get this error no matter what I do once setup the client:
raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.") RuntimeError: Rate limit exceeded for sending requests to poe.com. Please try again later.
Any ideas? I am subscribed in Poe so any model should work? I tried GPT-4o, GPT-4o-128k, and GPT-3_5
Code:
from poe_api_wrapper import PoeApi
tokens = { # Copy the values of m-b and m-lat cookies AFTER LOGGING IN TO POE.COM 'b': '...', 'lat': '...', '__cf_bm': '...', 'cf_clearance': '...' } client = PoeApi(cookie=tokens) bot = "GPT-4o-128k"
file_urls = ["https://mypdffile.pdf"] # SWAP OUT FOR REAL FILE for chunk in client.send_message(bot, "Taking the attached document answer all of the following questions in JSON format:\nWhat is the customers full name and title in the attached document?\n", file_path=file_urls): print(chunk["response"], end="", flush=True)
I also cleared all cookies and logged in again to Poe.com to get new cookie values, but still same error.
Note it first shows a lot of purple output before the above error with HTML in it, and the Javascript error identified in issue #130
Thanks Paul