Skip to main content

Chat with LangChain LLM models, with tool calling and multimodal support

Project description

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.
...

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

chainchat-0.1a2.tar.gz (109.5 kB view details)

Uploaded Source

Built Distribution

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

chainchat-0.1a2-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file chainchat-0.1a2.tar.gz.

File metadata

  • Download URL: chainchat-0.1a2.tar.gz
  • Upload date:
  • Size: 109.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for chainchat-0.1a2.tar.gz
Algorithm Hash digest
SHA256 636150ba738720d46218813059a734d3ecb758c372a005f9c3f2112f73847847
MD5 4b9ce37f1bab0f7ddf128e5c0a62a0f1
BLAKE2b-256 7fda003b8a56c9343d91588ead2aa89a8e60495a26ed4aa9f535b02392d0cd5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for chainchat-0.1a2.tar.gz:

Publisher: publish.yml on rectalogic/chainchat

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

File details

Details for the file chainchat-0.1a2-py3-none-any.whl.

File metadata

  • Download URL: chainchat-0.1a2-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for chainchat-0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 63830b2e2c22eb1aac69aff83cebaca2c5033685c3043271161e730c62a8b4f8
MD5 ca999c2d49050bdf2577351f5afb78b9
BLAKE2b-256 1009316d6d9355b41edf6b1e48bd6321bad589ccd0228ba0a4d7e414b755f854

See more details on using hashes here.

Provenance

The following attestation bundles were made for chainchat-0.1a2-py3-none-any.whl:

Publisher: publish.yml on rectalogic/chainchat

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