llama-index packs panel_chatbot integration
Project description
🦙 Panel ChatBot Pack
Build a chatbot to talk to your Github repository.
Powered by LlamaIndex, OpenAI ChatGPT and HoloViz Panel.
💁♀️ Explanation
This template
- Downloads and indexes a Github repository using the
llama_index
GithubRepositoryReader
. The default repository is holoviz/panel. - Creates a VectorStoreIndex powered chat engine that will retrieve context from that data to respond to each user query.
- Creates a Panel
ChatInterface
UI that will stream each answer from the chat engine.
🖥️ CLI Usage
You can download llamapacks directly using llamaindex-cli
, which comes installed with the llama-index
Python package:
pip install llama-index
llamaindex-cli download-llamapack PanelChatPack --download-dir ./panel_chat_pack
You can then inspect the files in the panel_chat_pack
folder and use them as a template for your own project!
To run the app directly, use in your terminal:
export OPENAI_API_KEY="sk-..."
export GITHUB_TOKEN='...'
panel serve ./panel_chat_pack/base.py
As an alternative to panel serve
, you can run
python ./panel_chat_pack/base.py
🎓 Learn More
👍 Credits
- Marc Skov Madsen for creating the template
- Sophia Yang for creating the cute LLama image.
📈 Potential Improvements
- Improved Multi-user support
- Loading queue: Users should not be able to download the same repository at the same time.
- Service Context
- Enable users to define the service context including
model
,temperature
etc.
- Enable users to define the service context including
- Better loading experience
- Let the chat assistant show (more fine-grained) status messages. And provide more status changes
- Focus on the streaming text
- The streaming text is not always in focus. I believe its a matter of adjusting the
auto_scroll_limit
limit.
- The streaming text is not always in focus. I believe its a matter of adjusting the
- Fix minor CSS issues
- See the
CSS_FIXES_TO_BE_UPSTREAMED_TO_PANEL
variable in the code
- See the
- Repo Manager
- Support using multiple repos. For example the full HoloViz suite
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llama_index_packs_panel_chatbot-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_packs_panel_chatbot-0.3.0.tar.gz
- Upload date:
- Size: 4.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25348d67cbb89913bb4af5bc2a11ae639f0230b8588258eee6bf33694d24ad46 |
|
MD5 | fad2bbefc2dbeb48e18f7f91e12d23a1 |
|
BLAKE2b-256 | 74ce8cb2d4a059e898c0bde6fe5bc46518d26533a94a77504e7db241396faac5 |
File details
Details for the file llama_index_packs_panel_chatbot-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_packs_panel_chatbot-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a57dc0a9bd7aa53162dad209b8ea904b06b856008fe72dd06efb828b4750ddac |
|
MD5 | 7a6029ba5adc3ad3669c1d818002ffed |
|
BLAKE2b-256 | 99a894ef7da51fb8c243ef2188faedece7ce743b57766a6e031b5b9fa334f38c |