Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ChainChat - Chat with LangChain

ChainChat logo

CLI to chat with any LangChain model, also supports tool calling and multimodality.

Chat Models

ChainChat will introspect any installed langchain_* packages and make any BaseChatModel subclasses available as commands with the models attributes as options - chainchat <model-command> --<option> <value>.

Just pip install any model packages you want to use, and they will be available as model commands to chat with:

$ chainchat chat
...
Commands:
  preset  Load a preset model from YAML.
$ pip install langchain_openai langchain_anthropic
$ chainchat chat
...
Commands:
  preset                          Load a preset model from YAML.
  anthropic                       See...
  anthropic-messages              See...
  azure-open-ai                   See...
...

API Keys

API keys are accessed via environment variables. By default they are loaded from a .env file located in the current directory. You can specify a different file using the chainchat --dotenv option.

OpenAI Compatible Models

You can use any OpenAI compatible model with ChainChat. For example to use xAI Grok put your XAI_API_KEY in your .env file and alias it to OPENAI_API_KEY:

$ chainchat --alias-env OPENAI_API_KEY XAI_API_KEY chat --tool read_file --prompt "Read and summarize the file ./LICENSE.txt" open-ai --model-name grok-beta --openai-api-base https://api.x.ai/v1
I am reading the file ./LICENSE.txt to summarize its contents.
...

Metadata

Release files for chainchat 0.1a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chainchat 0.1a2
File Size Uploaded
chainchat-0.1a2.tar.gz 109.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chainchat 0.1a2
File Interpreter ABI Platform
chainchat-0.1a2-py3-none-any.whl Python 3 none any Details

Total release size: 139.1 kB

Release files / chainchat-0.1a2.tar.gz

Download URL chainchat-0.1a2.tar.gz
Size 109.5 kB
Tags Source
SHA-256 checksum
How to use checksums
636150ba738720d46218813059a734d3ecb758c372a005f9c3f2112f73847847
BLAKE2b-256 checksum
How to use checksums
7fda003b8a56c9343d91588ead2aa89a8e60495a26ed4aa9f535b02392d0cd5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2024.

Transparency log

Release files / chainchat-0.1a2-py3-none-any.whl

Download URL chainchat-0.1a2-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63830b2e2c22eb1aac69aff83cebaca2c5033685c3043271161e730c62a8b4f8
BLAKE2b-256 checksum
How to use checksums
1009316d6d9355b41edf6b1e48bd6321bad589ccd0228ba0a4d7e414b755f854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.1a2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page