Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc831da

Browse files
committed
add more text in lecture notebooks
1 parent 4dc2510 commit bc831da

File tree

4 files changed

+152
-218
lines changed

4 files changed

+152
-218
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
.DS_Store
2-
.ipynb_checkpoints
2+
.ipynb_checkpoints
3+
data/podcast_clip_*.mp3
4+
data/podcast_long.*
5+
data/paddlespeech*.wav
6+
data/tts.*
7+
data/transcripts

13_unit_test.ipynb

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## ChatGPT写的功能代码"
8+
]
9+
},
310
{
411
"cell_type": "code",
512
"execution_count": 5,
@@ -34,9 +41,7 @@
3441
"cell_type": "markdown",
3542
"metadata": {},
3643
"source": [
37-
"```\n",
38-
"conda install pytest\n",
39-
"```"
44+
"## ChatGPT写的简单的单元测试"
4045
]
4146
},
4247
{
@@ -56,6 +61,14 @@
5661
" assert format_time(3661) == \"1h1min1s\""
5762
]
5863
},
64+
{
65+
"attachments": {},
66+
"cell_type": "markdown",
67+
"metadata": {},
68+
"source": [
69+
"## 第一步,解释功能代码"
70+
]
71+
},
5972
{
6073
"cell_type": "code",
6174
"execution_count": 52,
@@ -115,6 +128,14 @@
115128
"print(code_explaination)"
116129
]
117130
},
131+
{
132+
"attachments": {},
133+
"cell_type": "markdown",
134+
"metadata": {},
135+
"source": [
136+
"## 第二步,设计测试用例"
137+
]
138+
},
118139
{
119140
"cell_type": "code",
120141
"execution_count": 53,
@@ -164,6 +185,14 @@
164185
"print(test_plan)"
165186
]
166187
},
188+
{
189+
"attachments": {},
190+
"cell_type": "markdown",
191+
"metadata": {},
192+
"source": [
193+
"## 第二步补充,补充更多用例"
194+
]
195+
},
167196
{
168197
"cell_type": "code",
169198
"execution_count": 55,
@@ -203,6 +232,14 @@
203232
" print(more_test_plan)\n"
204233
]
205234
},
235+
{
236+
"attachments": {},
237+
"cell_type": "markdown",
238+
"metadata": {},
239+
"source": [
240+
"## 第三步,撰写单元测试"
241+
]
242+
},
206243
{
207244
"cell_type": "code",
208245
"execution_count": 56,
@@ -262,6 +299,14 @@
262299
"print(unit_test_response)"
263300
]
264301
},
302+
{
303+
"attachments": {},
304+
"cell_type": "markdown",
305+
"metadata": {},
306+
"source": [
307+
"## 检查代码语法合法"
308+
]
309+
},
265310
{
266311
"cell_type": "code",
267312
"execution_count": 57,
@@ -337,6 +382,14 @@
337382
"print(code_output)\n"
338383
]
339384
},
385+
{
386+
"attachments": {},
387+
"cell_type": "markdown",
388+
"metadata": {},
389+
"source": [
390+
"## 实验Bad Case"
391+
]
392+
},
340393
{
341394
"cell_type": "code",
342395
"execution_count": 62,

14_langchain_01.ipynb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"attachments": {},
5+
"cell_type": "markdown",
6+
"metadata": {},
7+
"source": [
8+
"## 多次调用完成中译英,英文文答,英译中"
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 1,
@@ -58,6 +66,14 @@
5866
"print(answer)\n"
5967
]
6068
},
69+
{
70+
"attachments": {},
71+
"cell_type": "markdown",
72+
"metadata": {},
73+
"source": [
74+
"## 使用Langchain简化实现"
75+
]
76+
},
6177
{
6278
"cell_type": "code",
6379
"execution_count": 2,
@@ -97,6 +113,14 @@
97113
"print(answer)"
98114
]
99115
},
116+
{
117+
"attachments": {},
118+
"cell_type": "markdown",
119+
"metadata": {},
120+
"source": [
121+
"## 多步骤引入不同输入参数"
122+
]
123+
},
100124
{
101125
"cell_type": "code",
102126
"execution_count": 3,

0 commit comments

Comments
 (0)