You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

chatlas

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chatlas

A simple and consistent interface for chatting with LLMs

0.9.1
pipPyPI
Maintainers
1

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:

  • Choose a model provider, such as ChatOpenAI or ChatAnthropic.
  • Visit the provider's reference page to get setup with necessary credentials.
  • 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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts