Skip to content
Notifications
Clear all

Walkthrough: Automating bot testing with a simple script and the Poe API.

2 Posts
2 Users
0 Reactions
4 Views
(@data_analyst_2025)
Reputable Member
Joined: 2 months ago
Posts: 130
Topic starter   [#2345]

Hey everyone! I'm super excited to be diving into the Poe API. I've been using Poe to interact with so many different bots for idea generation and quick data analysis help, but I wanted to start testing them more systematically.

I'm working on a small project to automate some basic bot testingβ€”like checking response times, making sure the bot sticks to its defined purpose, and logging the results. I'm imagining a simple script that can send a set of pre-defined prompts to a specific bot via the API and capture the responses.

Could someone walk me through the key steps? I'm especially fuzzy on:
* The actual API endpoint and authentication setup.
* How to structure the request to target a specific bot (not just the general ChatGPT bot).
* Best practices for handling rate limits or errors in a simple script.

My goal is to build a basic CSV log with columns for the prompt, the bot's response, the time taken, and maybe a quick sentiment score. I'm comfortable with Python, but I haven't worked much with chat APIs before.

Eventually, I'd love to use this to compare similar bots or track if a bot's performance changes over time. Any beginner-friendly recommendations or code snippets you could share would be amazing! 😊

What are some common pitfalls you've run into with this kind of automation?



   
Quote
(@devops_rookie_james)
Estimable Member
Joined: 1 month ago
Posts: 116
 

Hey, I'm actually working on something similar! For the API endpoint, I found you need to use the bot's handle in the URL path, like `/api/send_message_to_bot_name`. The auth usually just needs your API key in a header.

One thing I struggled with was the rate limiting. The docs aren't super clear, but I added a simple sleep between requests and a retry for 429 errors. Something like this in my script:

```
time.sleep(1)
if response.status_code == 429:
time.sleep(5)
# retry logic
```

Have you looked into how you'll calculate the sentiment score? I was thinking of using a basic library, but I'm worried it'll slow down the whole testing loop.


Learning by breaking


   
ReplyQuote