from poe_api_wrapper import PoeApi
client = PoeApi("premium_token")
bot = "a2"
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")
Non-streamed example:
for chunk in client.send_message(bot, message):
pass
print(chunk["text"])
File "/opt/homebrew/lib/python3.11/site-packages/poe_api_wrapper/api.py", line 706, in send_message
logger.info(f"New Thread created | {message_data['data']['messageEdgeCreate']['chat']['chatCode']}")
from poe_api_wrapper import PoeApi client = PoeApi("premium_token")
bot = "a2" 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")
Non-streamed example:
for chunk in client.send_message(bot, message): pass print(chunk["text"])
File "/opt/homebrew/lib/python3.11/site-packages/poe_api_wrapper/api.py", line 706, in send_message logger.info(f"New Thread created | {message_data['data']['messageEdgeCreate']['chat']['chatCode']}")