Skip to content

Panel Chat Examples


Examples using Panel and its Chat Components; Panels chat components are multi modal and supports LangChain, OpenAI, Mistral, Llama, etc.


Panels Chat Components are available from Panel v1.3.0.


Open in GitHub Codespaces


To install and serve all examples:

git clone
cd panel-chat-examples
# Optionally create a new virtual environment with conda, venv, etc.
pip install .
# Optionally set the OPENAI_API_KEY environment variable
panel serve docs/examples/**/*.py --static-dirs thumbnails=docs/assets/thumbnails --autoreload

Then open http://localhost:5006 in your browser.

Panel Index Page

GPU Usage

Note the default installation is not optimized for GPU usage. To enable GPU support for local models (i.e. not OpenAI), install ctransformers with the proper backend and modify the scripts configs' accordingly, e.g. n_gpu_layers=1 for a single GPU.


pip install ctransformers[cuda] --no-binary ctransformers --no-cache --no-binary ctransformers --force

Mac M1/2:

CT_METAL=1 hatch run pip install ctransformers --no-binary ctransformers --no-cache --no-binary ctransformers --force # for m1


We would ❤️ to collaborate with you. Check out the DEVELOPER GUIDE for to get started.


This project is licensed under the terms of the MIT license.