A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/posit-dev/chatlas below:

posit-dev/chatlas: Your friendly guide to building LLM chat apps in Python with less effort and more clarity.

chatlas

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

Install the latest stable release from PyPI:

Or, install the latest development version from GitHub:

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

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?")

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4