Skip to main content

Use LLM to chat in your terminal and receive async responses

Project description

llm-live-chat

PyPI License

An LLM plugin that provides an interactive chat with support for live message injection from external processes.

Installation

Install this plugin in the same environment as LLM.

llm install llm-live-chat

Usage

live-chat

Start an interactive chat session:

llm live-chat

This works like llm chat but supports live message injection from external processes via SIGUSR1. The session displays its PID and conversation ID on startup so other processes can inject messages into the running conversation.

Options:

  • -m MODEL — Model to use
  • -s SYSTEM — System prompt
  • -c / --continue — Continue the most recent conversation
  • --cid ID — Continue a specific conversation by ID
  • --show-history — Display previous messages when continuing a conversation
  • -T TOOL — Make a tool available to the model
  • -t TEMPLATE — Use a template
  • -o KEY VALUE — Model options

inject

Inject a message into a conversation's database:

llm inject "Your message here" --cid CONVERSATION_ID

If --cid is given, the message is injected into that conversation and SIGUSR1 is sent to all running llm live-chat processes so they pick it up immediately.

If no --cid is given, a new conversation is created.

Options:

  • --cid ID — Conversation ID to inject into
  • --prompt TEXT — User message to pair with the injected response (default: "...")
  • -m MODEL — Model name for new conversations
  • -d DATABASE — Path to log database

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-live-chat
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

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

llm_live_chat-0.0.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_live_chat-0.0.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_live_chat-0.0.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llm_live_chat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b0a989cddeda614eaac12c2f00cd2742f8b34a0bc8f2b82f7529be84944b1c3c
MD5 a86f85b692de861ba9b061bb9595895a
BLAKE2b-256 8a30ed40232a37f119e653c7402bb2738a9446aa6b79bd255064d7151152a99f

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_live_chat-0.0.1.tar.gz:

Publisher: publish.yml on imbue-ai/llm-live-chat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_live_chat-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: llm_live_chat-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llm_live_chat-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8be30081bce3466cc2bbaa9645eabb1660048522abac2f7b8dacbaae7336dfff
MD5 fe233ced27040e554dd0c32eb5efc2a2
BLAKE2b-256 a4d64b8b1e7064c9df51f48c8fd306a8178581a39c8c5196d96fd9aa69362478

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_live_chat-0.0.1-py3-none-any.whl:

Publisher: publish.yml on imbue-ai/llm-live-chat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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