Skip to main content

Serverless chat UI Jupyter widget for langchain conversational AIs

Project description

ipylangchat 💬

A minimal Chat UI Jupyter Widget for language models. Built with anywidget 💪.

Lets you talk to a LangChain runnable or agent, such as a conversational RAG, directly in a Jupyter environment (Notebook, Lab, Google Colab, VSCode). No need to serve a web application.

See the RAG example notebook.

Installation

pip install ipylangchat

Development installation

Create a virtual environment and and install ipylangchat in editable mode with the optional development dependencies:

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Open example.ipynb in JupyterLab, VS Code, or your favorite editor to start developing. Changes made in src/ipylangchat/static/ will be reflected in the notebook.

Usage

Note: This is still a very basic implementation that demonstrates the power of the anywidget framework to bring custom UIs into Jupyter.

Right now, the widget accepts a chain using a prompt template that takes in human input as {input} and keeps track of chat history through a {chat_history} message placeholder. See the langchain docs and our example of a conversational RAG on the anywidget documentation.

import ipylangchat

ipylangchat.ChatUIWidget(chain)

Image of a ChatUIWidget

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

ipylangchat-0.0.1.tar.gz (119.0 kB view details)

Uploaded Source

Built Distribution

ipylangchat-0.0.1-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ipylangchat-0.0.1.tar.gz.

File metadata

  • Download URL: ipylangchat-0.0.1.tar.gz
  • Upload date:
  • Size: 119.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for ipylangchat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9979c024249b9120b6182a5554a903d63c555767ef323baafc8861d5f37826f4
MD5 3a02acbcb63dd80b17f334f91694aaf9
BLAKE2b-256 685efefcabd68d37b734d77e120bf3bafbf04b057a60c41747237b82922a5c3f

See more details on using hashes here.

File details

Details for the file ipylangchat-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ipylangchat-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1b448e1717b57907392f62941f7c674a76ce5c0f614306edff8dc8c04cd3c6ad
MD5 91f6ef8a3dfe640c506bb3174cf80e76
BLAKE2b-256 fa01fbf745f091125da80732cfe29b1272ebddb0ffe2596973f3605135923a2f

See more details on using hashes here.

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