|
7 | 7 | "metadata": { |
8 | 8 | "collapsed": true, |
9 | 9 | "ExecuteTime": { |
10 | | - "end_time": "2023-11-28T06:12:56.855519Z", |
11 | | - "start_time": "2023-11-28T06:12:56.802199Z" |
| 10 | + "end_time": "2023-11-28T07:09:49.102426Z", |
| 11 | + "start_time": "2023-11-28T07:09:49.061326Z" |
12 | 12 | } |
13 | 13 | }, |
14 | 14 | "outputs": [], |
15 | 15 | "source": [ |
16 | 16 | "import taskingai\n", |
17 | | - "# Load TaskingAI API Key fron environment variable" |
| 17 | + "# Load TaskingAI API Key from environment variable" |
18 | 18 | ] |
19 | 19 | }, |
20 | 20 | { |
21 | 21 | "cell_type": "markdown", |
22 | 22 | "source": [ |
23 | | - "# Tool Module CRUD" |
| 23 | + "# TasingAI Tool Module CRUD" |
24 | 24 | ], |
25 | 25 | "metadata": { |
26 | 26 | "collapsed": false |
|
37 | 37 | "metadata": { |
38 | 38 | "collapsed": false, |
39 | 39 | "ExecuteTime": { |
40 | | - "end_time": "2023-11-28T06:12:58.243357Z", |
41 | | - "start_time": "2023-11-28T06:12:58.208415Z" |
| 40 | + "end_time": "2023-11-28T07:09:50.420467Z", |
| 41 | + "start_time": "2023-11-28T07:09:50.403560Z" |
42 | 42 | } |
43 | 43 | }, |
44 | 44 | "id": "1da88cd4d728ced9" |
|
61 | 61 | "name": "stdout", |
62 | 62 | "output_type": "stream", |
63 | 63 | "text": [ |
64 | | - "created action: {'action_id': 'bFBdwq9eBsCHelP2Rd1mkaI8',\n", |
| 64 | + "created action: {'action_id': 'bFBdAAXYO6B0X1AbZwvEXxjA',\n", |
65 | 65 | " 'authentication': {'content': None, 'secret': None, 'type': 'none'},\n", |
66 | | - " 'created_timestamp': 1701151980773,\n", |
| 66 | + " 'created_timestamp': 1701155392625,\n", |
67 | 67 | " 'object': 'Action',\n", |
68 | 68 | " 'schema': {'components': {},\n", |
69 | 69 | " 'info': {'description': 'API for fetching interesting number facts',\n", |
|
154 | 154 | "metadata": { |
155 | 155 | "collapsed": false, |
156 | 156 | "ExecuteTime": { |
157 | | - "end_time": "2023-11-28T06:13:00.837654Z", |
158 | | - "start_time": "2023-11-28T06:12:59.549717Z" |
| 157 | + "end_time": "2023-11-28T07:09:52.745555Z", |
| 158 | + "start_time": "2023-11-28T07:09:51.708768Z" |
159 | 159 | } |
160 | 160 | }, |
161 | 161 | "id": "1b40bb3464107aa6" |
|
168 | 168 | "name": "stdout", |
169 | 169 | "output_type": "stream", |
170 | 170 | "text": [ |
171 | | - "got action: {'action_id': 'bFBdwq9eBsCHelP2Rd1mkaI8',\n", |
| 171 | + "got action: {'action_id': 'bFBdAAXYO6B0X1AbZwvEXxjA',\n", |
172 | 172 | " 'authentication': {'content': None, 'secret': None, 'type': 'none'},\n", |
173 | | - " 'created_timestamp': 1701151980773,\n", |
| 173 | + " 'created_timestamp': 1701155392625,\n", |
174 | 174 | " 'object': 'Action',\n", |
175 | 175 | " 'schema': {'components': {},\n", |
176 | 176 | " 'info': {'description': 'API for fetching interesting number facts',\n", |
|
213 | 213 | "metadata": { |
214 | 214 | "collapsed": false, |
215 | 215 | "ExecuteTime": { |
216 | | - "end_time": "2023-11-28T06:13:02.735027Z", |
217 | | - "start_time": "2023-11-28T06:13:01.672743Z" |
| 216 | + "end_time": "2023-11-28T07:09:59.797187Z", |
| 217 | + "start_time": "2023-11-28T07:09:58.796202Z" |
218 | 218 | } |
219 | 219 | }, |
220 | 220 | "id": "e991bb600ca2bca9" |
|
227 | 227 | "name": "stdout", |
228 | 228 | "output_type": "stream", |
229 | 229 | "text": [ |
230 | | - "updated action: {'action_id': 'bFBdwq9eBsCHelP2Rd1mkaI8',\n", |
| 230 | + "updated action: {'action_id': 'bFBdXmaIak6LBDjmNb7LFWdc',\n", |
231 | 231 | " 'authentication': {'content': None, 'secret': None, 'type': 'none'},\n", |
232 | | - " 'created_timestamp': 1701151980773,\n", |
| 232 | + " 'created_timestamp': 1701155360846,\n", |
233 | 233 | " 'object': 'Action',\n", |
234 | 234 | " 'schema': {'info': {'description': 'API for fetching interesting number facts',\n", |
235 | 235 | " 'title': 'Numbers API',\n", |
|
271 | 271 | "metadata": { |
272 | 272 | "collapsed": false, |
273 | 273 | "ExecuteTime": { |
274 | | - "end_time": "2023-11-28T06:13:04.242253Z", |
275 | | - "start_time": "2023-11-28T06:13:03.300837Z" |
| 274 | + "end_time": "2023-11-28T07:09:25.048213Z", |
| 275 | + "start_time": "2023-11-28T07:09:24.147021Z" |
276 | 276 | } |
277 | 277 | }, |
278 | 278 | "id": "495db38e51c0531f" |
279 | 279 | }, |
280 | 280 | { |
281 | 281 | "cell_type": "code", |
282 | | - "execution_count": 6, |
| 282 | + "execution_count": 10, |
283 | 283 | "outputs": [ |
284 | 284 | { |
285 | 285 | "name": "stdout", |
286 | 286 | "output_type": "stream", |
287 | 287 | "text": [ |
288 | | - "deleted action: bFBdwq9eBsCHelP2Rd1mkaI8\n" |
| 288 | + "ran action result: {'status': 200, 'data': '127 is the atomic number of Unbiseptium, an element that has not yet been discovered.'}\n" |
| 289 | + ] |
| 290 | + } |
| 291 | + ], |
| 292 | + "source": [ |
| 293 | + "# run action for test purpose\n", |
| 294 | + "result = taskingai.tool.run_action(\n", |
| 295 | + " action_id=action_id,\n", |
| 296 | + " parameters={\n", |
| 297 | + " \"number\": 127\n", |
| 298 | + " }\n", |
| 299 | + ")\n", |
| 300 | + "print(f\"ran action result: {result}\\n\")" |
| 301 | + ], |
| 302 | + "metadata": { |
| 303 | + "collapsed": false, |
| 304 | + "ExecuteTime": { |
| 305 | + "end_time": "2023-11-28T07:19:37.431926Z", |
| 306 | + "start_time": "2023-11-28T07:19:36.227121Z" |
| 307 | + } |
| 308 | + }, |
| 309 | + "id": "36d4c722d4b9bd74" |
| 310 | + }, |
| 311 | + { |
| 312 | + "cell_type": "code", |
| 313 | + "execution_count": 11, |
| 314 | + "outputs": [ |
| 315 | + { |
| 316 | + "name": "stdout", |
| 317 | + "output_type": "stream", |
| 318 | + "text": [ |
| 319 | + "deleted action: bFBdAAXYO6B0X1AbZwvEXxjA\n" |
289 | 320 | ] |
290 | 321 | } |
291 | 322 | ], |
|
297 | 328 | "metadata": { |
298 | 329 | "collapsed": false, |
299 | 330 | "ExecuteTime": { |
300 | | - "end_time": "2023-11-28T06:13:05.854062Z", |
301 | | - "start_time": "2023-11-28T06:13:04.852340Z" |
| 331 | + "end_time": "2023-11-28T07:19:39.304243Z", |
| 332 | + "start_time": "2023-11-28T07:19:38.238621Z" |
302 | 333 | } |
303 | 334 | }, |
304 | 335 | "id": "dd53cb15efa35298" |
305 | 336 | }, |
306 | 337 | { |
307 | 338 | "cell_type": "code", |
308 | | - "execution_count": 7, |
| 339 | + "execution_count": 12, |
309 | 340 | "outputs": [ |
310 | 341 | { |
311 | 342 | "name": "stdout", |
312 | 343 | "output_type": "stream", |
313 | 344 | "text": [ |
314 | | - "fbFBdwq9eBsCHelP2Rd1mkaI8 in action_ids: False\n" |
| 345 | + "fbFBdAAXYO6B0X1AbZwvEXxjA in action_ids: False\n" |
315 | 346 | ] |
316 | 347 | } |
317 | 348 | ], |
|
325 | 356 | "metadata": { |
326 | 357 | "collapsed": false, |
327 | 358 | "ExecuteTime": { |
328 | | - "end_time": "2023-11-28T06:13:07.841316Z", |
329 | | - "start_time": "2023-11-28T06:13:06.744946Z" |
| 359 | + "end_time": "2023-11-28T07:19:44.780194Z", |
| 360 | + "start_time": "2023-11-28T07:19:43.747175Z" |
330 | 361 | } |
331 | 362 | }, |
332 | 363 | "id": "5a1a36d15055918f" |
|
0 commit comments