cursor
cursor copied to clipboard
Support for poe.com (quora's chatbot service) api
Hey team, thank you so much for your hard work! I'm using poe.com on their web interface. Can I propose the feature to support adding poe.com api as an option to access their model through my personal poe.com api key, which will be counted towards my poe.com montly limit?
- Adding an input field for taking poe.com api key
- Adding an input field for default bot name to send query to (each bot on poe has a unique name, but I don't think it's possible to retrieve a list of bot names, so an input field to specify which bot to default to would be useful enough already)
Context
- Here is the doc for the python api interfact, it's quite straightforward: https://creator.poe.com/docs/accessing-other-bots-on-poe
- Here's what it looks like
import asyncio
import fastapi_poe as fp
# Create an asynchronous function to encapsulate the async for loop
async def get_responses(api_key, messages):
async for partial in fp.get_bot_response(messages=messages, bot_name="GPT-3.5-Turbo", api_key=api_key):
print(partial)
# Replace <api_key> with your actual API key, ensuring it is a string.
api_key = <api_key>
message = fp.ProtocolMessage(role="user", content="Hello world")
# Run the event loop
# For Python 3.7 and newer
asyncio.run(get_responses(api_key, [message]))
Again, thank you so much for your hardwork!