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
687 stars 82 forks source link

Error when sending message without chatcode #113

Closed aaag1980 closed 4 months ago

aaag1980 commented 4 months ago

good afternoon! Until last week I was using the wrapper without any problems. Since then:

  1. When trying to send a new message, to create a new thread/chat, an error message appears.
  2. If I pass a FAKE chatcode, the sending is carried out and the response is received properly, but the chatcode I created is returned (at this moment, when accessing the web version it is possible to see a new chat being created with its respective chatcode ).
  3. If I provide a correct chatcode, in the same way as in item 2, the sending and receiving of the response is carried out properly

    Code:

from poe_api_wrapper import PoeExample token = "XXXXXXXX" PoeExample(token).chat_with_bot()

Error:

$$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$ $$\ $$ $$\ $$ $$\ $$ | $$ | $$ | $$$$$$\ $$$$$$\ $$ / $$ |$$ | $$ | $$ | $$$$$$$ |$$ $$\ $$ $$\ $$$$$$$$ |$$$$$$$ | $$ | $$ __/ $$ / $$ |$$$$$$$$ | $$ $$ |$$ __/ $$ | $$ | $$ | $$ |$$ | $$ | $$ |$$ | $$ | $$ | \$$$$$$ |\$$$$$$$\ $$ | $$ |$$ | $$$$$$\ _| _____/ ___| _| _|_| _____|

This is an example of how to use the PoeApi wrapper.

[0] : Exit the program [1] : Add a bot directly [2] : Search for a bot by category [3] : Search for a bot by query [4] : Search for a user's bots [5] : Search for users and their bots [6] : See the chat history

Your choice: 2

Available categories:

[1] Official [2] For you [3] Popular [4] Featured [5] New [6] ImageGen [7] Music [8] Learning [9] AI [10] Sports [11] Advice [12] Mind [13] Roleplay [14] Travel [15] Games [16] Funny [17] Programming [18] Writing [19] Utilities [20] Professional [21] History [22] Cooking

Your choice: 1

Enter the number of bots you want to explore or type all to explore all the bots in this category.

Your choice: all Who do you want to talk to?

[1] Assistant [2] Web-Search [3] GPT-4 [4] Playground-v2 [5] Claude-instant-100k [6] DALL-E-3 [7] StableDiffusionXL [8] Mistral-Medium [9] Llama-2-70b-Groq [10] Claude-2-100k [11] Claude-instant [12] Gemini-Pro [13] RekaFlash [14] ChatGPT [15] ChatGPT-16k [16] GPT-4-32k [17] Mixtral-8x7B-Chat [18] Code-Llama-70B-FW [19] Qwen-72b-Chat [20] Google-PaLM [21] Gemma-7b-FW [22] fw-mistral-7b [23] Llama-2-70b [24] Code-Llama-34b [25] Llama-2-13b [26] Llama-2-7b [27] Code-Llama-13b [28] Code-Llama-7b [29] Solar-Mini [30] GPT-3.5-Turbo-Instruct [31] GPT-3.5-Turbo [32] Mixtral-8x7b-Groq

Your choice: 1 The selected bot is: Assistant

🔰 Type !help for more commands 🔰

You : Hello Assistant : Traceback (most recent call last): File "c:\Users\aaag1\Downloads\wrapper\app.py", line 3, in PoeExample(token).chat_with_bot() File "c:\Users\aaag1\Downloads\wrapper\poe_api_wrapper\example.py", line 456, in chat_with_bot for chunk in self.client.send_message(self.bot, message, self.chatId, suggest_replies=True, file_path=file_urls): File "c:\Users\aaag1\Downloads\wrapper\poe_api_wrapper\api.py", line 748, in send_message raise e File "c:\Users\aaag1\Downloads\wrapper\poe_api_wrapper\api.py", line 718, in send_message raise ValueError( ValueError: Bot capybara not found. Make sure the bot exists before creating new chat.

EugeneBoondock commented 4 months ago

I am getting this similar error:

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

Everything was working well until now... I checked on poe, the message gets received by the poe bot I choose, but then for the output to be brought back, that's where the isseu seems to arise:

Traceback (most recent call last): File "/home/container/.local/lib/python3.12/site-packages/discord/client.py", line 441, in _run_event await coro(*args, **kwargs) File "/home/container/earthie/earthie.py", line 34, in on_message response = await ask_question(message.guild.id, "Earthie", message.content, message.author.name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/container/earthie/earthie.py", line 52, in ask_question for chunk in poe_client.send_message(bot_name, formatted_message, chatCode=chat_code, chatId=chat_id): File "/home/container/earthie/poe_api_wrapper/api.py", line 748, in send_message raise e File "/home/container/earthie/poe_api_wrapper/api.py", line 718, in send_message raise ValueError( ValueError: Bot earthie not found. Make sure the bot exists before creating new chat.

aaag1980 commented 4 months ago

Resolved

EugeneBoondock commented 4 months ago

Resolved

Hie, how did you fix yours?