Skip to main content

Minimal chatbot

The smallest working example:

Interactive terminal chat


Sync (no async)

Use chat_sync() when you don’t want to deal with asyncio:

Multiple users

Each user_id gets separate conversation history:

Multiple platforms

Use platform to separate conversations from different surfaces:

Checking the response

ChatResponse supports bool and string protocols:

Different LLM providers