Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ec2b2bf
feat(pkg-r): first pass at new QueryChat() API
cpsievert Nov 21, 2025
ea86b33
`air format` (GitHub Actions)
cpsievert Nov 24, 2025
e58c879
`usethis::use_tidy_description()` (GitHub Actions)
cpsievert Nov 24, 2025
55f17ee
Address feedback
cpsievert Nov 24, 2025
32de0d4
Get check passing
cpsievert Nov 24, 2025
ede59ed
Add some DT/card polish to () and examples
cpsievert Nov 24, 2025
3a14a48
`air format` (GitHub Actions)
cpsievert Nov 24, 2025
d1a15c1
Apply suggestions from code review
cpsievert Nov 25, 2025
fa1c283
chore: rename file
cpsievert Nov 25, 2025
ade1a77
Apply suggestions from code review
cpsievert Nov 25, 2025
a13172d
chore: take renaming suggestions
cpsievert Nov 25, 2025
5c10ad3
`devtools::document()` (GitHub Actions)
cpsievert Nov 25, 2025
be0ddda
fix: pass along ... correctly
cpsievert Nov 25, 2025
1b32ab6
fix: don't cleanup automatically when QueryChat gets initialized outs…
cpsievert Nov 25, 2025
4e9255e
`devtools::document()` (GitHub Actions)
cpsievert Nov 25, 2025
c37cba2
fix: mention shiny::runExample()
cpsievert Nov 25, 2025
2b5d6eb
`air format` (GitHub Actions)
cpsievert Nov 25, 2025
abcdefb
`devtools::document()` (GitHub Actions)
cpsievert Nov 25, 2025
bc15725
feat: Add querychat() and querychat_app() convenience functions
cpsievert Nov 25, 2025
a24ae94
fix: cleanup default value
cpsievert Nov 25, 2025
c1b0534
`devtools::document()` (GitHub Actions)
cpsievert Nov 25, 2025
54cc574
feat: Add app_obj() method
cpsievert Nov 25, 2025
cb3946d
`devtools::document()` (GitHub Actions)
cpsievert Nov 25, 2025
a5c13ba
fix: enforce session-specific server values by accessing through (); …
cpsievert Nov 26, 2025
0f40c0d
Address feedback
cpsievert Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg-py/src/querychat/_querychat.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __init__(
)

# Fork and empty chat now so the per-session forks are fast
client = normalize_client(client)
client = as_querychat_client(client)
self._client = copy.deepcopy(client)
self._client.set_turns([])
self._client.system_prompt = prompt
Expand Down Expand Up @@ -636,7 +636,7 @@ def normalize_data_source(
return DataFrameSource(data_source, table_name)


def normalize_client(client: str | chatlas.Chat | None) -> chatlas.Chat:
def as_querychat_client(client: str | chatlas.Chat | None) -> chatlas.Chat:
if client is None:
client = os.getenv("QUERYCHAT_CLIENT", None)

Expand Down
7 changes: 3 additions & 4 deletions pkg-r/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: querychat
Title: Filter and Query Data Frames in 'shiny' Using an LLM Chat Interface
Version: 0.0.1.9000
Version: 0.1.0.9000
Authors@R: c(
person("Joe", "Cheng", , "joe@posit.co", role = c("aut", "cre")),
person("Posit Software, PBC", role = c("cph", "fnd"))
Expand All @@ -23,17 +23,16 @@ Imports:
lifecycle,
promises,
purrr,
R6,
rlang,
shiny,
shinychat (>= 0.2.0.9000),
utils,
whisker,
xtable
whisker
Suggests:
bsicons,
DT,
palmerpenguins,
R6,
RSQLite,
shinytest2,
testthat (>= 3.0.0),
Expand Down
10 changes: 8 additions & 2 deletions pkg-r/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# Generated by roxygen2: do not edit by hand

S3method(as_querychat_data_source,DBIConnection)
S3method(as_querychat_data_source,data.frame)
S3method(cleanup_source,dbi_source)
S3method(create_system_prompt,querychat_data_source)
S3method(execute_query,dbi_source)
S3method(get_db_type,data_frame_source)
S3method(get_db_type,dbi_source)
S3method(get_db_type,default)
S3method(get_schema,dbi_source)
S3method(querychat_data_source,DBIConnection)
S3method(querychat_data_source,data.frame)
S3method(test_query,dbi_source)
export(QueryChat)
export(as_querychat_data_source)
export(cleanup_source)
export(create_system_prompt)
export(execute_query)
export(get_db_type)
export(get_schema)
export(querychat)
export(querychat_app)
export(querychat_data_source)
export(querychat_greeting)
Expand All @@ -23,4 +26,7 @@ export(querychat_server)
export(querychat_sidebar)
export(querychat_ui)
export(test_query)
importFrom(R6,R6Class)
importFrom(bslib,sidebar)
importFrom(lifecycle,deprecated)
importFrom(rlang,"%||%")
3 changes: 3 additions & 0 deletions pkg-r/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# querychat (development version)

* Nearly the entire functional API (i.e., `querychat_init()`, `querychat_sidebar()`, `querychat_server()`, etc) has been hard deprecated in favor of a simpler OOP-based API. Namely, the new `QueryChat$new()` class is now the main entry point (instead of `querychat_init()`) and has methods to replace old functions (e.g., `$sidebar()`, `$server()`, etc). (#109)
* In addition, `querychat_data_source()` was renamed to `as_querychat_data_source()`, and remains exported for a developer extension point, but users no longer have to explicitly create a data source. (#109)

* Added `prompt_template` support for `querychat_system_prompt()`. (Thank you, @oacar! #37, #45)

* `querychat_init()` now accepts a `client`, replacing the previous `create_chat_func` argument. (#60)
Expand Down
Loading