|
98 | 98 | { |
99 | 99 | "data": { |
100 | 100 | "text/plain": [ |
101 | | - "<Thread 'thread_49649210139099136' \n", |
| 101 | + "<Thread 'thread_71815343378436098' \n", |
102 | 102 | " <system: \"You are Tune Blob, a super star AI movie buff!\">\n", |
103 | 103 | " <human: \"What movies are showing in Chennai tonight?\">\n", |
104 | 104 | " <tools: ['find_movies', 'find_theaters', 'get_showtimes']>\n", |
|
155 | 155 | }, |
156 | 156 | { |
157 | 157 | "cell_type": "code", |
158 | | - "execution_count": 6, |
| 158 | + "execution_count": 5, |
159 | 159 | "metadata": {}, |
160 | 160 | "outputs": [ |
161 | 161 | { |
162 | 162 | "name": "stdout", |
163 | 163 | "output_type": "stream", |
164 | 164 | "text": [ |
165 | | - "{'name': 'find_movies', 'arguments': {'description': 'movies playing in Chennai', 'location': 'Chennai'}}\n" |
| 165 | + "{'name': 'find_movies', 'arguments': {'location': 'Chennai', 'description': ' '}}\n" |
166 | 166 | ] |
167 | 167 | } |
168 | 168 | ], |
169 | 169 | "source": [ |
170 | 170 | "# connect to a model from Tune Studio\n", |
171 | 171 | "\n", |
| 172 | + "model = ta.Openai()\n", |
| 173 | + "\n", |
172 | 174 | "# model = ta.TuneModel(\n", |
173 | 175 | "# \"yash/yash-gpt-4o\",\n", |
174 | | - "# org_id = \"e41f60a3-06c9-4133-bc6d-127bc6f3f215\"\n", |
175 | 176 | "# )\n", |
176 | 177 | "\n", |
177 | | - "# or connect to few that have first class support\n", |
178 | | - "model = ta.Anthropic()\n", |
| 178 | + "# # or connect to few that have first class support\n", |
| 179 | + "# model = ta.Anthropic()\n", |
| 180 | + "\n", |
| 181 | + "\n", |
179 | 182 | "out = model.chat(thread)\n", |
180 | 183 | "print(out)" |
181 | 184 | ] |
182 | 185 | }, |
183 | 186 | { |
184 | 187 | "cell_type": "code", |
185 | | - "execution_count": 7, |
| 188 | + "execution_count": 6, |
186 | 189 | "metadata": {}, |
187 | 190 | "outputs": [ |
188 | 191 | { |
189 | 192 | "data": { |
190 | 193 | "text/plain": [ |
191 | | - "<Thread 'thread_49649210139099136' \n", |
| 194 | + "<Thread 'thread_71815343378436098' \n", |
192 | 195 | " <system: \"You are Tune Blob, a super star AI movie buff!\">\n", |
193 | 196 | " <human: \"What movies are showing in Chennai tonight?\">\n", |
194 | | - " <function_call: {\"name\": \"find_movies\", \"arguments\": {\"description>\n", |
| 197 | + " <function_call: {\"name\": \"find_movies\", \"arguments\": {\"location\": >\n", |
195 | 198 | " <tools: ['find_movies', 'find_theaters', 'get_showtimes']>\n", |
196 | 199 | ">" |
197 | 200 | ] |
198 | 201 | }, |
199 | | - "execution_count": 7, |
| 202 | + "execution_count": 6, |
200 | 203 | "metadata": {}, |
201 | 204 | "output_type": "execute_result" |
202 | 205 | } |
|
211 | 214 | }, |
212 | 215 | { |
213 | 216 | "cell_type": "code", |
214 | | - "execution_count": 8, |
| 217 | + "execution_count": 7, |
215 | 218 | "metadata": {}, |
216 | 219 | "outputs": [ |
217 | 220 | { |
218 | 221 | "data": { |
219 | 222 | "text/plain": [ |
220 | | - "<Thread 'thread_49649210139099136' \n", |
| 223 | + "<Thread 'thread_71815343378436098' \n", |
221 | 224 | " <system: \"You are Tune Blob, a super star AI movie buff!\">\n", |
222 | 225 | " <human: \"What movies are showing in Chennai tonight?\">\n", |
223 | | - " <function_call: {\"name\": \"find_movies\", \"arguments\": {\"description>\n", |
| 226 | + " <function_call: {\"name\": \"find_movies\", \"arguments\": {\"location\": >\n", |
224 | 227 | " <function_resp: {\"movie\": \"Barbie\", \"theaters\": [{\"name\": \"PVR - E>\n", |
225 | 228 | " <tools: ['find_movies', 'find_theaters', 'get_showtimes']>\n", |
226 | 229 | ">" |
227 | 230 | ] |
228 | 231 | }, |
229 | | - "execution_count": 8, |
| 232 | + "execution_count": 7, |
230 | 233 | "metadata": {}, |
231 | 234 | "output_type": "execute_result" |
232 | 235 | } |
233 | 236 | ], |
234 | 237 | "source": [ |
235 | 238 | "# now attach a simple output after running the `find_movies` function\n", |
| 239 | + "# resp = find_movies(**{'location': 'Chennai', 'description': ' '})\n", |
| 240 | + "\n", |
236 | 241 | "thread.append(tt.function_resp({\n", |
237 | 242 | " \"movie\": \"Barbie\",\n", |
238 | 243 | " \"theaters\": [\n", |
|
250 | 255 | }, |
251 | 256 | { |
252 | 257 | "cell_type": "code", |
253 | | - "execution_count": 11, |
| 258 | + "execution_count": 8, |
254 | 259 | "metadata": {}, |
255 | 260 | "outputs": [ |
256 | 261 | { |
257 | 262 | "name": "stdout", |
258 | 263 | "output_type": "stream", |
259 | 264 | "text": [ |
| 265 | + "Here are some movies showing in Chennai tonight:\n", |
260 | 266 | "\n", |
| 267 | + "### Barbie\n", |
| 268 | + "- **Theater 1:** PVR - ECR\n", |
| 269 | + " - **Address:** PVR: Heritage RSL ECR, Chennai - 600119\n", |
| 270 | + "- **Theater 2:** Jazz Cinemas LUXE\n", |
| 271 | + " - **Address:** No. 142, 2nd Floor, Phoenix Market City, Velachery Main Rd, Indira Gandhi Nagar, Velachery, Chennai, Tamil Nadu 600042\n", |
261 | 272 | "\n", |
262 | | - "According to the results, the movie \"Barbie\" is currently playing in theaters in Chennai, specifically at PVR - ECR and Jazz Cinemas LUXE.\n" |
| 273 | + "Would you like to know the specific showtimes for any of these movies?\n" |
263 | 274 | ] |
264 | 275 | } |
265 | 276 | ], |
|
0 commit comments