Skip to content

Commit 5965f14

Browse files
committed
Address feedback
1 parent 1675212 commit 5965f14

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

shiny/ui/_markdown_stream.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,15 @@ def ui(
279279
----------
280280
content
281281
A string of content to display before any streaming occurs. When
282-
`content_type` isn't `"text"`, it may also be UI element(s) such as input
283-
and output bindings.
282+
`content_type` is Markdown or HTML, it may also be UI element(s) such as
283+
input and output bindings.
284284
content_type
285285
The content type. Default is `"markdown"` (specifically, CommonMark).
286-
Other supported options are:
287-
- `"html"`: for rendering HTML content.
288-
- `"text"`: for plain text.
289-
- `"semi-markdown"`: for rendering markdown, but with HTML tags escaped.
286+
Supported content types include:
287+
- `"markdown"`: markdown text, specifically CommonMark
288+
- `"html"`: for rendering HTML content.
289+
- `"text"`: for plain text.
290+
- `"semi-markdown"`: for rendering markdown, but with HTML tags escaped.
290291
auto_scroll
291292
Whether to automatically scroll to the bottom of a scrollable container
292293
when new content is added. Default is `True`.
@@ -333,13 +334,15 @@ def output_markdown_stream(
333334
:class:`~shiny.ui.MarkdownStream` instance.
334335
content
335336
A string of content to display before any streaming occurs. When `content_type`
336-
isn't `"text"`, it may also be UI element(s) such as input and output bindings.
337+
is Markdown or HTML, it may also be UI element(s) such as input and output
338+
bindings.
337339
content_type
338-
The content type. Default is "markdown" (specifically, CommonMark).
339-
Other supported options are:
340-
- `"html"`: for rendering HTML content.
341-
- `"text"`: for plain text.
342-
- `"semi-markdown"`: for rendering markdown, but with HTML tags escaped.
340+
The content type. Default is "markdown" (specifically, CommonMark). Supported
341+
content types include:
342+
- `"markdown"`: markdown text, specifically CommonMark
343+
- `"html"`: for rendering HTML content.
344+
- `"text"`: for plain text.
345+
- `"semi-markdown"`: for rendering markdown, but with HTML tags escaped.
343346
auto_scroll
344347
Whether to automatically scroll to the bottom of a scrollable container
345348
when new content is added. Default is True.

tests/pytest/test_chat.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,3 @@ def test_as_ollama_message():
504504
assert as_ollama_message(msg) == OllamaMessage(
505505
content="I have a question", role="user"
506506
)
507-
assert as_ollama_message(msg) == OllamaMessage(
508-
content="I have a question", role="user"
509-
)

0 commit comments

Comments
 (0)