Skip to contents

Initalize the querychat server

Usage

querychat_server(id, querychat_config)

Arguments

id

The ID of the module instance. Must match the ID passed to the corresponding call to querychat_ui().

querychat_config

An object created by querychat_init().

Value

A querychat instance, which is a named list with the following elements:

  • sql: A reactive that returns the current SQL query.

  • title: A reactive that returns the current title.

  • df: A reactive that returns the data frame, filtered and sorted by the current SQL query.

  • chat: The ellmer::Chat object that powers the chat interface.

By convention, this object should be named querychat_config.