|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": null, |
6 | 5 | "id": "initial_id", |
7 | 6 | "metadata": { |
8 | 7 | "collapsed": true |
9 | 8 | }, |
10 | | - "outputs": [], |
11 | 9 | "source": [ |
12 | 10 | "import time\n", |
13 | 11 | "import taskingai\n", |
14 | 12 | "# Load TaskingAI API Key from environment variable" |
15 | | - ] |
| 13 | + ], |
| 14 | + "outputs": [], |
| 15 | + "execution_count": null |
16 | 16 | }, |
17 | 17 | { |
18 | 18 | "cell_type": "markdown", |
|
39 | 39 | }, |
40 | 40 | { |
41 | 41 | "cell_type": "code", |
42 | | - "execution_count": null, |
43 | | - "outputs": [], |
44 | 42 | "source": [ |
45 | | - "from taskingai.models import Action, ActionAuthentication, ActionAuthenticationType\n", |
| 43 | + "from taskingai.tool import Action, ActionAuthentication, ActionAuthenticationType\n", |
46 | 44 | "from typing import List\n", |
47 | 45 | "\n", |
48 | 46 | "# create an assistant action\n", |
|
102 | 100 | "metadata": { |
103 | 101 | "collapsed": false |
104 | 102 | }, |
105 | | - "id": "3b2fda39ba58c5e9" |
| 103 | + "id": "3b2fda39ba58c5e9", |
| 104 | + "outputs": [], |
| 105 | + "execution_count": null |
106 | 106 | }, |
107 | 107 | { |
108 | 108 | "cell_type": "code", |
109 | | - "execution_count": null, |
110 | | - "outputs": [], |
111 | 109 | "source": [ |
112 | | - "from taskingai.models import Assistant, Chat, ToolRef, ToolType\n", |
| 110 | + "from taskingai.assistant import Assistant, Chat, ToolRef, ToolType\n", |
113 | 111 | "from taskingai.assistant.memory import AssistantMessageWindowMemory\n", |
114 | 112 | "\n", |
115 | 113 | "# choose an available chat_completion model from your project\n", |
|
145 | 143 | "metadata": { |
146 | 144 | "collapsed": false |
147 | 145 | }, |
148 | | - "id": "3b3df0f232021283" |
| 146 | + "id": "3b3df0f232021283", |
| 147 | + "outputs": [], |
| 148 | + "execution_count": null |
149 | 149 | }, |
150 | 150 | { |
151 | 151 | "cell_type": "markdown", |
|
159 | 159 | }, |
160 | 160 | { |
161 | 161 | "cell_type": "code", |
162 | | - "execution_count": null, |
163 | | - "outputs": [], |
164 | 162 | "source": [ |
165 | 163 | "chat: Chat = taskingai.assistant.create_chat(\n", |
166 | 164 | " assistant_id=assistant.assistant_id,\n", |
|
170 | 168 | "metadata": { |
171 | 169 | "collapsed": false |
172 | 170 | }, |
173 | | - "id": "f1e2f0b2af8b1d8d" |
| 171 | + "id": "f1e2f0b2af8b1d8d", |
| 172 | + "outputs": [], |
| 173 | + "execution_count": null |
174 | 174 | }, |
175 | 175 | { |
176 | 176 | "cell_type": "code", |
177 | | - "execution_count": null, |
178 | | - "outputs": [], |
179 | 177 | "source": [ |
180 | 178 | "from taskingai.assistant import Message, MessageChunk\n", |
181 | 179 | "user_input = input(\"User Input: \")\n", |
|
204 | 202 | "metadata": { |
205 | 203 | "collapsed": false |
206 | 204 | }, |
207 | | - "id": "b26e30b79b71697a" |
| 205 | + "id": "b26e30b79b71697a", |
| 206 | + "outputs": [], |
| 207 | + "execution_count": null |
208 | 208 | }, |
209 | 209 | { |
210 | 210 | "cell_type": "code", |
211 | | - "execution_count": null, |
212 | | - "outputs": [], |
213 | 211 | "source": [ |
214 | 212 | "user_input = input(\"User Input: \")\n", |
215 | 213 | "while user_input.strip() and user_input != \"q\":\n", |
|
245 | 243 | "metadata": { |
246 | 244 | "collapsed": false |
247 | 245 | }, |
248 | | - "id": "c7d73e0b138e3eba" |
| 246 | + "id": "c7d73e0b138e3eba", |
| 247 | + "outputs": [], |
| 248 | + "execution_count": null |
249 | 249 | }, |
250 | 250 | { |
251 | 251 | "cell_type": "code", |
252 | | - "execution_count": null, |
253 | | - "outputs": [], |
254 | 252 | "source": [ |
255 | 253 | "# list messages\n", |
256 | 254 | "messages = taskingai.assistant.list_messages(\n", |
|
264 | 262 | "metadata": { |
265 | 263 | "collapsed": false |
266 | 264 | }, |
267 | | - "id": "e94e3adb0d15373b" |
| 265 | + "id": "e94e3adb0d15373b", |
| 266 | + "outputs": [], |
| 267 | + "execution_count": null |
268 | 268 | }, |
269 | 269 | { |
270 | 270 | "cell_type": "code", |
271 | | - "execution_count": null, |
272 | | - "outputs": [], |
273 | 271 | "source": [ |
274 | 272 | "# delete assistant\n", |
275 | 273 | "taskingai.assistant.delete_assistant(\n", |
|
279 | 277 | "metadata": { |
280 | 278 | "collapsed": false |
281 | 279 | }, |
282 | | - "id": "ed39836bbfdc7a4e" |
| 280 | + "id": "ed39836bbfdc7a4e", |
| 281 | + "outputs": [], |
| 282 | + "execution_count": null |
283 | 283 | } |
284 | 284 | ], |
285 | 285 | "metadata": { |
|
0 commit comments