Skip to main content

A simple and consistent interface for chatting with LLMs

Project description

chatlas chatlas website

PyPI MIT License versions Python Tests

Your friendly guide to building LLM chat apps in Python with less effort and more clarity.

Install

Install the latest stable release from PyPI:

pip install -U chatlas

Or, install the latest development version from GitHub:

pip install -U git+https://github.com/posit-dev/chatlas

Quick start

Get started in 3 simple steps:

  1. Choose a model provider, such as ChatOpenAI or ChatAnthropic.
  2. Visit the provider's reference page to get setup with necessary credentials.
  3. Create the relevant Chat client and start chatting!
from chatlas import ChatOpenAI

# Optional (but recommended) model and system_prompt
chat = ChatOpenAI(
    model="gpt-4.1-mini",
    system_prompt="You are a helpful assistant.",
)

# Optional tool registration
def get_current_weather(lat: float, lng: float):
    "Get the current weather for a given location."
    return "sunny"

chat.register_tool(get_current_weather)

# Send user prompt to the model for a response.
chat.chat("How's the weather in San Francisco?")
Model response output to the user query: 'How's the weather in San Francisco?'

Learn more at https://posit-dev.github.io/chatlas

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

chatlas-0.9.1.tar.gz (12.2 MB view details)

Uploaded Source

Built Distribution

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

chatlas-0.9.1-py3-none-any.whl (95.4 kB view details)

Uploaded Python 3

File details

Details for the file chatlas-0.9.1.tar.gz.

File metadata

  • Download URL: chatlas-0.9.1.tar.gz
  • Upload date:
  • Size: 12.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chatlas-0.9.1.tar.gz
Algorithm Hash digest
SHA256 b6f967f336fac20e5bca7053eab26be1ac51839ee98e6931b0844f10ec273c4d
MD5 cc0ca74afecc48e799d2cf1567fa23e2
BLAKE2b-256 79e7b0514512fd6c9f53b8468e220747ccfc77783d0c75e8a3373400a1576190

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatlas-0.9.1.tar.gz:

Publisher: release.yml on posit-dev/chatlas

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

File details

Details for the file chatlas-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: chatlas-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 95.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chatlas-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83b4e31942a784a858d33448386359e27168e31d5c2ed3519b6f208f109b147e
MD5 ecd06289daf3aa09863dafa2e30fef58
BLAKE2b-256 a9039e173499a4b97d0e5f1d1b936013b3a7b9b3d32d819a1491f755638644ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatlas-0.9.1-py3-none-any.whl:

Publisher: release.yml on posit-dev/chatlas

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