You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/kb/tutorials/chat.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ For an overview of the API, check out this video tutorial by Chanin Nantasenamat
47
47
48
48
Here's an minimal example of how to use `st.chat_message` to display a welcome message:
49
49
50
-
```python
50
+
```python numbered
51
51
import streamlit as st
52
52
53
53
with st.chat_message("user"):
@@ -59,7 +59,7 @@ with st.chat_message("user"):
59
59
60
60
Notice the message is displayed with a default avatar and styling since we passed in `"user"` as the author name. You can also pass in `"assistant"` as the author name to use a different default avatar and styling, or pass in a custom name and avatar. See the [API reference](/library/api-reference/chat/st.chat_message) for more details.
0 commit comments