Skip to main content

Minimalistic chatbot ui using fastapi, fastui and langchain.

Project description

fastui-chat

A minimalistic ChatBot Interface in pure python.

Usage

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

> startapp

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


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.0.2.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

fastui_chat-0.0.2-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page