Skip to content

Examples of Chat Bots using Panels chat features: Traditional, LLMs, AI Agents, LangChain, OpenAI etc

License

Notifications You must be signed in to change notification settings

statlib/panel-chat-examples

 
 

Repository files navigation

Panel Chat Examples

build

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.

Exploration

Open in GitHub Codespaces

Installation

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.

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.

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

Contributing

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

License

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

About

Examples of Chat Bots using Panels chat features: Traditional, LLMs, AI Agents, LangChain, OpenAI etc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.6%
  • HTML 3.4%