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.2.tar.gz (13.8 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.2-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_live_chat-0.0.2.tar.gz
  • Upload date:
  • Size: 13.8 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.2.tar.gz
Algorithm Hash digest
SHA256 64179722d07efc55a11f71ba074a32874afb15c226d734d3bd7db8697a3a16ac
MD5 80aeef674e2e7fdcdd474435efc64cfc
BLAKE2b-256 26708174ab4540e53754801a4a165256ed60ec3e72c52187f7addf3d8b945894

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_live_chat-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: llm_live_chat-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5eeddc240e2fb07d513097d4aa9de1e06c2225c673bda052e5aaee4aa124116a
MD5 7cc8a6ece118a46550428bbbf4c33203
BLAKE2b-256 57995250aebc2cddcab89e4b16cd66acb02cfbe227d353895e0e0277be6cdefb

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_live_chat-0.0.2-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