poe不能用了poe.com收费了
Anthropic’s fastest model, with strength in creative tasks. Features a context window of 9k tokens (around 7,000 words).
Quick start
This tutorial will help you quickly get an API bot running with the help of our starter code. We will go over how to deploy this code and how to integrate your bot server with Poe. For more information on Poe API bots, check out the Poe Protocol Specification.
Deploying your bot
We recommend using Modal to deploy your bot but you can also use the cloud provider of your choice; all you need to do is to make the bot server available at a publicly available URL and use that to integrate with Poe. In order to use Modal to deploy your bot, do the following.
Step 1: Install the model client
Open a terminal and run
pip install modal-client
Step 2: Setup modal token
This step involves setting up access to modal from your terminal. You only need to do this once for your computer. In the terminal, run
modal token new --source poe
. You will taken to your web browser where you will be asked to log into modal using your Github account.![](https://644660286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGWSINnF7jRv4MWpO55RT%2Fuploads%2FOadQzJ9tUMS5uCVzTrPo%2Flogin.png?alt=media&token=196d46c8-28f1-4002-89c8-a9246c06ecc3)
After you login, click on "create token". You will be prompted to close the browser window after that.
![](https://644660286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGWSINnF7jRv4MWpO55RT%2Fuploads%2FamK5Dpcn5ZO1FYiUzKZl%2Fcreate_token.png?alt=media&token=97ec2c3f-b660-45de-a1e8-cc6d981b35cd)
Step 3: Clone the starter code and deploy to Modal
In your terminal, run:
-
git clone https://github.com/poe-platform/api-bot-tutorial
-
cd api-bot-tutorial
-
pip install -r requirements.txt
-
modal deploy main.py
Modal will now deploy your app and output two urls: a) the endpoint at which your app is hosted b) an internal page you can go to in order to view your app. You will be using the former to integrate your bot into Poe.
![](https://644660286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGWSINnF7jRv4MWpO55RT%2Fuploads%2FhLF5hqeaSb9d9ZWGFz3K%2Fimage.png?alt=media&token=53f0ec63-68c2-4337-bd11-2a6087caa01c)
Integrating with Poe
Once you have a bot running under a publicly accessible URL, it is time to connect it to Poe. You can do that on your desktop by going to the bot creation form. You can customize how your bot looks by providing a picture, name and description. After you fill out the server URL, click "create bot", your bot should be ready for use in all Poe clients!
Iterating on the bot
For faster iteration on the bot, modal offers the serve command which you can use by running
modal serve main.py
. Modal will host for you an ephemeral app on the cloud which gets live-updated if you make any changes to the underlying code. Feel free to comment/uncomment any of the other example bots to try them out or build off of them.Where to go from here
Refer to poe-protocol to understand the full capabilities offered by Poe API bots and see some additional tools and samples, including:
-
The specification that details precisely how API bots work
-
The fastapi-poe library, which you can use as a base for creating Poe bots