|
23 | 23 | }, |
24 | 24 | { |
25 | 25 | "cell_type": "code", |
26 | | - "execution_count": 1, |
| 26 | + "execution_count": null, |
27 | 27 | "id": "f3f4fa13", |
28 | 28 | "metadata": {}, |
29 | 29 | "outputs": [], |
|
44 | 44 | }, |
45 | 45 | { |
46 | 46 | "cell_type": "code", |
47 | | - "execution_count": 2, |
| 47 | + "execution_count": null, |
48 | 48 | "id": "e60584fa", |
49 | 49 | "metadata": {}, |
50 | 50 | "outputs": [], |
|
64 | 64 | }, |
65 | 65 | { |
66 | 66 | "cell_type": "code", |
67 | | - "execution_count": 8, |
| 67 | + "execution_count": null, |
68 | 68 | "id": "2cb5ce9b", |
69 | 69 | "metadata": {}, |
70 | | - "outputs": [ |
71 | | - { |
72 | | - "name": "stdout", |
73 | | - "output_type": "stream", |
74 | | - "text": [ |
75 | | - "Monitoring is already on!\n", |
76 | | - "To stop it, call `stop_monitoring`.\n" |
77 | | - ] |
78 | | - } |
79 | | - ], |
| 70 | + "outputs": [], |
80 | 71 | "source": [ |
81 | 72 | "openai_monitor.start_monitoring()" |
82 | 73 | ] |
|
91 | 82 | }, |
92 | 83 | { |
93 | 84 | "cell_type": "code", |
94 | | - "execution_count": 4, |
| 85 | + "execution_count": null, |
95 | 86 | "id": "fb648049-00bd-447c-8feb-ecf794d45ba7", |
96 | 87 | "metadata": {}, |
97 | 88 | "outputs": [], |
|
103 | 94 | }, |
104 | 95 | { |
105 | 96 | "cell_type": "code", |
106 | | - "execution_count": 5, |
| 97 | + "execution_count": null, |
107 | 98 | "id": "7d1e8c74-c667-44a7-b8ea-8f5b83049ea7", |
108 | 99 | "metadata": {}, |
109 | | - "outputs": [ |
110 | | - { |
111 | | - "name": "stdout", |
112 | | - "output_type": "stream", |
113 | | - "text": [ |
114 | | - "Data published!\n" |
115 | | - ] |
116 | | - } |
117 | | - ], |
| 100 | + "outputs": [], |
118 | 101 | "source": [ |
119 | 102 | "completion = openai.ChatCompletion.create(\n", |
120 | 103 | " model=\"gpt-3.5-turbo\",\n", |
|
127 | 110 | }, |
128 | 111 | { |
129 | 112 | "cell_type": "code", |
130 | | - "execution_count": 6, |
| 113 | + "execution_count": null, |
131 | 114 | "id": "58dd9603", |
132 | 115 | "metadata": {}, |
133 | | - "outputs": [ |
134 | | - { |
135 | | - "name": "stdout", |
136 | | - "output_type": "stream", |
137 | | - "text": [ |
138 | | - "Data published!\n" |
139 | | - ] |
140 | | - } |
141 | | - ], |
| 116 | + "outputs": [], |
142 | 117 | "source": [ |
143 | 118 | "completion = openai.ChatCompletion.create(\n", |
144 | 119 | " model=\"gpt-3.5-turbo\",\n", |
|
159 | 134 | }, |
160 | 135 | { |
161 | 136 | "cell_type": "code", |
162 | | - "execution_count": 7, |
| 137 | + "execution_count": null, |
163 | 138 | "id": "27bb2bdc", |
164 | 139 | "metadata": {}, |
165 | | - "outputs": [ |
166 | | - { |
167 | | - "data": { |
168 | | - "text/html": [ |
169 | | - "<div>\n", |
170 | | - "<style scoped>\n", |
171 | | - " .dataframe tbody tr th:only-of-type {\n", |
172 | | - " vertical-align: middle;\n", |
173 | | - " }\n", |
174 | | - "\n", |
175 | | - " .dataframe tbody tr th {\n", |
176 | | - " vertical-align: top;\n", |
177 | | - " }\n", |
178 | | - "\n", |
179 | | - " .dataframe thead th {\n", |
180 | | - " text-align: right;\n", |
181 | | - " }\n", |
182 | | - "</style>\n", |
183 | | - "<table border=\"1\" class=\"dataframe\">\n", |
184 | | - " <thead>\n", |
185 | | - " <tr style=\"text-align: right;\">\n", |
186 | | - " <th></th>\n", |
187 | | - " <th>input</th>\n", |
188 | | - " <th>output</th>\n", |
189 | | - " <th>tokens</th>\n", |
190 | | - " <th>latency</th>\n", |
191 | | - " </tr>\n", |
192 | | - " </thead>\n", |
193 | | - " <tbody>\n", |
194 | | - " <tr>\n", |
195 | | - " <th>0</th>\n", |
196 | | - " <td>How are you doing today?</td>\n", |
197 | | - " <td>Thank you for asking! As an AI, I don't have f...</td>\n", |
198 | | - " <td>62</td>\n", |
199 | | - " <td>6400.212049</td>\n", |
200 | | - " </tr>\n", |
201 | | - " <tr>\n", |
202 | | - " <th>1</th>\n", |
203 | | - " <td>Is Python strongly typed?</td>\n", |
204 | | - " <td>Yes, Python is considered a strongly typed lan...</td>\n", |
205 | | - " <td>68</td>\n", |
206 | | - " <td>7226.889133</td>\n", |
207 | | - " </tr>\n", |
208 | | - " </tbody>\n", |
209 | | - "</table>\n", |
210 | | - "</div>" |
211 | | - ], |
212 | | - "text/plain": [ |
213 | | - " input \\\n", |
214 | | - "0 How are you doing today? \n", |
215 | | - "1 Is Python strongly typed? \n", |
216 | | - "\n", |
217 | | - " output tokens latency \n", |
218 | | - "0 Thank you for asking! As an AI, I don't have f... 62 6400.212049 \n", |
219 | | - "1 Yes, Python is considered a strongly typed lan... 68 7226.889133 " |
220 | | - ] |
221 | | - }, |
222 | | - "execution_count": 7, |
223 | | - "metadata": {}, |
224 | | - "output_type": "execute_result" |
225 | | - } |
226 | | - ], |
| 140 | + "outputs": [], |
227 | 141 | "source": [ |
228 | 142 | "openai_monitor.data" |
229 | 143 | ] |
230 | 144 | }, |
231 | 145 | { |
232 | 146 | "cell_type": "code", |
233 | | - "execution_count": 9, |
| 147 | + "execution_count": null, |
234 | 148 | "id": "f9139f2b", |
235 | 149 | "metadata": {}, |
236 | | - "outputs": [ |
237 | | - { |
238 | | - "name": "stdout", |
239 | | - "output_type": "stream", |
240 | | - "text": [ |
241 | | - "Monitoring stopped.\n" |
242 | | - ] |
243 | | - } |
244 | | - ], |
| 150 | + "outputs": [], |
245 | 151 | "source": [ |
246 | 152 | "openai_monitor.stop_monitoring()" |
247 | 153 | ] |
|
0 commit comments