Upload with huggingface_hub
Browse files- app.ipynb +7 -7
- backtrack.ipynb +9 -9
- base.ipynb +6 -6
- bash.ipynb +9 -9
- chat.ipynb +13 -13
- color.ipynb +8 -8
- gatsby.ipynb +12 -12
- math_demo.ipynb +9 -9
- math_prompts.ipynb +4 -4
- ner.ipynb +10 -10
- pal.ipynb +10 -10
- parallel.ipynb +2 -2
- process.ipynb +6 -6
- process.py +1 -1
- qa.ipynb +13 -13
- selfask.ipynb +10 -10
- show.ipynb +3 -3
- stats.ipynb +11 -11
- story.ipynb +5 -5
- summary.ipynb +11 -11
- temp +0 -0
- temp.ipynb +15 -15
- temp.log +0 -0
- test.ipynb +8 -8
app.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
@@ -34,7 +34,7 @@
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
-
"id": "
|
38 |
"metadata": {},
|
39 |
"outputs": [],
|
40 |
"source": [
|
@@ -61,7 +61,7 @@
|
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
"execution_count": null,
|
64 |
-
"id": "
|
65 |
"metadata": {},
|
66 |
"outputs": [],
|
67 |
"source": []
|
@@ -69,7 +69,7 @@
|
|
69 |
{
|
70 |
"cell_type": "code",
|
71 |
"execution_count": null,
|
72 |
-
"id": "
|
73 |
"metadata": {},
|
74 |
"outputs": [],
|
75 |
"source": [
|
@@ -84,7 +84,7 @@
|
|
84 |
{
|
85 |
"cell_type": "code",
|
86 |
"execution_count": null,
|
87 |
-
"id": "
|
88 |
"metadata": {
|
89 |
"lines_to_next_cell": 2
|
90 |
},
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "0e8d6177",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "be91fdf2",
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
+
"id": "2b618caa",
|
38 |
"metadata": {},
|
39 |
"outputs": [],
|
40 |
"source": [
|
|
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
"execution_count": null,
|
64 |
+
"id": "30e34bad",
|
65 |
"metadata": {},
|
66 |
"outputs": [],
|
67 |
"source": []
|
|
|
69 |
{
|
70 |
"cell_type": "code",
|
71 |
"execution_count": null,
|
72 |
+
"id": "7cb4d4d9",
|
73 |
"metadata": {},
|
74 |
"outputs": [],
|
75 |
"source": [
|
|
|
84 |
{
|
85 |
"cell_type": "code",
|
86 |
"execution_count": null,
|
87 |
+
"id": "57ec58c2",
|
88 |
"metadata": {
|
89 |
"lines_to_next_cell": 2
|
90 |
},
|
backtrack.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"tags": [
|
20 |
"hide_inp"
|
@@ -33,7 +33,7 @@
|
|
33 |
{
|
34 |
"cell_type": "code",
|
35 |
"execution_count": null,
|
36 |
-
"id": "
|
37 |
"metadata": {
|
38 |
"lines_to_next_cell": 1
|
39 |
},
|
@@ -46,7 +46,7 @@
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
-
"id": "
|
50 |
"metadata": {
|
51 |
"lines_to_next_cell": 1
|
52 |
},
|
@@ -60,7 +60,7 @@
|
|
60 |
{
|
61 |
"cell_type": "code",
|
62 |
"execution_count": null,
|
63 |
-
"id": "
|
64 |
"metadata": {
|
65 |
"lines_to_next_cell": 1
|
66 |
},
|
@@ -77,7 +77,7 @@
|
|
77 |
{
|
78 |
"cell_type": "code",
|
79 |
"execution_count": null,
|
80 |
-
"id": "
|
81 |
"metadata": {
|
82 |
"lines_to_next_cell": 1
|
83 |
},
|
@@ -91,7 +91,7 @@
|
|
91 |
{
|
92 |
"cell_type": "code",
|
93 |
"execution_count": null,
|
94 |
-
"id": "
|
95 |
"metadata": {},
|
96 |
"outputs": [],
|
97 |
"source": [
|
@@ -105,7 +105,7 @@
|
|
105 |
{
|
106 |
"cell_type": "code",
|
107 |
"execution_count": null,
|
108 |
-
"id": "
|
109 |
"metadata": {},
|
110 |
"outputs": [],
|
111 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "158928f5",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "b7be4150",
|
18 |
"metadata": {
|
19 |
"tags": [
|
20 |
"hide_inp"
|
|
|
33 |
{
|
34 |
"cell_type": "code",
|
35 |
"execution_count": null,
|
36 |
+
"id": "d9a87050",
|
37 |
"metadata": {
|
38 |
"lines_to_next_cell": 1
|
39 |
},
|
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
+
"id": "c11692a3",
|
50 |
"metadata": {
|
51 |
"lines_to_next_cell": 1
|
52 |
},
|
|
|
60 |
{
|
61 |
"cell_type": "code",
|
62 |
"execution_count": null,
|
63 |
+
"id": "2035f083",
|
64 |
"metadata": {
|
65 |
"lines_to_next_cell": 1
|
66 |
},
|
|
|
77 |
{
|
78 |
"cell_type": "code",
|
79 |
"execution_count": null,
|
80 |
+
"id": "2b9caa2b",
|
81 |
"metadata": {
|
82 |
"lines_to_next_cell": 1
|
83 |
},
|
|
|
91 |
{
|
92 |
"cell_type": "code",
|
93 |
"execution_count": null,
|
94 |
+
"id": "d825edb7",
|
95 |
"metadata": {},
|
96 |
"outputs": [],
|
97 |
"source": [
|
|
|
105 |
{
|
106 |
"cell_type": "code",
|
107 |
"execution_count": null,
|
108 |
+
"id": "1eac94d8",
|
109 |
"metadata": {},
|
110 |
"outputs": [],
|
111 |
"source": [
|
base.ipynb
CHANGED
@@ -3,17 +3,17 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
-
"id": "
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"Prompt from ...\n"
|
@@ -22,7 +22,7 @@
|
|
22 |
{
|
23 |
"cell_type": "code",
|
24 |
"execution_count": null,
|
25 |
-
"id": "
|
26 |
"metadata": {},
|
27 |
"outputs": [],
|
28 |
"source": [
|
@@ -71,7 +71,7 @@
|
|
71 |
{
|
72 |
"cell_type": "code",
|
73 |
"execution_count": null,
|
74 |
-
"id": "
|
75 |
"metadata": {
|
76 |
"lines_to_next_cell": 1
|
77 |
},
|
@@ -83,7 +83,7 @@
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": null,
|
86 |
-
"id": "
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "04b70841",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
+
"id": "f8ea4879",
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"Prompt from ...\n"
|
|
|
22 |
{
|
23 |
"cell_type": "code",
|
24 |
"execution_count": null,
|
25 |
+
"id": "0370e1bb",
|
26 |
"metadata": {},
|
27 |
"outputs": [],
|
28 |
"source": [
|
|
|
71 |
{
|
72 |
"cell_type": "code",
|
73 |
"execution_count": null,
|
74 |
+
"id": "82a93b59",
|
75 |
"metadata": {
|
76 |
"lines_to_next_cell": 1
|
77 |
},
|
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": null,
|
86 |
+
"id": "4e5105b2",
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
bash.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
@@ -36,7 +36,7 @@
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
-
"id": "
|
40 |
"metadata": {},
|
41 |
"outputs": [],
|
42 |
"source": [
|
@@ -46,7 +46,7 @@
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
-
"id": "
|
50 |
"metadata": {
|
51 |
"lines_to_next_cell": 1
|
52 |
},
|
@@ -61,7 +61,7 @@
|
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
"execution_count": null,
|
64 |
-
"id": "
|
65 |
"metadata": {
|
66 |
"lines_to_next_cell": 1
|
67 |
},
|
@@ -75,7 +75,7 @@
|
|
75 |
{
|
76 |
"cell_type": "code",
|
77 |
"execution_count": null,
|
78 |
-
"id": "
|
79 |
"metadata": {},
|
80 |
"outputs": [],
|
81 |
"source": [
|
@@ -86,7 +86,7 @@
|
|
86 |
{
|
87 |
"cell_type": "code",
|
88 |
"execution_count": null,
|
89 |
-
"id": "
|
90 |
"metadata": {},
|
91 |
"outputs": [],
|
92 |
"source": []
|
@@ -94,7 +94,7 @@
|
|
94 |
{
|
95 |
"cell_type": "code",
|
96 |
"execution_count": null,
|
97 |
-
"id": "
|
98 |
"metadata": {
|
99 |
"lines_to_next_cell": 2
|
100 |
},
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "0360e829",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "60519a97",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
+
"id": "852ced62",
|
40 |
"metadata": {},
|
41 |
"outputs": [],
|
42 |
"source": [
|
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
+
"id": "b80a8444",
|
50 |
"metadata": {
|
51 |
"lines_to_next_cell": 1
|
52 |
},
|
|
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
"execution_count": null,
|
64 |
+
"id": "7d6cc929",
|
65 |
"metadata": {
|
66 |
"lines_to_next_cell": 1
|
67 |
},
|
|
|
75 |
{
|
76 |
"cell_type": "code",
|
77 |
"execution_count": null,
|
78 |
+
"id": "3c841ddf",
|
79 |
"metadata": {},
|
80 |
"outputs": [],
|
81 |
"source": [
|
|
|
86 |
{
|
87 |
"cell_type": "code",
|
88 |
"execution_count": null,
|
89 |
+
"id": "cd905126",
|
90 |
"metadata": {},
|
91 |
"outputs": [],
|
92 |
"source": []
|
|
|
94 |
{
|
95 |
"cell_type": "code",
|
96 |
"execution_count": null,
|
97 |
+
"id": "8b3470a3",
|
98 |
"metadata": {
|
99 |
"lines_to_next_cell": 2
|
100 |
},
|
chat.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 0,
|
20 |
"tags": [
|
@@ -36,7 +36,7 @@
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
-
"id": "
|
40 |
"metadata": {
|
41 |
"lines_to_next_cell": 2
|
42 |
},
|
@@ -46,7 +46,7 @@
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
-
"id": "
|
50 |
"metadata": {},
|
51 |
"outputs": [],
|
52 |
"source": [
|
@@ -57,7 +57,7 @@
|
|
57 |
},
|
58 |
{
|
59 |
"cell_type": "markdown",
|
60 |
-
"id": "
|
61 |
"metadata": {},
|
62 |
"source": [
|
63 |
"Generic stateful Memory"
|
@@ -66,7 +66,7 @@
|
|
66 |
{
|
67 |
"cell_type": "code",
|
68 |
"execution_count": null,
|
69 |
-
"id": "
|
70 |
"metadata": {
|
71 |
"lines_to_next_cell": 1
|
72 |
},
|
@@ -78,7 +78,7 @@
|
|
78 |
{
|
79 |
"cell_type": "code",
|
80 |
"execution_count": null,
|
81 |
-
"id": "
|
82 |
"metadata": {
|
83 |
"lines_to_next_cell": 1
|
84 |
},
|
@@ -96,7 +96,7 @@
|
|
96 |
},
|
97 |
{
|
98 |
"cell_type": "markdown",
|
99 |
-
"id": "
|
100 |
"metadata": {},
|
101 |
"source": [
|
102 |
"Chat prompt with memory"
|
@@ -105,7 +105,7 @@
|
|
105 |
{
|
106 |
"cell_type": "code",
|
107 |
"execution_count": null,
|
108 |
-
"id": "
|
109 |
"metadata": {},
|
110 |
"outputs": [],
|
111 |
"source": [
|
@@ -119,7 +119,7 @@
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": null,
|
122 |
-
"id": "
|
123 |
"metadata": {},
|
124 |
"outputs": [],
|
125 |
"source": [
|
@@ -137,7 +137,7 @@
|
|
137 |
{
|
138 |
"cell_type": "code",
|
139 |
"execution_count": null,
|
140 |
-
"id": "
|
141 |
"metadata": {},
|
142 |
"outputs": [],
|
143 |
"source": [
|
@@ -155,7 +155,7 @@
|
|
155 |
{
|
156 |
"cell_type": "code",
|
157 |
"execution_count": null,
|
158 |
-
"id": "
|
159 |
"metadata": {},
|
160 |
"outputs": [],
|
161 |
"source": []
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "1ca7b759",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "cc3f2a69",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 0,
|
20 |
"tags": [
|
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
+
"id": "1ca0a1eb",
|
40 |
"metadata": {
|
41 |
"lines_to_next_cell": 2
|
42 |
},
|
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
+
"id": "f4ac1417",
|
50 |
"metadata": {},
|
51 |
"outputs": [],
|
52 |
"source": [
|
|
|
57 |
},
|
58 |
{
|
59 |
"cell_type": "markdown",
|
60 |
+
"id": "56c8ab3d",
|
61 |
"metadata": {},
|
62 |
"source": [
|
63 |
"Generic stateful Memory"
|
|
|
66 |
{
|
67 |
"cell_type": "code",
|
68 |
"execution_count": null,
|
69 |
+
"id": "7c3ffeaa",
|
70 |
"metadata": {
|
71 |
"lines_to_next_cell": 1
|
72 |
},
|
|
|
78 |
{
|
79 |
"cell_type": "code",
|
80 |
"execution_count": null,
|
81 |
+
"id": "c309a94f",
|
82 |
"metadata": {
|
83 |
"lines_to_next_cell": 1
|
84 |
},
|
|
|
96 |
},
|
97 |
{
|
98 |
"cell_type": "markdown",
|
99 |
+
"id": "4c9a82f1",
|
100 |
"metadata": {},
|
101 |
"source": [
|
102 |
"Chat prompt with memory"
|
|
|
105 |
{
|
106 |
"cell_type": "code",
|
107 |
"execution_count": null,
|
108 |
+
"id": "279179dd",
|
109 |
"metadata": {},
|
110 |
"outputs": [],
|
111 |
"source": [
|
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": null,
|
122 |
+
"id": "2d94b22d",
|
123 |
"metadata": {},
|
124 |
"outputs": [],
|
125 |
"source": [
|
|
|
137 |
{
|
138 |
"cell_type": "code",
|
139 |
"execution_count": null,
|
140 |
+
"id": "d77406cf",
|
141 |
"metadata": {},
|
142 |
"outputs": [],
|
143 |
"source": [
|
|
|
155 |
{
|
156 |
"cell_type": "code",
|
157 |
"execution_count": null,
|
158 |
+
"id": "bd255c7b",
|
159 |
"metadata": {},
|
160 |
"outputs": [],
|
161 |
"source": []
|
color.ipynb
CHANGED
@@ -3,17 +3,17 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
-
"id": "
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"Answer a math problem with code.\n",
|
@@ -23,7 +23,7 @@
|
|
23 |
{
|
24 |
"cell_type": "code",
|
25 |
"execution_count": null,
|
26 |
-
"id": "
|
27 |
"metadata": {},
|
28 |
"outputs": [],
|
29 |
"source": [
|
@@ -32,7 +32,7 @@
|
|
32 |
},
|
33 |
{
|
34 |
"cell_type": "markdown",
|
35 |
-
"id": "
|
36 |
"metadata": {},
|
37 |
"source": [
|
38 |
"Prompt that asks LLM for code from math."
|
@@ -41,7 +41,7 @@
|
|
41 |
{
|
42 |
"cell_type": "code",
|
43 |
"execution_count": null,
|
44 |
-
"id": "
|
45 |
"metadata": {
|
46 |
"lines_to_next_cell": 2
|
47 |
},
|
@@ -60,7 +60,7 @@
|
|
60 |
{
|
61 |
"cell_type": "code",
|
62 |
"execution_count": null,
|
63 |
-
"id": "
|
64 |
"metadata": {
|
65 |
"lines_to_next_cell": 2
|
66 |
},
|
@@ -76,7 +76,7 @@
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
-
"id": "
|
80 |
"metadata": {},
|
81 |
"outputs": [],
|
82 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "2f9d8993",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
+
"id": "c41f0994",
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"Answer a math problem with code.\n",
|
|
|
23 |
{
|
24 |
"cell_type": "code",
|
25 |
"execution_count": null,
|
26 |
+
"id": "ccc349e6",
|
27 |
"metadata": {},
|
28 |
"outputs": [],
|
29 |
"source": [
|
|
|
32 |
},
|
33 |
{
|
34 |
"cell_type": "markdown",
|
35 |
+
"id": "0af5e0ab",
|
36 |
"metadata": {},
|
37 |
"source": [
|
38 |
"Prompt that asks LLM for code from math."
|
|
|
41 |
{
|
42 |
"cell_type": "code",
|
43 |
"execution_count": null,
|
44 |
+
"id": "9063448e",
|
45 |
"metadata": {
|
46 |
"lines_to_next_cell": 2
|
47 |
},
|
|
|
60 |
{
|
61 |
"cell_type": "code",
|
62 |
"execution_count": null,
|
63 |
+
"id": "13e05a7c",
|
64 |
"metadata": {
|
65 |
"lines_to_next_cell": 2
|
66 |
},
|
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
+
"id": "37249892",
|
80 |
"metadata": {},
|
81 |
"outputs": [],
|
82 |
"source": [
|
gatsby.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
@@ -35,7 +35,7 @@
|
|
35 |
{
|
36 |
"cell_type": "code",
|
37 |
"execution_count": null,
|
38 |
-
"id": "
|
39 |
"metadata": {},
|
40 |
"outputs": [],
|
41 |
"source": [
|
@@ -46,7 +46,7 @@
|
|
46 |
},
|
47 |
{
|
48 |
"cell_type": "markdown",
|
49 |
-
"id": "
|
50 |
"metadata": {},
|
51 |
"source": [
|
52 |
"Load data with embeddings (computed beforehand)"
|
@@ -55,7 +55,7 @@
|
|
55 |
{
|
56 |
"cell_type": "code",
|
57 |
"execution_count": null,
|
58 |
-
"id": "
|
59 |
"metadata": {
|
60 |
"lines_to_next_cell": 1
|
61 |
},
|
@@ -67,7 +67,7 @@
|
|
67 |
},
|
68 |
{
|
69 |
"cell_type": "markdown",
|
70 |
-
"id": "
|
71 |
"metadata": {},
|
72 |
"source": [
|
73 |
"Fast KNN retieval prompt"
|
@@ -76,7 +76,7 @@
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
-
"id": "
|
80 |
"metadata": {
|
81 |
"lines_to_next_cell": 1
|
82 |
},
|
@@ -92,7 +92,7 @@
|
|
92 |
{
|
93 |
"cell_type": "code",
|
94 |
"execution_count": null,
|
95 |
-
"id": "
|
96 |
"metadata": {
|
97 |
"lines_to_next_cell": 1
|
98 |
},
|
@@ -107,7 +107,7 @@
|
|
107 |
{
|
108 |
"cell_type": "code",
|
109 |
"execution_count": null,
|
110 |
-
"id": "
|
111 |
"metadata": {},
|
112 |
"outputs": [],
|
113 |
"source": [
|
@@ -119,7 +119,7 @@
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": null,
|
122 |
-
"id": "
|
123 |
"metadata": {
|
124 |
"lines_to_next_cell": 2
|
125 |
},
|
@@ -129,7 +129,7 @@
|
|
129 |
{
|
130 |
"cell_type": "code",
|
131 |
"execution_count": null,
|
132 |
-
"id": "
|
133 |
"metadata": {},
|
134 |
"outputs": [],
|
135 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "b57f44dc",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "f675b525",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
|
|
35 |
{
|
36 |
"cell_type": "code",
|
37 |
"execution_count": null,
|
38 |
+
"id": "eab06e25",
|
39 |
"metadata": {},
|
40 |
"outputs": [],
|
41 |
"source": [
|
|
|
46 |
},
|
47 |
{
|
48 |
"cell_type": "markdown",
|
49 |
+
"id": "ad893c7e",
|
50 |
"metadata": {},
|
51 |
"source": [
|
52 |
"Load data with embeddings (computed beforehand)"
|
|
|
55 |
{
|
56 |
"cell_type": "code",
|
57 |
"execution_count": null,
|
58 |
+
"id": "c64cbf9f",
|
59 |
"metadata": {
|
60 |
"lines_to_next_cell": 1
|
61 |
},
|
|
|
67 |
},
|
68 |
{
|
69 |
"cell_type": "markdown",
|
70 |
+
"id": "20b8d756",
|
71 |
"metadata": {},
|
72 |
"source": [
|
73 |
"Fast KNN retieval prompt"
|
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
+
"id": "a786c893",
|
80 |
"metadata": {
|
81 |
"lines_to_next_cell": 1
|
82 |
},
|
|
|
92 |
{
|
93 |
"cell_type": "code",
|
94 |
"execution_count": null,
|
95 |
+
"id": "fac56e96",
|
96 |
"metadata": {
|
97 |
"lines_to_next_cell": 1
|
98 |
},
|
|
|
107 |
{
|
108 |
"cell_type": "code",
|
109 |
"execution_count": null,
|
110 |
+
"id": "4e46761b",
|
111 |
"metadata": {},
|
112 |
"outputs": [],
|
113 |
"source": [
|
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": null,
|
122 |
+
"id": "e9bafe2a",
|
123 |
"metadata": {
|
124 |
"lines_to_next_cell": 2
|
125 |
},
|
|
|
129 |
{
|
130 |
"cell_type": "code",
|
131 |
"execution_count": null,
|
132 |
+
"id": "913793a8",
|
133 |
"metadata": {},
|
134 |
"outputs": [],
|
135 |
"source": [
|
math_demo.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
@@ -35,7 +35,7 @@
|
|
35 |
{
|
36 |
"cell_type": "code",
|
37 |
"execution_count": null,
|
38 |
-
"id": "
|
39 |
"metadata": {},
|
40 |
"outputs": [],
|
41 |
"source": [
|
@@ -45,7 +45,7 @@
|
|
45 |
{
|
46 |
"cell_type": "code",
|
47 |
"execution_count": null,
|
48 |
-
"id": "
|
49 |
"metadata": {
|
50 |
"lines_to_next_cell": 1
|
51 |
},
|
@@ -60,7 +60,7 @@
|
|
60 |
{
|
61 |
"cell_type": "code",
|
62 |
"execution_count": null,
|
63 |
-
"id": "
|
64 |
"metadata": {
|
65 |
"lines_to_next_cell": 1
|
66 |
},
|
@@ -76,7 +76,7 @@
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
-
"id": "
|
80 |
"metadata": {},
|
81 |
"outputs": [],
|
82 |
"source": [
|
@@ -88,7 +88,7 @@
|
|
88 |
{
|
89 |
"cell_type": "code",
|
90 |
"execution_count": null,
|
91 |
-
"id": "
|
92 |
"metadata": {
|
93 |
"lines_to_next_cell": 0,
|
94 |
"tags": [
|
@@ -112,7 +112,7 @@
|
|
112 |
{
|
113 |
"cell_type": "code",
|
114 |
"execution_count": null,
|
115 |
-
"id": "
|
116 |
"metadata": {},
|
117 |
"outputs": [],
|
118 |
"source": []
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "a914a238",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "aa7b8a98",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
|
|
35 |
{
|
36 |
"cell_type": "code",
|
37 |
"execution_count": null,
|
38 |
+
"id": "1a34507a",
|
39 |
"metadata": {},
|
40 |
"outputs": [],
|
41 |
"source": [
|
|
|
45 |
{
|
46 |
"cell_type": "code",
|
47 |
"execution_count": null,
|
48 |
+
"id": "43cdbfc0",
|
49 |
"metadata": {
|
50 |
"lines_to_next_cell": 1
|
51 |
},
|
|
|
60 |
{
|
61 |
"cell_type": "code",
|
62 |
"execution_count": null,
|
63 |
+
"id": "14d6eb95",
|
64 |
"metadata": {
|
65 |
"lines_to_next_cell": 1
|
66 |
},
|
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
+
"id": "dac2ba43",
|
80 |
"metadata": {},
|
81 |
"outputs": [],
|
82 |
"source": [
|
|
|
88 |
{
|
89 |
"cell_type": "code",
|
90 |
"execution_count": null,
|
91 |
+
"id": "4a4f5bbf",
|
92 |
"metadata": {
|
93 |
"lines_to_next_cell": 0,
|
94 |
"tags": [
|
|
|
112 |
{
|
113 |
"cell_type": "code",
|
114 |
"execution_count": null,
|
115 |
+
"id": "a478587c",
|
116 |
"metadata": {},
|
117 |
"outputs": [],
|
118 |
"source": []
|
math_prompts.ipynb
CHANGED
@@ -3,17 +3,17 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
-
"id": "
|
17 |
"metadata": {
|
18 |
"lines_to_next_cell": 2
|
19 |
},
|
@@ -36,7 +36,7 @@
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
-
"id": "
|
40 |
"metadata": {},
|
41 |
"outputs": [],
|
42 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "0d50aaa6",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
+
"id": "2a70ac7d",
|
17 |
"metadata": {
|
18 |
"lines_to_next_cell": 2
|
19 |
},
|
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
+
"id": "9ff0f695",
|
40 |
"metadata": {},
|
41 |
"outputs": [],
|
42 |
"source": [
|
ner.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
@@ -36,7 +36,7 @@
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
-
"id": "
|
40 |
"metadata": {
|
41 |
"lines_to_next_cell": 1
|
42 |
},
|
@@ -48,7 +48,7 @@
|
|
48 |
{
|
49 |
"cell_type": "code",
|
50 |
"execution_count": null,
|
51 |
-
"id": "
|
52 |
"metadata": {
|
53 |
"lines_to_next_cell": 1
|
54 |
},
|
@@ -62,7 +62,7 @@
|
|
62 |
{
|
63 |
"cell_type": "code",
|
64 |
"execution_count": null,
|
65 |
-
"id": "
|
66 |
"metadata": {},
|
67 |
"outputs": [],
|
68 |
"source": [
|
@@ -76,7 +76,7 @@
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
-
"id": "
|
80 |
"metadata": {},
|
81 |
"outputs": [],
|
82 |
"source": [
|
@@ -88,7 +88,7 @@
|
|
88 |
{
|
89 |
"cell_type": "code",
|
90 |
"execution_count": null,
|
91 |
-
"id": "
|
92 |
"metadata": {},
|
93 |
"outputs": [],
|
94 |
"source": []
|
@@ -96,7 +96,7 @@
|
|
96 |
{
|
97 |
"cell_type": "code",
|
98 |
"execution_count": null,
|
99 |
-
"id": "
|
100 |
"metadata": {},
|
101 |
"outputs": [],
|
102 |
"source": [
|
@@ -110,7 +110,7 @@
|
|
110 |
{
|
111 |
"cell_type": "code",
|
112 |
"execution_count": null,
|
113 |
-
"id": "
|
114 |
"metadata": {},
|
115 |
"outputs": [],
|
116 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "8eccacc7",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "ebfe63f6",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
+
"id": "45dd8a11",
|
40 |
"metadata": {
|
41 |
"lines_to_next_cell": 1
|
42 |
},
|
|
|
48 |
{
|
49 |
"cell_type": "code",
|
50 |
"execution_count": null,
|
51 |
+
"id": "9ada6ebb",
|
52 |
"metadata": {
|
53 |
"lines_to_next_cell": 1
|
54 |
},
|
|
|
62 |
{
|
63 |
"cell_type": "code",
|
64 |
"execution_count": null,
|
65 |
+
"id": "f6873c42",
|
66 |
"metadata": {},
|
67 |
"outputs": [],
|
68 |
"source": [
|
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
+
"id": "a89fa41d",
|
80 |
"metadata": {},
|
81 |
"outputs": [],
|
82 |
"source": [
|
|
|
88 |
{
|
89 |
"cell_type": "code",
|
90 |
"execution_count": null,
|
91 |
+
"id": "3e8a0502",
|
92 |
"metadata": {},
|
93 |
"outputs": [],
|
94 |
"source": []
|
|
|
96 |
{
|
97 |
"cell_type": "code",
|
98 |
"execution_count": null,
|
99 |
+
"id": "634fb50b",
|
100 |
"metadata": {},
|
101 |
"outputs": [],
|
102 |
"source": [
|
|
|
110 |
{
|
111 |
"cell_type": "code",
|
112 |
"execution_count": null,
|
113 |
+
"id": "fa353224",
|
114 |
"metadata": {},
|
115 |
"outputs": [],
|
116 |
"source": [
|
pal.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2
|
20 |
},
|
@@ -32,7 +32,7 @@
|
|
32 |
{
|
33 |
"cell_type": "code",
|
34 |
"execution_count": null,
|
35 |
-
"id": "
|
36 |
"metadata": {
|
37 |
"lines_to_next_cell": 1
|
38 |
},
|
@@ -44,7 +44,7 @@
|
|
44 |
{
|
45 |
"cell_type": "code",
|
46 |
"execution_count": null,
|
47 |
-
"id": "
|
48 |
"metadata": {
|
49 |
"lines_to_next_cell": 1
|
50 |
},
|
@@ -58,7 +58,7 @@
|
|
58 |
{
|
59 |
"cell_type": "code",
|
60 |
"execution_count": null,
|
61 |
-
"id": "
|
62 |
"metadata": {
|
63 |
"lines_to_next_cell": 1
|
64 |
},
|
@@ -72,7 +72,7 @@
|
|
72 |
{
|
73 |
"cell_type": "code",
|
74 |
"execution_count": null,
|
75 |
-
"id": "
|
76 |
"metadata": {},
|
77 |
"outputs": [],
|
78 |
"source": [
|
@@ -83,7 +83,7 @@
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": null,
|
86 |
-
"id": "
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
@@ -96,7 +96,7 @@
|
|
96 |
{
|
97 |
"cell_type": "code",
|
98 |
"execution_count": null,
|
99 |
-
"id": "
|
100 |
"metadata": {},
|
101 |
"outputs": [],
|
102 |
"source": [
|
@@ -111,7 +111,7 @@
|
|
111 |
{
|
112 |
"cell_type": "code",
|
113 |
"execution_count": null,
|
114 |
-
"id": "
|
115 |
"metadata": {},
|
116 |
"outputs": [],
|
117 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "c0075889",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "033f7bd9",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2
|
20 |
},
|
|
|
32 |
{
|
33 |
"cell_type": "code",
|
34 |
"execution_count": null,
|
35 |
+
"id": "ada25bcd",
|
36 |
"metadata": {
|
37 |
"lines_to_next_cell": 1
|
38 |
},
|
|
|
44 |
{
|
45 |
"cell_type": "code",
|
46 |
"execution_count": null,
|
47 |
+
"id": "3249f5ac",
|
48 |
"metadata": {
|
49 |
"lines_to_next_cell": 1
|
50 |
},
|
|
|
58 |
{
|
59 |
"cell_type": "code",
|
60 |
"execution_count": null,
|
61 |
+
"id": "37f265c9",
|
62 |
"metadata": {
|
63 |
"lines_to_next_cell": 1
|
64 |
},
|
|
|
72 |
{
|
73 |
"cell_type": "code",
|
74 |
"execution_count": null,
|
75 |
+
"id": "e767c1eb",
|
76 |
"metadata": {},
|
77 |
"outputs": [],
|
78 |
"source": [
|
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": null,
|
86 |
+
"id": "f2a4f241",
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
|
|
96 |
{
|
97 |
"cell_type": "code",
|
98 |
"execution_count": null,
|
99 |
+
"id": "c22e7837",
|
100 |
"metadata": {},
|
101 |
"outputs": [],
|
102 |
"source": [
|
|
|
111 |
{
|
112 |
"cell_type": "code",
|
113 |
"execution_count": null,
|
114 |
+
"id": "8790a65e",
|
115 |
"metadata": {},
|
116 |
"outputs": [],
|
117 |
"source": [
|
parallel.ipynb
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {
|
8 |
"lines_to_next_cell": 2
|
9 |
},
|
10 |
"outputs": [],
|
11 |
"source": [
|
12 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
13 |
-
"!git clone
|
14 |
]
|
15 |
}
|
16 |
],
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "2701914a",
|
7 |
"metadata": {
|
8 |
"lines_to_next_cell": 2
|
9 |
},
|
10 |
"outputs": [],
|
11 |
"source": [
|
12 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
13 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
14 |
]
|
15 |
}
|
16 |
],
|
process.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
@@ -24,19 +24,19 @@
|
|
24 |
{
|
25 |
"cell_type": "code",
|
26 |
"execution_count": null,
|
27 |
-
"id": "
|
28 |
"metadata": {},
|
29 |
"outputs": [],
|
30 |
"source": [
|
31 |
"print(\"!pip install -q git+https://github.com/srush/MiniChain\")\n",
|
32 |
-
"print(\"!git clone
|
33 |
"print()"
|
34 |
]
|
35 |
},
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
-
"id": "
|
40 |
"metadata": {},
|
41 |
"outputs": [],
|
42 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "23ebf796",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "1a08de04",
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
|
|
24 |
{
|
25 |
"cell_type": "code",
|
26 |
"execution_count": null,
|
27 |
+
"id": "a7532406",
|
28 |
"metadata": {},
|
29 |
"outputs": [],
|
30 |
"source": [
|
31 |
"print(\"!pip install -q git+https://github.com/srush/MiniChain\")\n",
|
32 |
+
"print(\"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . \")\n",
|
33 |
"print()"
|
34 |
]
|
35 |
},
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
+
"id": "9cf2aac4",
|
40 |
"metadata": {},
|
41 |
"outputs": [],
|
42 |
"source": [
|
process.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import sys
|
2 |
|
3 |
print("!pip install -q git+https://github.com/srush/MiniChain")
|
4 |
-
print("!git clone
|
5 |
print()
|
6 |
|
7 |
for l in sys.stdin:
|
|
|
1 |
import sys
|
2 |
|
3 |
print("!pip install -q git+https://github.com/srush/MiniChain")
|
4 |
+
print("!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . ")
|
5 |
print()
|
6 |
|
7 |
for l in sys.stdin:
|
qa.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
@@ -35,7 +35,7 @@
|
|
35 |
{
|
36 |
"cell_type": "code",
|
37 |
"execution_count": null,
|
38 |
-
"id": "
|
39 |
"metadata": {},
|
40 |
"outputs": [],
|
41 |
"source": [
|
@@ -47,7 +47,7 @@
|
|
47 |
},
|
48 |
{
|
49 |
"cell_type": "markdown",
|
50 |
-
"id": "
|
51 |
"metadata": {},
|
52 |
"source": [
|
53 |
"We use Hugging Face Datasets as the database by assigning\n",
|
@@ -57,7 +57,7 @@
|
|
57 |
{
|
58 |
"cell_type": "code",
|
59 |
"execution_count": null,
|
60 |
-
"id": "
|
61 |
"metadata": {},
|
62 |
"outputs": [],
|
63 |
"source": [
|
@@ -67,7 +67,7 @@
|
|
67 |
},
|
68 |
{
|
69 |
"cell_type": "markdown",
|
70 |
-
"id": "
|
71 |
"metadata": {},
|
72 |
"source": [
|
73 |
"Fast KNN retieval prompt"
|
@@ -76,7 +76,7 @@
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
-
"id": "
|
80 |
"metadata": {
|
81 |
"lines_to_next_cell": 1
|
82 |
},
|
@@ -92,7 +92,7 @@
|
|
92 |
{
|
93 |
"cell_type": "code",
|
94 |
"execution_count": null,
|
95 |
-
"id": "
|
96 |
"metadata": {
|
97 |
"lines_to_next_cell": 1
|
98 |
},
|
@@ -107,7 +107,7 @@
|
|
107 |
{
|
108 |
"cell_type": "code",
|
109 |
"execution_count": null,
|
110 |
-
"id": "
|
111 |
"metadata": {},
|
112 |
"outputs": [],
|
113 |
"source": [
|
@@ -119,7 +119,7 @@
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": null,
|
122 |
-
"id": "
|
123 |
"metadata": {},
|
124 |
"outputs": [],
|
125 |
"source": []
|
@@ -127,7 +127,7 @@
|
|
127 |
{
|
128 |
"cell_type": "code",
|
129 |
"execution_count": null,
|
130 |
-
"id": "
|
131 |
"metadata": {},
|
132 |
"outputs": [],
|
133 |
"source": [
|
@@ -141,7 +141,7 @@
|
|
141 |
{
|
142 |
"cell_type": "code",
|
143 |
"execution_count": null,
|
144 |
-
"id": "
|
145 |
"metadata": {
|
146 |
"lines_to_next_cell": 2
|
147 |
},
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "1f7e3a8e",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "49443595",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 2,
|
20 |
"tags": [
|
|
|
35 |
{
|
36 |
"cell_type": "code",
|
37 |
"execution_count": null,
|
38 |
+
"id": "f5183ea7",
|
39 |
"metadata": {},
|
40 |
"outputs": [],
|
41 |
"source": [
|
|
|
47 |
},
|
48 |
{
|
49 |
"cell_type": "markdown",
|
50 |
+
"id": "2bf59f0d",
|
51 |
"metadata": {},
|
52 |
"source": [
|
53 |
"We use Hugging Face Datasets as the database by assigning\n",
|
|
|
57 |
{
|
58 |
"cell_type": "code",
|
59 |
"execution_count": null,
|
60 |
+
"id": "f371a85e",
|
61 |
"metadata": {},
|
62 |
"outputs": [],
|
63 |
"source": [
|
|
|
67 |
},
|
68 |
{
|
69 |
"cell_type": "markdown",
|
70 |
+
"id": "a1099002",
|
71 |
"metadata": {},
|
72 |
"source": [
|
73 |
"Fast KNN retieval prompt"
|
|
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
"execution_count": null,
|
79 |
+
"id": "6881ae0e",
|
80 |
"metadata": {
|
81 |
"lines_to_next_cell": 1
|
82 |
},
|
|
|
92 |
{
|
93 |
"cell_type": "code",
|
94 |
"execution_count": null,
|
95 |
+
"id": "59cc1355",
|
96 |
"metadata": {
|
97 |
"lines_to_next_cell": 1
|
98 |
},
|
|
|
107 |
{
|
108 |
"cell_type": "code",
|
109 |
"execution_count": null,
|
110 |
+
"id": "cb2f1101",
|
111 |
"metadata": {},
|
112 |
"outputs": [],
|
113 |
"source": [
|
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": null,
|
122 |
+
"id": "5f70bac7",
|
123 |
"metadata": {},
|
124 |
"outputs": [],
|
125 |
"source": []
|
|
|
127 |
{
|
128 |
"cell_type": "code",
|
129 |
"execution_count": null,
|
130 |
+
"id": "abdfcd87",
|
131 |
"metadata": {},
|
132 |
"outputs": [],
|
133 |
"source": [
|
|
|
141 |
{
|
142 |
"cell_type": "code",
|
143 |
"execution_count": null,
|
144 |
+
"id": "ddce3ec3",
|
145 |
"metadata": {
|
146 |
"lines_to_next_cell": 2
|
147 |
},
|
selfask.ipynb
CHANGED
@@ -3,20 +3,20 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {
|
8 |
"lines_to_next_cell": 2
|
9 |
},
|
10 |
"outputs": [],
|
11 |
"source": [
|
12 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
13 |
-
"!git clone
|
14 |
]
|
15 |
},
|
16 |
{
|
17 |
"cell_type": "code",
|
18 |
"execution_count": null,
|
19 |
-
"id": "
|
20 |
"metadata": {
|
21 |
"lines_to_next_cell": 2
|
22 |
},
|
@@ -34,7 +34,7 @@
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
-
"id": "
|
38 |
"metadata": {},
|
39 |
"outputs": [],
|
40 |
"source": [
|
@@ -46,7 +46,7 @@
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
-
"id": "
|
50 |
"metadata": {},
|
51 |
"outputs": [],
|
52 |
"source": [
|
@@ -61,7 +61,7 @@
|
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
"execution_count": null,
|
64 |
-
"id": "
|
65 |
"metadata": {
|
66 |
"lines_to_next_cell": 1
|
67 |
},
|
@@ -82,7 +82,7 @@
|
|
82 |
{
|
83 |
"cell_type": "code",
|
84 |
"execution_count": null,
|
85 |
-
"id": "
|
86 |
"metadata": {
|
87 |
"lines_to_next_cell": 1
|
88 |
},
|
@@ -101,7 +101,7 @@
|
|
101 |
{
|
102 |
"cell_type": "code",
|
103 |
"execution_count": null,
|
104 |
-
"id": "
|
105 |
"metadata": {},
|
106 |
"outputs": [],
|
107 |
"source": [
|
@@ -116,7 +116,7 @@
|
|
116 |
{
|
117 |
"cell_type": "code",
|
118 |
"execution_count": null,
|
119 |
-
"id": "
|
120 |
"metadata": {},
|
121 |
"outputs": [],
|
122 |
"source": [
|
@@ -133,7 +133,7 @@
|
|
133 |
{
|
134 |
"cell_type": "code",
|
135 |
"execution_count": null,
|
136 |
-
"id": "
|
137 |
"metadata": {},
|
138 |
"outputs": [],
|
139 |
"source": []
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "e9c5f0df",
|
7 |
"metadata": {
|
8 |
"lines_to_next_cell": 2
|
9 |
},
|
10 |
"outputs": [],
|
11 |
"source": [
|
12 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
13 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
14 |
]
|
15 |
},
|
16 |
{
|
17 |
"cell_type": "code",
|
18 |
"execution_count": null,
|
19 |
+
"id": "56932926",
|
20 |
"metadata": {
|
21 |
"lines_to_next_cell": 2
|
22 |
},
|
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
+
"id": "43d24799",
|
38 |
"metadata": {},
|
39 |
"outputs": [],
|
40 |
"source": [
|
|
|
46 |
{
|
47 |
"cell_type": "code",
|
48 |
"execution_count": null,
|
49 |
+
"id": "506b8e41",
|
50 |
"metadata": {},
|
51 |
"outputs": [],
|
52 |
"source": [
|
|
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
"execution_count": null,
|
64 |
+
"id": "fb5fdf8e",
|
65 |
"metadata": {
|
66 |
"lines_to_next_cell": 1
|
67 |
},
|
|
|
82 |
{
|
83 |
"cell_type": "code",
|
84 |
"execution_count": null,
|
85 |
+
"id": "f2d66476",
|
86 |
"metadata": {
|
87 |
"lines_to_next_cell": 1
|
88 |
},
|
|
|
101 |
{
|
102 |
"cell_type": "code",
|
103 |
"execution_count": null,
|
104 |
+
"id": "e41d7a75",
|
105 |
"metadata": {},
|
106 |
"outputs": [],
|
107 |
"source": [
|
|
|
116 |
{
|
117 |
"cell_type": "code",
|
118 |
"execution_count": null,
|
119 |
+
"id": "e6e4b06f",
|
120 |
"metadata": {},
|
121 |
"outputs": [],
|
122 |
"source": [
|
|
|
133 |
{
|
134 |
"cell_type": "code",
|
135 |
"execution_count": null,
|
136 |
+
"id": "6afd60de",
|
137 |
"metadata": {},
|
138 |
"outputs": [],
|
139 |
"source": []
|
show.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "d2e411b0",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "bd17882b",
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
stats.ipynb
CHANGED
@@ -3,20 +3,20 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {
|
8 |
"lines_to_next_cell": 2
|
9 |
},
|
10 |
"outputs": [],
|
11 |
"source": [
|
12 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
13 |
-
"!git clone
|
14 |
]
|
15 |
},
|
16 |
{
|
17 |
"cell_type": "code",
|
18 |
"execution_count": null,
|
19 |
-
"id": "
|
20 |
"metadata": {
|
21 |
"lines_to_next_cell": 2
|
22 |
},
|
@@ -34,7 +34,7 @@
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
-
"id": "
|
38 |
"metadata": {
|
39 |
"lines_to_next_cell": 1
|
40 |
},
|
@@ -48,7 +48,7 @@
|
|
48 |
},
|
49 |
{
|
50 |
"cell_type": "markdown",
|
51 |
-
"id": "
|
52 |
"metadata": {},
|
53 |
"source": [
|
54 |
"Data specification"
|
@@ -57,7 +57,7 @@
|
|
57 |
{
|
58 |
"cell_type": "code",
|
59 |
"execution_count": null,
|
60 |
-
"id": "
|
61 |
"metadata": {},
|
62 |
"outputs": [],
|
63 |
"source": [
|
@@ -80,7 +80,7 @@
|
|
80 |
{
|
81 |
"cell_type": "code",
|
82 |
"execution_count": null,
|
83 |
-
"id": "
|
84 |
"metadata": {},
|
85 |
"outputs": [],
|
86 |
"source": [
|
@@ -93,7 +93,7 @@
|
|
93 |
{
|
94 |
"cell_type": "code",
|
95 |
"execution_count": null,
|
96 |
-
"id": "
|
97 |
"metadata": {
|
98 |
"lines_to_next_cell": 2
|
99 |
},
|
@@ -112,7 +112,7 @@
|
|
112 |
},
|
113 |
{
|
114 |
"cell_type": "markdown",
|
115 |
-
"id": "
|
116 |
"metadata": {},
|
117 |
"source": [
|
118 |
"ExtractionPrompt().show({\"passage\": \"Harden had 10 rebounds.\"},\n",
|
@@ -121,7 +121,7 @@
|
|
121 |
},
|
122 |
{
|
123 |
"cell_type": "markdown",
|
124 |
-
"id": "
|
125 |
"metadata": {},
|
126 |
"source": [
|
127 |
"# View the run log."
|
@@ -129,7 +129,7 @@
|
|
129 |
},
|
130 |
{
|
131 |
"cell_type": "markdown",
|
132 |
-
"id": "
|
133 |
"metadata": {},
|
134 |
"source": [
|
135 |
"minichain.show_log(\"bash.log\")"
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "247c85dd",
|
7 |
"metadata": {
|
8 |
"lines_to_next_cell": 2
|
9 |
},
|
10 |
"outputs": [],
|
11 |
"source": [
|
12 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
13 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
14 |
]
|
15 |
},
|
16 |
{
|
17 |
"cell_type": "code",
|
18 |
"execution_count": null,
|
19 |
+
"id": "d36498d1",
|
20 |
"metadata": {
|
21 |
"lines_to_next_cell": 2
|
22 |
},
|
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
+
"id": "e894e4fb",
|
38 |
"metadata": {
|
39 |
"lines_to_next_cell": 1
|
40 |
},
|
|
|
48 |
},
|
49 |
{
|
50 |
"cell_type": "markdown",
|
51 |
+
"id": "6ac1ff70",
|
52 |
"metadata": {},
|
53 |
"source": [
|
54 |
"Data specification"
|
|
|
57 |
{
|
58 |
"cell_type": "code",
|
59 |
"execution_count": null,
|
60 |
+
"id": "64a00e69",
|
61 |
"metadata": {},
|
62 |
"outputs": [],
|
63 |
"source": [
|
|
|
80 |
{
|
81 |
"cell_type": "code",
|
82 |
"execution_count": null,
|
83 |
+
"id": "35e0ed85",
|
84 |
"metadata": {},
|
85 |
"outputs": [],
|
86 |
"source": [
|
|
|
93 |
{
|
94 |
"cell_type": "code",
|
95 |
"execution_count": null,
|
96 |
+
"id": "7241bdc6",
|
97 |
"metadata": {
|
98 |
"lines_to_next_cell": 2
|
99 |
},
|
|
|
112 |
},
|
113 |
{
|
114 |
"cell_type": "markdown",
|
115 |
+
"id": "18ed1b96",
|
116 |
"metadata": {},
|
117 |
"source": [
|
118 |
"ExtractionPrompt().show({\"passage\": \"Harden had 10 rebounds.\"},\n",
|
|
|
121 |
},
|
122 |
{
|
123 |
"cell_type": "markdown",
|
124 |
+
"id": "02c96e7d",
|
125 |
"metadata": {},
|
126 |
"source": [
|
127 |
"# View the run log."
|
|
|
129 |
},
|
130 |
{
|
131 |
"cell_type": "markdown",
|
132 |
+
"id": "0ea427dd",
|
133 |
"metadata": {},
|
134 |
"source": [
|
135 |
"minichain.show_log(\"bash.log\")"
|
story.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
@@ -24,7 +24,7 @@
|
|
24 |
{
|
25 |
"cell_type": "code",
|
26 |
"execution_count": null,
|
27 |
-
"id": "
|
28 |
"metadata": {},
|
29 |
"outputs": [],
|
30 |
"source": [
|
@@ -36,7 +36,7 @@
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
-
"id": "
|
40 |
"metadata": {
|
41 |
"lines_to_next_cell": 2
|
42 |
},
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "1a916d9f",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "72eb4abe",
|
18 |
"metadata": {},
|
19 |
"outputs": [],
|
20 |
"source": [
|
|
|
24 |
{
|
25 |
"cell_type": "code",
|
26 |
"execution_count": null,
|
27 |
+
"id": "34d78edc",
|
28 |
"metadata": {},
|
29 |
"outputs": [],
|
30 |
"source": [
|
|
|
36 |
{
|
37 |
"cell_type": "code",
|
38 |
"execution_count": null,
|
39 |
+
"id": "00dcaee2",
|
40 |
"metadata": {
|
41 |
"lines_to_next_cell": 2
|
42 |
},
|
summary.ipynb
CHANGED
@@ -3,17 +3,17 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
-
"id": "
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"Summarize a long document by chunking and summarizing parts. Uses\n",
|
@@ -24,7 +24,7 @@
|
|
24 |
{
|
25 |
"cell_type": "code",
|
26 |
"execution_count": null,
|
27 |
-
"id": "
|
28 |
"metadata": {},
|
29 |
"outputs": [],
|
30 |
"source": [
|
@@ -34,7 +34,7 @@
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
-
"id": "
|
38 |
"metadata": {},
|
39 |
"outputs": [],
|
40 |
"source": [
|
@@ -43,7 +43,7 @@
|
|
43 |
},
|
44 |
{
|
45 |
"cell_type": "markdown",
|
46 |
-
"id": "
|
47 |
"metadata": {
|
48 |
"lines_to_next_cell": 2
|
49 |
},
|
@@ -54,7 +54,7 @@
|
|
54 |
{
|
55 |
"cell_type": "code",
|
56 |
"execution_count": null,
|
57 |
-
"id": "
|
58 |
"metadata": {},
|
59 |
"outputs": [],
|
60 |
"source": [
|
@@ -65,7 +65,7 @@
|
|
65 |
{
|
66 |
"cell_type": "code",
|
67 |
"execution_count": null,
|
68 |
-
"id": "
|
69 |
"metadata": {},
|
70 |
"outputs": [],
|
71 |
"source": [
|
@@ -83,7 +83,7 @@
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": null,
|
86 |
-
"id": "
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
@@ -101,7 +101,7 @@
|
|
101 |
{
|
102 |
"cell_type": "code",
|
103 |
"execution_count": null,
|
104 |
-
"id": "
|
105 |
"metadata": {
|
106 |
"tags": [
|
107 |
"hide_inp"
|
@@ -118,7 +118,7 @@
|
|
118 |
{
|
119 |
"cell_type": "code",
|
120 |
"execution_count": null,
|
121 |
-
"id": "
|
122 |
"metadata": {},
|
123 |
"outputs": [],
|
124 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "49192d35",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
+
"id": "bf1da24c",
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"Summarize a long document by chunking and summarizing parts. Uses\n",
|
|
|
24 |
{
|
25 |
"cell_type": "code",
|
26 |
"execution_count": null,
|
27 |
+
"id": "cce74ed6",
|
28 |
"metadata": {},
|
29 |
"outputs": [],
|
30 |
"source": [
|
|
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
"execution_count": null,
|
37 |
+
"id": "f25908e4",
|
38 |
"metadata": {},
|
39 |
"outputs": [],
|
40 |
"source": [
|
|
|
43 |
},
|
44 |
{
|
45 |
"cell_type": "markdown",
|
46 |
+
"id": "174e7a29",
|
47 |
"metadata": {
|
48 |
"lines_to_next_cell": 2
|
49 |
},
|
|
|
54 |
{
|
55 |
"cell_type": "code",
|
56 |
"execution_count": null,
|
57 |
+
"id": "12b26a26",
|
58 |
"metadata": {},
|
59 |
"outputs": [],
|
60 |
"source": [
|
|
|
65 |
{
|
66 |
"cell_type": "code",
|
67 |
"execution_count": null,
|
68 |
+
"id": "98747659",
|
69 |
"metadata": {},
|
70 |
"outputs": [],
|
71 |
"source": [
|
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": null,
|
86 |
+
"id": "e0ccfddc",
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
|
|
101 |
{
|
102 |
"cell_type": "code",
|
103 |
"execution_count": null,
|
104 |
+
"id": "e3ffd907",
|
105 |
"metadata": {
|
106 |
"tags": [
|
107 |
"hide_inp"
|
|
|
118 |
{
|
119 |
"cell_type": "code",
|
120 |
"execution_count": null,
|
121 |
+
"id": "52be8068",
|
122 |
"metadata": {},
|
123 |
"outputs": [],
|
124 |
"source": [
|
temp
CHANGED
Binary files a/temp and b/temp differ
|
|
temp.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 1
|
20 |
},
|
@@ -29,7 +29,7 @@
|
|
29 |
{
|
30 |
"cell_type": "code",
|
31 |
"execution_count": null,
|
32 |
-
"id": "
|
33 |
"metadata": {
|
34 |
"lines_to_next_cell": 1
|
35 |
},
|
@@ -44,7 +44,7 @@
|
|
44 |
{
|
45 |
"cell_type": "code",
|
46 |
"execution_count": null,
|
47 |
-
"id": "
|
48 |
"metadata": {},
|
49 |
"outputs": [],
|
50 |
"source": [
|
@@ -58,14 +58,14 @@
|
|
58 |
{
|
59 |
"cell_type": "code",
|
60 |
"execution_count": null,
|
61 |
-
"id": "
|
62 |
"metadata": {},
|
63 |
"outputs": [],
|
64 |
"source": []
|
65 |
},
|
66 |
{
|
67 |
"cell_type": "markdown",
|
68 |
-
"id": "
|
69 |
"metadata": {},
|
70 |
"source": [
|
71 |
"class StatType(Enum):\n",
|
@@ -76,7 +76,7 @@
|
|
76 |
},
|
77 |
{
|
78 |
"cell_type": "markdown",
|
79 |
-
"id": "
|
80 |
"metadata": {},
|
81 |
"source": [
|
82 |
"@dataclass\n",
|
@@ -87,7 +87,7 @@
|
|
87 |
},
|
88 |
{
|
89 |
"cell_type": "markdown",
|
90 |
-
"id": "
|
91 |
"metadata": {},
|
92 |
"source": [
|
93 |
"@dataclass\n",
|
@@ -99,7 +99,7 @@
|
|
99 |
{
|
100 |
"cell_type": "code",
|
101 |
"execution_count": null,
|
102 |
-
"id": "
|
103 |
"metadata": {
|
104 |
"lines_to_next_cell": 1
|
105 |
},
|
@@ -112,7 +112,7 @@
|
|
112 |
},
|
113 |
{
|
114 |
"cell_type": "markdown",
|
115 |
-
"id": "
|
116 |
"metadata": {},
|
117 |
"source": [
|
118 |
"print(T().show({\"passage\": \"hello\"}, '[{\"player\": \"Harden\", \"stats\": {\"value\": 10, \"stat\": 2}}]'))"
|
@@ -121,7 +121,7 @@
|
|
121 |
{
|
122 |
"cell_type": "code",
|
123 |
"execution_count": null,
|
124 |
-
"id": "
|
125 |
"metadata": {},
|
126 |
"outputs": [],
|
127 |
"source": [
|
@@ -132,7 +132,7 @@
|
|
132 |
},
|
133 |
{
|
134 |
"cell_type": "markdown",
|
135 |
-
"id": "
|
136 |
"metadata": {
|
137 |
"lines_to_next_cell": 2
|
138 |
},
|
@@ -145,7 +145,7 @@
|
|
145 |
},
|
146 |
{
|
147 |
"cell_type": "markdown",
|
148 |
-
"id": "
|
149 |
"metadata": {},
|
150 |
"source": [
|
151 |
"def walk(x):\n",
|
@@ -167,7 +167,7 @@
|
|
167 |
},
|
168 |
{
|
169 |
"cell_type": "markdown",
|
170 |
-
"id": "
|
171 |
"metadata": {},
|
172 |
"source": [
|
173 |
"print(walk(B))"
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "7fd6623a",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "a21a1e9e",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 1
|
20 |
},
|
|
|
29 |
{
|
30 |
"cell_type": "code",
|
31 |
"execution_count": null,
|
32 |
+
"id": "fb3ef48a",
|
33 |
"metadata": {
|
34 |
"lines_to_next_cell": 1
|
35 |
},
|
|
|
44 |
{
|
45 |
"cell_type": "code",
|
46 |
"execution_count": null,
|
47 |
+
"id": "cf56319f",
|
48 |
"metadata": {},
|
49 |
"outputs": [],
|
50 |
"source": [
|
|
|
58 |
{
|
59 |
"cell_type": "code",
|
60 |
"execution_count": null,
|
61 |
+
"id": "0d9cbb08",
|
62 |
"metadata": {},
|
63 |
"outputs": [],
|
64 |
"source": []
|
65 |
},
|
66 |
{
|
67 |
"cell_type": "markdown",
|
68 |
+
"id": "37172e82",
|
69 |
"metadata": {},
|
70 |
"source": [
|
71 |
"class StatType(Enum):\n",
|
|
|
76 |
},
|
77 |
{
|
78 |
"cell_type": "markdown",
|
79 |
+
"id": "6e7d33f8",
|
80 |
"metadata": {},
|
81 |
"source": [
|
82 |
"@dataclass\n",
|
|
|
87 |
},
|
88 |
{
|
89 |
"cell_type": "markdown",
|
90 |
+
"id": "06fc9f84",
|
91 |
"metadata": {},
|
92 |
"source": [
|
93 |
"@dataclass\n",
|
|
|
99 |
{
|
100 |
"cell_type": "code",
|
101 |
"execution_count": null,
|
102 |
+
"id": "93ad4d35",
|
103 |
"metadata": {
|
104 |
"lines_to_next_cell": 1
|
105 |
},
|
|
|
112 |
},
|
113 |
{
|
114 |
"cell_type": "markdown",
|
115 |
+
"id": "94b98c00",
|
116 |
"metadata": {},
|
117 |
"source": [
|
118 |
"print(T().show({\"passage\": \"hello\"}, '[{\"player\": \"Harden\", \"stats\": {\"value\": 10, \"stat\": 2}}]'))"
|
|
|
121 |
{
|
122 |
"cell_type": "code",
|
123 |
"execution_count": null,
|
124 |
+
"id": "f40d0cf2",
|
125 |
"metadata": {},
|
126 |
"outputs": [],
|
127 |
"source": [
|
|
|
132 |
},
|
133 |
{
|
134 |
"cell_type": "markdown",
|
135 |
+
"id": "0870b752",
|
136 |
"metadata": {
|
137 |
"lines_to_next_cell": 2
|
138 |
},
|
|
|
145 |
},
|
146 |
{
|
147 |
"cell_type": "markdown",
|
148 |
+
"id": "75aeafef",
|
149 |
"metadata": {},
|
150 |
"source": [
|
151 |
"def walk(x):\n",
|
|
|
167 |
},
|
168 |
{
|
169 |
"cell_type": "markdown",
|
170 |
+
"id": "adc65d98",
|
171 |
"metadata": {},
|
172 |
"source": [
|
173 |
"print(walk(B))"
|
temp.log
CHANGED
Binary files a/temp.log and b/temp.log differ
|
|
test.ipynb
CHANGED
@@ -3,18 +3,18 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
-
"!git clone
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
-
"id": "
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 1
|
20 |
},
|
@@ -27,7 +27,7 @@
|
|
27 |
{
|
28 |
"cell_type": "code",
|
29 |
"execution_count": null,
|
30 |
-
"id": "
|
31 |
"metadata": {
|
32 |
"lines_to_next_cell": 1
|
33 |
},
|
@@ -41,7 +41,7 @@
|
|
41 |
{
|
42 |
"cell_type": "code",
|
43 |
"execution_count": null,
|
44 |
-
"id": "
|
45 |
"metadata": {
|
46 |
"lines_to_next_cell": 1
|
47 |
},
|
@@ -57,7 +57,7 @@
|
|
57 |
{
|
58 |
"cell_type": "code",
|
59 |
"execution_count": null,
|
60 |
-
"id": "
|
61 |
"metadata": {},
|
62 |
"outputs": [],
|
63 |
"source": [
|
@@ -69,7 +69,7 @@
|
|
69 |
{
|
70 |
"cell_type": "code",
|
71 |
"execution_count": null,
|
72 |
-
"id": "
|
73 |
"metadata": {},
|
74 |
"outputs": [],
|
75 |
"source": [
|
@@ -81,7 +81,7 @@
|
|
81 |
{
|
82 |
"cell_type": "code",
|
83 |
"execution_count": null,
|
84 |
-
"id": "
|
85 |
"metadata": {},
|
86 |
"outputs": [],
|
87 |
"source": [
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": null,
|
6 |
+
"id": "6421765c",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
10 |
"!pip install -q git+https://github.com/srush/MiniChain\n",
|
11 |
+
"!git clone https://github.com/srush/MiniChain; cp -fr MiniChain/examples/* . "
|
12 |
]
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": null,
|
17 |
+
"id": "0f477ab9",
|
18 |
"metadata": {
|
19 |
"lines_to_next_cell": 1
|
20 |
},
|
|
|
27 |
{
|
28 |
"cell_type": "code",
|
29 |
"execution_count": null,
|
30 |
+
"id": "e216e2c9",
|
31 |
"metadata": {
|
32 |
"lines_to_next_cell": 1
|
33 |
},
|
|
|
41 |
{
|
42 |
"cell_type": "code",
|
43 |
"execution_count": null,
|
44 |
+
"id": "0fb645c4",
|
45 |
"metadata": {
|
46 |
"lines_to_next_cell": 1
|
47 |
},
|
|
|
57 |
{
|
58 |
"cell_type": "code",
|
59 |
"execution_count": null,
|
60 |
+
"id": "fe555cf0",
|
61 |
"metadata": {},
|
62 |
"outputs": [],
|
63 |
"source": [
|
|
|
69 |
{
|
70 |
"cell_type": "code",
|
71 |
"execution_count": null,
|
72 |
+
"id": "04f06977",
|
73 |
"metadata": {},
|
74 |
"outputs": [],
|
75 |
"source": [
|
|
|
81 |
{
|
82 |
"cell_type": "code",
|
83 |
"execution_count": null,
|
84 |
+
"id": "e1b48e0f",
|
85 |
"metadata": {},
|
86 |
"outputs": [],
|
87 |
"source": [
|