types.ServerValues

types.ServerValues(df, sql, title, client)

Session-specific reactive values and client returned by QueryChat.server().

This dataclass contains all the session-specific reactive state for a QueryChat instance. Each session gets its own ServerValues to ensure proper isolation between concurrent sessions.

Attributes

Name Type Description
df Callable[[], IntoFrameT] A reactive Calc that returns the current filtered data frame or lazy frame. If the data source is lazy, returns a LazyFrame. If no SQL query has been set, this returns the unfiltered data from the data source. Call it like .df() to reactively read the current data.
sql ReactiveStringOrNone A reactive Value containing the current SQL query string. Access the value by calling .sql(), or set it with .sql.set("SELECT ..."). Returns None if no query has been set.
title ReactiveStringOrNone A reactive Value containing the current title for the query. The LLM provides this title when generating a new SQL query. Access it with .title(), or set it with .title.set("..."). Returns None if no title has been set.
client chatlas.Chat The session-specific chat client instance. This is a deep copy of the base client configured for this specific session, containing the chat history and tool registrations for this session only.