Skip to main content

A terminal based chat application that works with local language models.

Project description

Charla: Chat with Language Models in a Terminal

PyPI - Version PyPI - Python Version

Charla is a terminal based chat application that integrates with Ollama, a backend designed to serve language models. To use Charla, ensure that the ollama server is running and at least one language model is installed.

preview

Installation

Install Charla using pipx:

pipx install charla

Usage

Launch the chat console by typing charla in your terminal, or view all available command line options with charla -h.

Features

  • Terminal-based chat system that supports context aware conversations using local language models.
  • Chat sessions are saved as markdown files in the user's documents directory when ending a chat.
  • Prompt history is saved and previously entered prompts are auto-suggested.
  • Switch between single-line and multi-line input modes without interrupting the chat session.
  • Store default user preferences in a settings file.
  • Provide a system prompt for a chat session.
  • Load content from local files and web pages to append to prompts.

Configuration

{
    "model": "llama3:latest",
    "chats_path": "./chats",
    "prompt_history": "./prompt-history.txt"
}

Development

Run the command-line interface directly from the project source without installing the package:

python -m charla.cli

ollama API

Installed models:

curl http://localhost:11434/api/tags

Model info:

curl http://localhost:11434/api/show -d '{"name": "phi3"}'

License

Charla is distributed under the terms of the MIT license.

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

charla-1.2.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

charla-1.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file charla-1.2.0.tar.gz.

File metadata

  • Download URL: charla-1.2.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for charla-1.2.0.tar.gz
Algorithm Hash digest
SHA256 eb8997a5c1282f5eefd60f5bd2b38a6cb75b686668d0fde42bd926295625cb4f
MD5 31303b964eb4ea99818a53f46d6556fb
BLAKE2b-256 7f4a00a0691e6df09446bacd1b8f63308a1c8b6cea5b05d80322731bd0ad616b

See more details on using hashes here.

File details

Details for the file charla-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: charla-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for charla-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbc0865efed0760cc501e6354107b24dfcadd285867bd10183e6fc3ebb5d9081
MD5 dc3facd8f16ce4c764e54eeffc7f23de
BLAKE2b-256 6049617d1738cf1382cee590f5fc10320a7e7aad4bb22fd6e39c3a70bab3c72e

See more details on using hashes here.

Supported by

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