Skip to content

Commit 3c29f44

Browse files
Chat tutorials (#1206)
* Chat feedback tutorial draft * Typos * Chat response editing draft * Update chat revision tutorial * Tutorial code formattings * Update chat-response-revision.md * Update chat-response-revision.md * Edits for style * Editorial review * Edits
1 parent 85cc4e6 commit 3c29f44

14 files changed

+1218
-94
lines changed

content/develop/tutorials/elements/charts/annotate-altair-chart.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ st.altair_chart(combined_chart, use_container_width=True)
117117
### Initialize your app
118118

119119
1. In `your_repository`, create a file named `app.py`.
120-
1. In a terminal, change directories to `your_repository` and start your app.
120+
1. In a terminal, change directories to `your_repository`, and start your app:
121121

122122
```bash
123123
streamlit run app.py
124124
```
125125

126-
Your app will be blank since you still need to add code.
126+
Your app will be blank because you still need to add code.
127127

128128
1. In `app.py`, write the following:
129129

@@ -140,10 +140,12 @@ st.altair_chart(combined_chart, use_container_width=True)
140140
- You'll maniputate the data using `pandas`.
141141
- You'll define a chart using `altair`.
142142

143-
1. Save your `app.py` file and view your running app.
144-
1. Click "**Always rerun**" or hit your "**A**" key in your running app.
143+
1. Save your `app.py` file, and view your running app.
144+
1. In your app, select "**Always rerun**", or press the "**A**" key.
145145

146-
Your running preview will automatically update as you save changes to `app.py`. Your preview will still be blank. Return to your code.
146+
Your preview will be blank but will automatically update as you save changes to `app.py`.
147+
148+
1. Return to your code.
147149

148150
### Build the data layer
149151

content/develop/tutorials/elements/dataframes/row_selections.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This tutorial uses row selections, which were introduced in Streamlit version 1.
1515

1616
## Prerequisites
1717

18-
- The following must be installed in your Python environment:
18+
- This tutorial requires the following version of Streamlit:
1919

2020
```text
2121
streamlit>=1.35.0
@@ -135,13 +135,13 @@ Here's a look at what you'll build:
135135
### Initialize your app
136136

137137
1. In `your_repository`, create a file named `app.py`.
138-
1. In a terminal, change directories to `your_repository` and start your app.
138+
1. In a terminal, change directories to `your_repository`, and start your app:
139139

140140
```bash
141141
streamlit run app.py
142142
```
143143

144-
Your app will be blank since you still need to add code.
144+
Your app will be blank because you still need to add code.
145145

146146
1. In `app.py`, write the following:
147147

@@ -159,10 +159,12 @@ Here's a look at what you'll build:
159159
- You'll generate random activity data with `numpy`.
160160
- You'll manipulate the data with `pandas`.
161161

162-
1. Save your `app.py` file and view your running app.
163-
1. Click "**Always rerun**" or hit your "**A**" key in your running app.
162+
1. Save your `app.py` file, and view your running app.
163+
1. In your app, select "**Always rerun**", or press the "**A**" key.
164164

165-
Your running preview will automatically update as you save changes to `app.py`. Your preview will still be blank. Return to your code.
165+
Your preview will be blank but will automatically update as you save changes to `app.py`.
166+
167+
1. Return to your code.
166168

167169
### Build a function to create random member data
168170

content/develop/tutorials/execution-flow/fragments/create-a-multiple-container-fragment.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Streamlit lets you turn functions into [fragments](/develop/concepts/architectur
1414

1515
## Prerequisites
1616

17-
- The following must be installed in your Python environment:
17+
- This tutorial requires the following version of Streamlit:
1818

1919
```text
2020
streamlit>=1.37.0
@@ -99,13 +99,13 @@ with st.sidebar:
9999
### Initialize your app
100100

101101
1. In `your_repository`, create a file named `app.py`.
102-
1. In a terminal, change directories to `your_repository` and start your app.
102+
1. In a terminal, change directories to `your_repository`, and start your app:
103103

104104
```bash
105105
streamlit run app.py
106106
```
107107

108-
Your app will be blank since you still need to add code.
108+
Your app will be blank because you still need to add code.
109109

110110
1. In `app.py`, write the following:
111111

@@ -116,10 +116,12 @@ with st.sidebar:
116116

117117
You'll use `time.sleep()` to slow things down and see the fragments working.
118118

119-
1. Save your `app.py` file and view your running app.
120-
1. Click "**Always rerun**" or hit your "**A**" key in your running app.
119+
1. Save your `app.py` file, and view your running app.
120+
1. In your app, select "**Always rerun**", or press the "**A**" key.
121121

122-
Your running preview will automatically update as you save changes to `app.py`. Your preview will still be blank. Return to your code.
122+
Your preview will be blank but will automatically update as you save changes to `app.py`.
123+
124+
1. Return to your code.
123125

124126
### Frame out your app's containers
125127

content/develop/tutorials/execution-flow/fragments/start-and-stop-fragment-auto-reruns.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Streamlit lets you turn functions into [fragments](/develop/concepts/architectur
1414

1515
## Prerequisites
1616

17-
- The following must be installed in your Python environment:
17+
- This tutorial requires the following version of Streamlit:
1818

1919
```text
2020
streamlit>=1.37.0
@@ -102,13 +102,13 @@ show_latest_data()
102102
### Initialize your app
103103

104104
1. In `your_repository`, create a file named `app.py`.
105-
1. In a terminal, change directories to `your_repository` and start your app.
105+
1. In a terminal, change directories to `your_repository`, and start your app:
106106

107107
```bash
108108
streamlit run app.py
109109
```
110110

111-
Your app will be blank since you still need to add code.
111+
Your app will be blank because you still need to add code.
112112

113113
1. In `app.py`, write the following:
114114

@@ -125,10 +125,12 @@ show_latest_data()
125125
- You'll generate random data with `numpy`.
126126
- The data will have `datetime.datetime` index values.
127127

128-
1. Save your `app.py` file and view your running app.
129-
1. Click "**Always rerun**" or hit your "**A**" key in your running app.
128+
1. Save your `app.py` file, and view your running app.
129+
1. In your app, select "**Always rerun**", or press the "**A**" key.
130130

131-
Your running preview will automatically update as you save changes to `app.py`. Your preview will still be blank. Return to your code.
131+
Your preview will be blank but will automatically update as you save changes to `app.py`.
132+
133+
1. Return to your code.
132134

133135
### Build a function to generate random, recent data
134136

content/develop/tutorials/execution-flow/fragments/trigger-a-full-script-rerun-from-a-fragment.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Streamlit lets you turn functions into [fragments](/develop/concepts/architectur
1313

1414
## Prerequisites
1515

16-
- The following must be installed in your Python environment:
16+
- This tutorial requires the following version of Streamlit:
1717

1818
```text
1919
streamlit>=1.37.0
@@ -137,13 +137,13 @@ with monthly:
137137
### Initialize your app
138138

139139
1. In `your_repository`, create a file named `app.py`.
140-
1. In a terminal, change directories to `your_repository` and start your app.
140+
1. In a terminal, change directories to `your_repository`, and start your app:
141141

142142
```bash
143143
streamlit run app.py
144144
```
145145

146-
Your app will be blank since you still need to add code.
146+
Your app will be blank because you still need to add code.
147147

148148
1. In `app.py`, write the following:
149149

@@ -164,10 +164,12 @@ with monthly:
164164
- The products sold will be "Widget A" through "Widget Z," so you'll use `string` for easy access to an alphabetical string.
165165
- Optional: To help add emphasis at the end, you'll use `time.sleep()` to slow things down and see the fragment working.
166166

167-
1. Save your `app.py` file and view your running app.
168-
1. Click "**Always rerun**" or hit your "**A**" key in your running app.
167+
1. Save your `app.py` file, and view your running app.
168+
1. In your app, select "**Always rerun**", or press the "**A**" key.
169169

170-
Your running preview will automatically update as you save changes to `app.py`. Your preview will still be blank. Return to your code.
170+
Your preview will be blank but will automatically update as you save changes to `app.py`.
171+
172+
1. Return to your code.
171173

172174
### Build a function to create random sales data
173175

content/develop/tutorials/llms/_index.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Build LLM apps
3-
slug: /develop/tutorials/llms
3+
slug: /develop/tutorials/chat-and-llm-apps
44
---
55

66
# Build LLM apps
@@ -23,4 +23,22 @@ Build a chat app using the LangChain framework with OpenAI.
2323

2424
</RefCard>
2525

26+
<RefCard href="/develop/tutorials/chat-and-llm-apps/chat-response-feedback">
27+
28+
<h5>Get chat response feedback</h5>
29+
30+
Buid a chat app and let users rate the responses.
31+
(<i style={{ verticalAlign: "-.25em" }} className={{ class: "material-icons-sharp" }}>thumb_up</i>
32+
<i style={{ verticalAlign: "-.25em" }} className={{ class: "material-icons-sharp" }}>thumb_down</i>)
33+
34+
</RefCard>
35+
36+
<RefCard href="/develop/tutorials/chat-and-llm-apps/validate-and-edit-chat-responses">
37+
38+
<h5>Validate and edit chat responses</h5>
39+
40+
Build a chat app with response validation. Let users correct or edit the responses.
41+
42+
</RefCard>
43+
2644
</TileContainer>

0 commit comments

Comments
 (0)