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.
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 and keeps track of chat history. See the langchain docs and our example of a conversational RAG on the anywidget documentation.
import ipylangchat
ipylangchat.ChatUIWidget(chain)
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.
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
Built Distribution
File details
Details for the file ipylangchat-0.0.2.tar.gz
.
File metadata
- Download URL: ipylangchat-0.0.2.tar.gz
- Upload date:
- Size: 109.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d04660080f6c3321745326630f8756a51f0a614493f4591ace7cefc8933b2fd |
|
MD5 | 7c4387ad86433f0f5103682c16f0c29d |
|
BLAKE2b-256 | a9fa1bdc6f8ae28238f3a7f0bd5ebed7280b461cf12c74f72288b64ed87af9ce |
File details
Details for the file ipylangchat-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: ipylangchat-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 491815b4b985e06235f69da4db665aca0333939e68d11cfebbcc81cc5e29c857 |
|
MD5 | 1c757e52e4cfe536c8fadee41063f9bc |
|
BLAKE2b-256 | 49a5143a123f913d4c740b26e9216e09a7ff53b7176c66bc004431f2d93cd7c4 |