Examples using Panel and its Chat Components; Panels chat components are multi modal and supports LangChain, OpenAI, Mistral, Llama, etc.
Documentation: holoviz-topics.github.io/panel-chat-examples/
panel-chat-examples-splash.3.mp4
Panels Chat Components are available from Panel v1.3.0.
To install and serve all examples:
git clone https://github.com/holoviz-topics/panel-chat-examples
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.
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.
CUDA:
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.