Closed bluusun closed 12 months ago
This worked until a few days ago.
Yeah, I got the same error just now. It was working till the last hour.
text system crashed today a little less than 5 hours ago
ζθΏδΉζ― ζζη bot ι½θΏζ ·
the hash for query has just been changed. I will update the api soon
Still getting the same error in 1.2.4 @snowby666
Can you specify the error logs here?
Can anyone fork this repo and add header=self.HEADERS
for me if it works
Line 247:
ws = websocket.WebSocketApp(self.channel_url, header=self.HEADERS, on_message=self.on_message, on_open=self.on_ws_connect, on_error=self.on_ws_error, on_close=self.on_ws_close)
It works
def connect_ws(self, timeout=20):
if self.ws_connected:
return
if self.ws_connecting:
while not self.ws_connected:
sleep(0.01)
return
self.ws_connecting = True
self.ws_connected = False
self.get_channel_settings()
try:
self.subscribe()
except:
raise RuntimeError("Rate limit exceeded for sending requests to poe.com. Please try again later.")
ws = websocket.WebSocketApp(self.channel_url, header=self.HEADERS, on_message=self.on_message, on_open=self.on_ws_connect, on_error=self.on_ws_error, on_close=self.on_ws_close)
self.ws = ws
t = threading.Thread(target=self.ws_run_thread, daemon=True)
t.start()
timer = 0
while not self.ws_connected:
sleep(0.01)
timer += 0.01
if timer > timeout:
self.ws_connecting = False
self.ws_connected = False
self.ws_error = True
ws.close()
raise RuntimeError("Timed out waiting for websocket to connect.")
this is fixed in the release
from poe_api_wrapper import PoeApi client = PoeApi("token")
bot = "a2_2" message = "What is reverse engineering?"
Create new chat thread
Streamed example:
for chunk in client.send_message(bot, message): print(chunk["response"], end="", flush=True) print("\n")
ValueError: Bot a2_2 not found. Make sure the bot exists before creating new chat.
Seems to happen with any bot I tried with.