Project Introduction: Poe API Wrapper
The Poe API Wrapper is an innovative and user-friendly library designed to interact with Poe.com. Developed by the GitHub user snowby666, this project aims to provide a simple, lightweight, and highly efficient API wrapper that can streamline interactions with various bots and AI models available on the Poe platform.
Highlights
The Poe API Wrapper brings several features to make bot integration as seamless as possible:
- Sync and Async Support: The wrapper caters to both synchronous and asynchronous programming styles, enhancing flexibility for developers.
- Authentication: It allows for easy login using Poe tokens, proxy handling, and setting up a proxy context to suit various use cases.
- Message Automation: Users can create chat threads, send messages, and manage responses efficiently. This includes streaming responses, sending concurrent messages, and even retrying or purging messages when needed.
- Chat and Bot Management: Fetching chat IDs, managing subscriptions, and managing bots are simplified. Users can create, edit, and delete custom bots with ease.
- Knowledge Base Customization: The wrapper supports uploading and editing knowledge bases for bots, offering more tailored interactions.
- Discovery: It enables discovering new bots, categories, and even exploring third-party bots and users.
- Bots Group Chat: Still in beta, this feature allows for managing group chat setups, data retrieval, and history management.
Installation
Installation of the Poe API Wrapper can be done quickly using pip:
pip install -U poe-api-wrapper
For those needing an auto-proxy version, it is also available for Python 3.9+:
pip install -U 'poe-api-wrapper[proxy]'
Basic Usage
The library is easy to use, making it approachable for developers of all skill levels. An example of setting up an async client is provided to give users a quick start:
from poe_api_wrapper import AsyncPoeApi
import asyncio
tokens = {'p-b': ..., 'p-lat': ...}
async def main():
client = await AsyncPoeApi(tokens=tokens).create()
message = "Explain quantum computing in simple terms"
async for chunk in client.send_message(bot="gpt3_5", message=message):
print(chunk["response"], end='', flush=True)
asyncio.run(main())
Additionally, a command-line interface is available for users preferring a non-programmatic setup.
Available Bots
The Poe API Wrapper is compatible with a wide range of bots, offering models like GPT-3.5, GPT-4, Claude, and more. These bots vary in their capabilities, token limits, and subscription requirements but generally encompass a wide scope of applications from simple task automation to more advanced cognitive processing.
Documentation and Support
For a detailed walkthrough and advanced usage, the project documentation is thorough and well-organized. Developers can understand the process of obtaining necessary tokens and explore OpenAI integration within the Poe API Wrapper.
Contributing
The project is open for contributions, and guidelines for contributing along with debugging information is provided to ensure smooth collaboration. This community-driven approach not only helps in refining the project further but also encourages innovation through collective intelligence.
Conclusion
The Poe API Wrapper is an essential tool for developers looking to leverage the advanced capabilities of Poe.com bots and AI models. Its flexibility, paired with robust features for bot and chat management, make it a noteworthy solution in the API development domain.