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.1.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file fastui_chat-0.2.1.tar.gz
.
File metadata
- Download URL: fastui_chat-0.2.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e2dc6173887c2852a3a276b2cae487f14c3f24f0b6772c5416b7422ee39655 |
|
MD5 | a6df2faf2ea93b536f1b6489ce230236 |
|
BLAKE2b-256 | cf460b4d148bc1a968b0a770c0da222d8abb47fd6613d49bfa34c238d7e289ca |
File details
Details for the file fastui_chat-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: fastui_chat-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea090aa8783c47e00b01227954fb4dbed5cedf4232e13bfae4b9cad42c41ac55 |
|
MD5 | 585db821e3f29e83b7e8b81a7017df19 |
|
BLAKE2b-256 | c74b466fcb0ac69112a7c4af1d4668642af1e92d2f5c9b2c70245914ab8bc63a |