Minimalistic chatbot ui using fastapi, fastui and langchain.
Project description
fastui-chat
A minimalistic ChatBot Interface in pure python.
Build on top of FastUI and LangChain Core.
Usage
pip install fastui-chat
from langchain.chat_models import ChatOpenAI
from langchain.memory import ChatMessageHistory
from fastui_chat import ChatUI, basic_chat_handler
history = ChatMessageHistory()
handler = basic_chat_handler(
llm=ChatOpenAI(),
chat_history=history,
)
history.add_ai_message("How can I help you today?")
app = ChatUI(
chat_history=history,
chat_handler=handler,
)
app.start_with_uvicorn()
Features
- Easy to use
- Minimalistic & Lightweight
- LangChain Compatible
- Python Only
Development Setup
git clone https://github.com/shroominic/fastui-chat.git && cd fastui-chat
./dev-install.sh
TODO
-
Image IO (vision models)
-
Store previous chats and display them
-
AutoScroll to bottom of chat on new message
-
Make easy to deploy
-
Add tests
-
Add more examples
-
... other ideas? Open an issue or PR!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastui_chat-0.2.0.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for fastui_chat-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fedff9ac42b40b2d56a44c7005143576eb09b7b704835deb424a8ba47e6dcdc |
|
MD5 | efe822b43d4bfd96d1cc119d16ff655f |
|
BLAKE2b-256 | 69c3685bbb2077e723d4c9a2c1815b538a69cbdd952b63cf39765abea8456009 |