snowby666 / poe-api-wrapper

πŸ‘Ύ A Python API wrapper for Poe.com. With this, you will have free access to GPT-4, Claude, Llama, Gemini, Mistral and more! πŸš€
https://pypi.org/project/poe-api-wrapper/
GNU General Public License v3.0
833 stars 98 forks source link

ValueError: Bot a2_2 not found. Make sure the bot exists before creating new chat. #46

Closed bluusun closed 12 months ago

bluusun commented 1 year ago

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.

bluusun commented 1 year ago

This worked until a few days ago.

detherminal commented 1 year ago

Yeah, I got the same error just now. It was working till the last hour.

noseon commented 1 year ago

text system crashed today a little less than 5 hours ago

445022889 commented 1 year ago

ζˆ‘θΏ™δΉŸζ˜― ζ‰€ζœ‰ηš„ bot 都这样

snowby666 commented 1 year ago

the hash for query has just been changed. I will update the api soon

detherminal commented 1 year ago

Still getting the same error in 1.2.4 @snowby666

snowby666 commented 12 months ago

Can you specify the error logs here?

snowby666 commented 12 months ago

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)
phamxtien commented 12 months ago

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.")
snowby666 commented 12 months ago

this is fixed in the release