Documentation
  • Welcome to Poe for Creators
  • Prompt Bots
    • How to create a prompt bot
    • Best practices for prompts
      • Text generation
      • Image generation
  • Server bots
    • Quick start
    • Accessing other bots on Poe
    • Using OpenAI function calling
    • Rendering an image in the response
    • Sending files with your response
    • Enabling file upload for your bot
    • Setting an introduction message
    • Updating bot settings
    • Accessing HTTP request information
    • How we cover your costs
    • Examples
    • Poe Protocol Specification
      • Concepts
      • Requests
        • query
        • settings
        • report_feedback
        • report_error
      • Samples and next steps
  • Resources
    • Creator Monetization
    • How to get distribution
    • How to contact us
    • Frequently asked questions
    • API Terms
Powered by GitBook
On this page
  • Sample
  • Next steps
  1. Server bots
  2. Poe Protocol Specification

Samples and next steps

Previousreport_errorNextCreator Monetization

Last updated 1 year ago

Sample

Suppose we’re having the above conversation over Poe with a bot server running at https://ai.example.com/llm.

For the Poe conversation above, the Poe server sends a POST request to https://ai.example.com/llm with the following JSON in the body:

{
    "version": "1.0",
    "type": "query",
    "query": [
        {
            "role": "user",
            "content": "What is the capital of Nepal?",
            "content_type": "text/markdown",
            "timestamp": 1678299819427621,
        }
    ],
    "user": "u-1234abcd5678efgh",
    "conversation": "c-jklm9012nopq3456",
}

The bot server responds with an HTTP 200 response code, then sends the following server-sent events:

event: meta
data: {"content_type": "text/markdown", "linkify": true}

event: text
data: {"text": "The"}

event: text
data: {"text": " capital of Nepal is"}

event: text
data: {"text": " Kathmandu."}

event: done
data: {}

The text may also be split into more or fewer individual events as desired. Sending more events means that users will see partial responses from the bot server faster.

Next steps

  • Tools:

  • Example bots:

Check out our to promptly get a bot running.

, a library for building Poe bots using the FastAPI framework. We recommend using this library if you are building your own bot.

, a simulated Poe server for testing your bots.

, a demo bot to demonstrate the features of the protocol.

See the for a full list of commands supported.

The source code for this bot is available in the .

, a knowledge-augmented Poe bot powered by and FastAPI.

quick start
fastapi-poe
Poe Simulator
HerokuCat
documentation
tutorial
llama-poe
LlamaIndex