pyview ai chat example
December 23, 2025 ยท View on GitHub
This is a quick example of a chatbot using pyview and openai.
- uses streaming responses from openai to the client
- stores conversation locally in a sqlite database (including ai generated summary of conversation as a title)

Running
This project uses uv for dependency management, and just for task automation.
You need an OpenAI API key to run this project. You can get one here.
Install dependencies
uv sync
Set up environment variables
If using just, you can create a .env file with the following content:
OPENAI_API_KEY=your-api-key
or else just export the environment variable:
export OPEN_API_KEY=your-api-key
Run the project
just