Skip to content

Commit 12d6de3

Browse files
committed
chore: rename icon in append_message()
1 parent 4158e7a commit 12d6de3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

shiny/ui/_chat.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ async def append_message(
493493
self,
494494
message: Any,
495495
*,
496-
assistant_icon: HTML | Tag | None = None,
496+
icon: HTML | Tag | None = None,
497497
):
498498
"""
499499
Append a message to the chat.
@@ -507,13 +507,14 @@ async def append_message(
507507
Content strings are interpreted as markdown and rendered to HTML on the
508508
client. Content may also include specially formatted **input suggestion**
509509
links (see note below).
510-
assistant_icon
511-
An optional icon to display next to the assistant message. The icon can be
512-
any HTML element (e.g., an :func:`~shiny.ui.img` tag) or a string of HTML.
510+
icon
511+
An optional icon to display next to the message, currently only used for
512+
assistant messages . The icon can be any HTML element (e.g., an
513+
:func:`~shiny.ui.img` tag) or a string of HTML.
513514
514515
Note
515516
----
516-
``{.callout-note title="Input suggestions"}
517+
:::{.callout-note title="Input suggestions"}
517518
Input suggestions are special links that send text to the user input box when
518519
clicked (or accessed via keyboard). They can be created in the following ways:
519520
@@ -532,14 +533,14 @@ async def append_message(
532533
533534
Note that a user may also opt-out of submitting a suggestion by holding the
534535
`Alt/Option` key while clicking the suggestion link.
535-
```
536+
:::
536537
537-
```{.callout-note title="Streamed messages"}
538+
:::{.callout-note title="Streamed messages"}
538539
Use `.append_message_stream()` instead of this method when `stream=True` (or
539540
similar) is specified in model's completion method.
540-
```
541+
:::
541542
"""
542-
await self._append_message(message, icon=assistant_icon)
543+
await self._append_message(message, icon=icon)
543544

544545
async def _append_message(
545546
self,

0 commit comments

Comments
 (0)