Skip to content

Conversation

cpsievert
Copy link
Collaborator

This was resulting in error even though it shouldn't be:

from shiny import reactive
from shiny.express import render, ui

chat = ui.Chat(id="chat")
chat.ui()


@reactive.effect
async def _():
    await chat.append_message({"content": "A user message", "role": "user"})

@cpsievert cpsievert force-pushed the chat-append-user-msg branch from c3750ec to 2f43847 Compare July 3, 2024 22:47
@cpsievert cpsievert merged commit 46f7ee4 into main Jul 3, 2024
@cpsievert cpsievert deleted the chat-append-user-msg branch July 3, 2024 22:53
schloerke added a commit to machow/py-shiny that referenced this pull request Jul 5, 2024
* main:
  test(controllers): Refactor column sort and filter methods for Dataframe class (posit-dev#1496)
  Follow up to posit-dev#1453: allow user roles when normalizing a dictionary (posit-dev#1495)
  fix(layout_columns): Fix coercion of scalar row height to list for python <= 3.9 (posit-dev#1494)
  Add `shiny.ui.Chat` (posit-dev#1453)
  docs(Theme): Fix example and clarify usage (posit-dev#1491)
  chore(pyright): Pin pyright version to `1.1.369` to avoid CI failures (posit-dev#1493)
  tests(dataframe): Add additional tests for dataframe (posit-dev#1487)
  bug(data frame): Export `render.StyleInfo` (posit-dev#1488)
schloerke added a commit that referenced this pull request Jul 9, 2024
* main:
  feat(data frame): Support `polars` (#1474)
  api(playwright): Code review of complete playwright API (#1501)
  fix: Move `www/shared/py-shiny` to `www/py-shiny` (#1499)
  test(controllers): Refactor column sort and filter methods for Dataframe class (#1496)
  Follow up to #1453: allow user roles when normalizing a dictionary (#1495)
  fix(layout_columns): Fix coercion of scalar row height to list for python <= 3.9 (#1494)
  Add `shiny.ui.Chat` (#1453)
  docs(Theme): Fix example and clarify usage (#1491)
  chore(pyright): Pin pyright version to `1.1.369` to avoid CI failures (#1493)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant