Spaces:
Runtime error
Runtime error
DylanonWic
commited on
Upload 18 files
Browse files- chatbot_multiagent.ipynb +445 -114
- chatbot_multiagent.py +1 -1
- user_question_testsets.txt +1 -1
chatbot_multiagent.ipynb
CHANGED
@@ -264,7 +264,7 @@
|
|
264 |
},
|
265 |
{
|
266 |
"cell_type": "code",
|
267 |
-
"execution_count":
|
268 |
"metadata": {},
|
269 |
"outputs": [
|
270 |
{
|
@@ -274,135 +274,466 @@
|
|
274 |
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
275 |
"Name: analyst\n",
|
276 |
"Tool Calls:\n",
|
277 |
-
"
|
278 |
-
" Call ID:
|
279 |
" Args:\n",
|
280 |
-
"
|
281 |
-
"
|
282 |
-
" Call ID:
|
283 |
" Args:\n",
|
284 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
"=================================\u001b[1m Tool Message \u001b[0m=================================\n",
|
286 |
"Name: google_places\n",
|
287 |
"\n",
|
288 |
-
"1.
|
289 |
-
"Address:
|
290 |
-
"Google place ID:
|
291 |
-
"Phone:
|
292 |
-
"Website:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
"\n",
|
294 |
"\n",
|
295 |
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
296 |
"Name: analyst\n",
|
297 |
"\n",
|
298 |
-
"I
|
299 |
-
"\n",
|
300 |
-
"###
|
301 |
-
"1.
|
302 |
-
" - Address
|
303 |
-
" - Rating
|
304 |
-
" - Open Now
|
305 |
-
"
|
306 |
-
"
|
307 |
-
"
|
308 |
-
" -
|
309 |
-
" -
|
310 |
-
"
|
311 |
-
"
|
312 |
-
"\n",
|
313 |
-
"
|
314 |
-
" -
|
315 |
-
"
|
316 |
-
"
|
317 |
-
" -
|
318 |
-
"\n",
|
319 |
-
"
|
320 |
-
"
|
321 |
-
"
|
322 |
-
" -
|
323 |
-
" -
|
324 |
-
"\n",
|
325 |
-
"5. **Café BAGA Central World**\n",
|
326 |
-
" - Address: 3rd Floor, CentralWorld, Ratchadamri Rd, Pathum Wan\n",
|
327 |
-
" - Rating: 4.7\n",
|
328 |
-
" - Open Now: Yes\n",
|
329 |
-
" - Location: Latitude 13.7470656, Longitude 100.5397062\n",
|
330 |
-
"\n",
|
331 |
-
"6. **CRANNIES Coffee & Brunch**\n",
|
332 |
-
" - Address: 126 ถนนเพชรบุรี 50 Wang Mai, Pathum Wan\n",
|
333 |
-
" - Rating: 5\n",
|
334 |
-
" - Open Now: Yes\n",
|
335 |
-
" - Location: Latitude 13.7344961, Longitude 100.5268998\n",
|
336 |
-
"\n",
|
337 |
-
"7. **Alto Coffee Roasters (Central@Central World)**\n",
|
338 |
-
" - Address: 5th floor เซ็นทรัลเวิลด์, Ratchadamri Rd, Pathum Wan\n",
|
339 |
-
" - Rating: 4.4\n",
|
340 |
-
" - Open Now: Yes\n",
|
341 |
-
" - Location: Latitude 13.7453043, Longitude 100.5393611\n",
|
342 |
-
"\n",
|
343 |
-
"8. **Red Diamond Cafe at Central World 5th Floor**\n",
|
344 |
-
" - Address: Centara Grand and Bangkok Convention Centre, 5th floor, Khwaeng Pathum Wan, Pathum Wan\n",
|
345 |
-
" - Rating: 4.5\n",
|
346 |
-
" - Open Now: Yes\n",
|
347 |
-
" - Location: Latitude 13.7465966, Longitude 100.5393615\n",
|
348 |
-
"\n",
|
349 |
-
"9. **BrewLab Cafe Roompini**\n",
|
350 |
-
" - Address: 231/6 Sarasin Rd, Lumphini, Pathum Wan\n",
|
351 |
-
" - Rating: 4.8\n",
|
352 |
-
" - Open Now: Yes\n",
|
353 |
-
" - Location: Latitude 13.734501, Longitude 100.5393547\n",
|
354 |
-
"\n",
|
355 |
-
"10. **Casa Lapin Specialty Coffee x Ratchathewi**\n",
|
356 |
-
" - Address: 318 Phaya Thai Rd, Khwaeng Thanon Phetchaburi, Khet Ratchathewi\n",
|
357 |
-
" - Rating: 4.2\n",
|
358 |
-
" - Open Now: Yes\n",
|
359 |
-
" - Location: Latitude 13.75069, Longitude 100.5312\n",
|
360 |
"\n",
|
361 |
"### Next Steps:\n",
|
362 |
-
"To analyze the
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
"
|
371 |
-
"
|
372 |
-
"
|
373 |
-
"
|
374 |
-
"
|
375 |
-
"
|
376 |
-
"
|
377 |
-
"
|
378 |
-
"
|
379 |
-
"
|
380 |
-
"
|
381 |
-
"
|
382 |
-
"
|
383 |
-
"
|
384 |
-
"
|
385 |
-
"
|
386 |
-
"
|
387 |
-
"
|
388 |
-
"
|
389 |
-
"
|
390 |
-
"
|
391 |
-
"
|
392 |
-
"File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/resources/chat/completions.py:668\u001b[0m, in \u001b[0;36mCompletions.create\u001b[0;34m(self, messages, model, frequency_penalty, function_call, functions, logit_bias, logprobs, max_tokens, n, parallel_tool_calls, presence_penalty, response_format, seed, service_tier, stop, stream, stream_options, temperature, tool_choice, tools, top_logprobs, top_p, user, extra_headers, extra_query, extra_body, timeout)\u001b[0m\n\u001b[1;32m 633\u001b[0m \u001b[38;5;129m@required_args\u001b[39m([\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmessages\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmodel\u001b[39m\u001b[38;5;124m\"\u001b[39m], [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmessages\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmodel\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstream\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n\u001b[1;32m 634\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcreate\u001b[39m(\n\u001b[1;32m 635\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 665\u001b[0m timeout: \u001b[38;5;28mfloat\u001b[39m \u001b[38;5;241m|\u001b[39m httpx\u001b[38;5;241m.\u001b[39mTimeout \u001b[38;5;241m|\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;241m|\u001b[39m NotGiven \u001b[38;5;241m=\u001b[39m NOT_GIVEN,\n\u001b[1;32m 666\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m ChatCompletion \u001b[38;5;241m|\u001b[39m Stream[ChatCompletionChunk]:\n\u001b[1;32m 667\u001b[0m validate_response_format(response_format)\n\u001b[0;32m--> 668\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_post\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 669\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m/chat/completions\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 670\u001b[0m \u001b[43m \u001b[49m\u001b[43mbody\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmaybe_transform\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 671\u001b[0m \u001b[43m \u001b[49m\u001b[43m{\u001b[49m\n\u001b[1;32m 672\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmessages\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 673\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmodel\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 674\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mfrequency_penalty\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrequency_penalty\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 675\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mfunction_call\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mfunction_call\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 676\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mfunctions\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mfunctions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 677\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mlogit_bias\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mlogit_bias\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 678\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mlogprobs\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mlogprobs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 679\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmax_tokens\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_tokens\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 680\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mn\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mn\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 681\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mparallel_tool_calls\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mparallel_tool_calls\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 682\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mpresence_penalty\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mpresence_penalty\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 683\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mresponse_format\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mresponse_format\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 684\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mseed\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mseed\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 685\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mservice_tier\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mservice_tier\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 686\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstop\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstop\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 687\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstream\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 688\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstream_options\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream_options\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 689\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtemperature\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtemperature\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 690\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtool_choice\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtool_choice\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 691\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtools\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtools\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 692\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtop_logprobs\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtop_logprobs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 693\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtop_p\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtop_p\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 694\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43muser\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43muser\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 695\u001b[0m \u001b[43m \u001b[49m\u001b[43m}\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 696\u001b[0m \u001b[43m \u001b[49m\u001b[43mcompletion_create_params\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mCompletionCreateParams\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 697\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 698\u001b[0m \u001b[43m \u001b[49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmake_request_options\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 699\u001b[0m \u001b[43m \u001b[49m\u001b[43mextra_headers\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mextra_headers\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mextra_query\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mextra_query\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mextra_body\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mextra_body\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtimeout\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtimeout\u001b[49m\n\u001b[1;32m 700\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 701\u001b[0m \u001b[43m \u001b[49m\u001b[43mcast_to\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mChatCompletion\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 702\u001b[0m \u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstream\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 703\u001b[0m \u001b[43m \u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mStream\u001b[49m\u001b[43m[\u001b[49m\u001b[43mChatCompletionChunk\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 704\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n",
|
393 |
-
"
|
394 |
-
"
|
395 |
-
"
|
396 |
-
"
|
397 |
-
"File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/_base_client.py:1026\u001b[0m, in \u001b[0;36mSyncAPIClient._request\u001b[0;34m(self, cast_to, options, remaining_retries, stream, stream_cls)\u001b[0m\n\u001b[1;32m 1024\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m retries \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_should_retry(err\u001b[38;5;241m.\u001b[39mresponse):\n\u001b[1;32m 1025\u001b[0m err\u001b[38;5;241m.\u001b[39mresponse\u001b[38;5;241m.\u001b[39mclose()\n\u001b[0;32m-> 1026\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_retry_request\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1027\u001b[0m \u001b[43m \u001b[49m\u001b[43minput_options\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1028\u001b[0m \u001b[43m \u001b[49m\u001b[43mcast_to\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1029\u001b[0m \u001b[43m \u001b[49m\u001b[43mretries\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1030\u001b[0m \u001b[43m \u001b[49m\u001b[43merr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mresponse\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mheaders\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1031\u001b[0m \u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1032\u001b[0m \u001b[43m \u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstream_cls\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1033\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1035\u001b[0m \u001b[38;5;66;03m# If the response is streamed then we need to explicitly read the response\u001b[39;00m\n\u001b[1;32m 1036\u001b[0m \u001b[38;5;66;03m# to completion before attempting to access the response text.\u001b[39;00m\n\u001b[1;32m 1037\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m err\u001b[38;5;241m.\u001b[39mresponse\u001b[38;5;241m.\u001b[39mis_closed:\n",
|
398 |
-
"File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/_base_client.py:1075\u001b[0m, in \u001b[0;36mSyncAPIClient._retry_request\u001b[0;34m(self, options, cast_to, remaining_retries, response_headers, stream, stream_cls)\u001b[0m\n\u001b[1;32m 1071\u001b[0m \u001b[38;5;66;03m# In a synchronous context we are blocking the entire thread. Up to the library user to run the client in a\u001b[39;00m\n\u001b[1;32m 1072\u001b[0m \u001b[38;5;66;03m# different thread if necessary.\u001b[39;00m\n\u001b[1;32m 1073\u001b[0m time\u001b[38;5;241m.\u001b[39msleep(timeout)\n\u001b[0;32m-> 1075\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_request\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1076\u001b[0m \u001b[43m \u001b[49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1077\u001b[0m \u001b[43m \u001b[49m\u001b[43mcast_to\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcast_to\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1078\u001b[0m \u001b[43m \u001b[49m\u001b[43mremaining_retries\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mremaining\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1079\u001b[0m \u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1080\u001b[0m \u001b[43m \u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstream_cls\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1081\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n",
|
399 |
-
"File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/_base_client.py:1041\u001b[0m, in \u001b[0;36mSyncAPIClient._request\u001b[0;34m(self, cast_to, options, remaining_retries, stream, stream_cls)\u001b[0m\n\u001b[1;32m 1038\u001b[0m err\u001b[38;5;241m.\u001b[39mresponse\u001b[38;5;241m.\u001b[39mread()\n\u001b[1;32m 1040\u001b[0m log\u001b[38;5;241m.\u001b[39mdebug(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mRe-raising status error\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m-> 1041\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_make_status_error_from_response(err\u001b[38;5;241m.\u001b[39mresponse) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1043\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_process_response(\n\u001b[1;32m 1044\u001b[0m cast_to\u001b[38;5;241m=\u001b[39mcast_to,\n\u001b[1;32m 1045\u001b[0m options\u001b[38;5;241m=\u001b[39moptions,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 1049\u001b[0m retries_taken\u001b[38;5;241m=\u001b[39moptions\u001b[38;5;241m.\u001b[39mget_max_retries(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmax_retries) \u001b[38;5;241m-\u001b[39m retries,\n\u001b[1;32m 1050\u001b[0m )\n",
|
400 |
-
"\u001b[0;31mInternalServerError\u001b[0m: Error code: 500 - {'error': {'message': 'The model produced invalid content. Consider modifying your prompt if you are seeing this error persistently.', 'type': 'model_error', 'param': None, 'code': None}}"
|
401 |
]
|
402 |
}
|
403 |
],
|
404 |
"source": [
|
405 |
-
"# question = \"
|
406 |
"\n",
|
407 |
"# graph = workflow.compile()\n",
|
408 |
"\n",
|
|
|
264 |
},
|
265 |
{
|
266 |
"cell_type": "code",
|
267 |
+
"execution_count": 6,
|
268 |
"metadata": {},
|
269 |
"outputs": [
|
270 |
{
|
|
|
274 |
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
275 |
"Name: analyst\n",
|
276 |
"Tool Calls:\n",
|
277 |
+
" nearby_search (call_P34CTmQBMFVscuCNoXAMPeoc)\n",
|
278 |
+
" Call ID: call_P34CTmQBMFVscuCNoXAMPeoc\n",
|
279 |
" Args:\n",
|
280 |
+
" input_dict: {'keyword': 'ร้านของชำ', 'location_name': 'อนุสาวรีย์ชัยสมรภูมิ', 'radius': 1000, 'place_type': 'store'}\n",
|
281 |
+
" google_places (call_KOeGzcJyOhVGgxmdAw9a6UoH)\n",
|
282 |
+
" Call ID: call_KOeGzcJyOhVGgxmdAw9a6UoH\n",
|
283 |
" Args:\n",
|
284 |
+
" query: อนุสาวรีย์ชัยสมรภูมิ\n",
|
285 |
+
"=================================\u001b[1m Tool Message \u001b[0m=================================\n",
|
286 |
+
"Name: nearby_search\n",
|
287 |
+
"\n",
|
288 |
+
"number of results: 18\n",
|
289 |
+
"\n",
|
290 |
+
" address: 163, 25 Soi Phetchaburi 5, Thung Phaya Thai, Ratchathewi\n",
|
291 |
+
"\n",
|
292 |
+
" location: {'lat': 13.7575211, 'lng': 100.5284703}\n",
|
293 |
+
"\n",
|
294 |
+
" lacation_name: ร้านค้า พรรณี\n",
|
295 |
+
"\n",
|
296 |
+
" opening hours: {'open_now': True}\n",
|
297 |
+
"\n",
|
298 |
+
" rating: 5\n",
|
299 |
+
"\n",
|
300 |
+
" plus code: 7P52QG5H+29\n",
|
301 |
+
"\n",
|
302 |
+
"\n",
|
303 |
+
" \n",
|
304 |
+
" address: เลขที่ 467 1 Ratchawithi Rd, Thanon Phaya Thai, Ratchathewi\n",
|
305 |
+
"\n",
|
306 |
+
" location: {'lat': 13.7642431, 'lng': 100.539397}\n",
|
307 |
+
"\n",
|
308 |
+
" lacation_name: ร้านกิตติของชำ\n",
|
309 |
+
"\n",
|
310 |
+
" opening hours: {'open_now': True}\n",
|
311 |
+
"\n",
|
312 |
+
" rating: 4\n",
|
313 |
+
"\n",
|
314 |
+
" plus code: 7P52QG7Q+MQ\n",
|
315 |
+
"\n",
|
316 |
+
"\n",
|
317 |
+
" \n",
|
318 |
+
" address: สมใจอพาร์ทเม้นท์ 184/4 Soi Phahon Yothin 1, Phaya Thai\n",
|
319 |
+
"\n",
|
320 |
+
" location: {'lat': 13.7698885, 'lng': 100.5358358}\n",
|
321 |
+
"\n",
|
322 |
+
" lacation_name: ขายของ\n",
|
323 |
+
"\n",
|
324 |
+
" opening hours: {'open_now': True}\n",
|
325 |
+
"\n",
|
326 |
+
" rating: 4.5\n",
|
327 |
+
"\n",
|
328 |
+
" plus code: 7P52QG9P+W8\n",
|
329 |
+
"\n",
|
330 |
+
"\n",
|
331 |
+
" \n",
|
332 |
+
" address: 476 ตลาดศรีวนิช ซอย Thanon Asok - Din Daeng, Din Daeng\n",
|
333 |
+
"\n",
|
334 |
+
" location: {'lat': 13.7631408, 'lng': 100.5455863}\n",
|
335 |
+
"\n",
|
336 |
+
" lacation_name: ร้านปิ่นสุวรรณ\n",
|
337 |
+
"\n",
|
338 |
+
" opening hours: {'open_now': True}\n",
|
339 |
+
"\n",
|
340 |
+
" rating: 4.4\n",
|
341 |
+
"\n",
|
342 |
+
" plus code: 7P52QG7W+76\n",
|
343 |
+
"\n",
|
344 |
+
"\n",
|
345 |
+
" \n",
|
346 |
+
" address: 140/6 Ratchawithi Rd, Phaya Thai\n",
|
347 |
+
"\n",
|
348 |
+
" location: {'lat': 13.7708078, 'lng': 100.5345492}\n",
|
349 |
+
"\n",
|
350 |
+
" lacation_name: ร้านแอมโชห่วย\n",
|
351 |
+
"\n",
|
352 |
+
" opening hours: {'open_now': True}\n",
|
353 |
+
"\n",
|
354 |
+
" rating: 5\n",
|
355 |
+
"\n",
|
356 |
+
" plus code: 7P52QGCM+8R\n",
|
357 |
+
"\n",
|
358 |
+
"\n",
|
359 |
+
" \n",
|
360 |
+
" address: 156/5 ซอย เพชรบุรี 7 Phetchaburi Rd, Thung Phaya Thai, Ratchathewi\n",
|
361 |
+
"\n",
|
362 |
+
" location: {'lat': 13.7564968, 'lng': 100.5303369}\n",
|
363 |
+
"\n",
|
364 |
+
" lacation_name: ร้านชำคุณภาวิมล\n",
|
365 |
+
"\n",
|
366 |
+
" opening hours: {'open_now': True}\n",
|
367 |
+
"\n",
|
368 |
+
" rating: 3\n",
|
369 |
+
"\n",
|
370 |
+
" plus code: 7P52QG4J+H4\n",
|
371 |
+
"\n",
|
372 |
+
"\n",
|
373 |
+
" \n",
|
374 |
+
" address: 292 Takhe Alley, Din Daeng\n",
|
375 |
+
"\n",
|
376 |
+
" location: {'lat': 13.7623644, 'lng': 100.5454444}\n",
|
377 |
+
"\n",
|
378 |
+
" lacation_name: ร้านนุสรา\n",
|
379 |
+
"\n",
|
380 |
+
" opening hours: {'open_now': True}\n",
|
381 |
+
"\n",
|
382 |
+
" rating: 4.3\n",
|
383 |
+
"\n",
|
384 |
+
" plus code: 7P52QG6W+W5\n",
|
385 |
+
"\n",
|
386 |
+
"\n",
|
387 |
+
" \n",
|
388 |
+
" address: เลขที่ 475 Phaya Thai Rd, Khwaeng Thanon Phaya Thai, Ratchathewi\n",
|
389 |
+
"\n",
|
390 |
+
" location: {'lat': 13.7583454, 'lng': 100.5356299}\n",
|
391 |
+
"\n",
|
392 |
+
" lacation_name: ขายของชำ ประตูน้ำ\n",
|
393 |
+
"\n",
|
394 |
+
" opening hours: {'open_now': True}\n",
|
395 |
+
"\n",
|
396 |
+
" rating: 5\n",
|
397 |
+
"\n",
|
398 |
+
" plus code: 7P52QG5P+87\n",
|
399 |
+
"\n",
|
400 |
+
"\n",
|
401 |
+
" \n",
|
402 |
+
" address: 208/1 Ratchaprarop Rd, Makkasan, Ratchathewi\n",
|
403 |
+
"\n",
|
404 |
+
" location: {'lat': 13.758491, 'lng': 100.5467617}\n",
|
405 |
+
"\n",
|
406 |
+
" lacation_name: ร้านแดง ขายของชำ\n",
|
407 |
+
"\n",
|
408 |
+
" opening hours: {}\n",
|
409 |
+
"\n",
|
410 |
+
" rating: 0\n",
|
411 |
+
"\n",
|
412 |
+
" plus code: 7P52QG5W+9P\n",
|
413 |
+
"\n",
|
414 |
+
"\n",
|
415 |
+
" \n",
|
416 |
+
" address: Satsana Alley, Phaya Thai\n",
|
417 |
+
"\n",
|
418 |
+
" location: {'lat': 13.7752298, 'lng': 100.5344783}\n",
|
419 |
+
"\n",
|
420 |
+
" lacation_name: ร้านชำปากมาสด้า\n",
|
421 |
+
"\n",
|
422 |
+
" opening hours: N/A\n",
|
423 |
+
"\n",
|
424 |
+
" rating: 5\n",
|
425 |
+
"\n",
|
426 |
+
" plus code: 7P52QGGM+3Q\n",
|
427 |
+
"\n",
|
428 |
+
"\n",
|
429 |
+
" \n",
|
430 |
+
" address: 158, ถนนเพชรบุรี, แขวงถนนพญาไท เขตราชเทวี กทม, 10400\n",
|
431 |
+
"\n",
|
432 |
+
" location: {'lat': 13.7539101, 'lng': 100.5388145}\n",
|
433 |
+
"\n",
|
434 |
+
" lacation_name: โชคดีพานิช\n",
|
435 |
+
"\n",
|
436 |
+
" opening hours: {'open_now': True}\n",
|
437 |
+
"\n",
|
438 |
+
" rating: 3\n",
|
439 |
+
"\n",
|
440 |
+
" plus code: N/A\n",
|
441 |
+
"\n",
|
442 |
+
"\n",
|
443 |
+
" \n",
|
444 |
+
" address: QG6W+V6W, Soi Talat Sri Wanit, Din Daeng\n",
|
445 |
+
"\n",
|
446 |
+
" location: {'lat': 13.7622819, 'lng': 100.5456102}\n",
|
447 |
+
"\n",
|
448 |
+
" lacation_name: Shoping Minimart\n",
|
449 |
+
"\n",
|
450 |
+
" opening hours: {'open_now': True}\n",
|
451 |
+
"\n",
|
452 |
+
" rating: 0\n",
|
453 |
+
"\n",
|
454 |
+
" plus code: N/A\n",
|
455 |
+
"\n",
|
456 |
+
"\n",
|
457 |
+
" \n",
|
458 |
+
" address: 421 6-7 Ratchawithi Rd, Thung Phaya Thai, Ratchathewi\n",
|
459 |
+
"\n",
|
460 |
+
" location: {'lat': 13.765786, 'lng': 100.5366638}\n",
|
461 |
+
"\n",
|
462 |
+
" lacation_name: Komol Center\n",
|
463 |
+
"\n",
|
464 |
+
" opening hours: {'open_now': True}\n",
|
465 |
+
"\n",
|
466 |
+
" rating: 4.1\n",
|
467 |
+
"\n",
|
468 |
+
" plus code: 7P52QG8P+8M\n",
|
469 |
+
"\n",
|
470 |
+
"\n",
|
471 |
+
" \n",
|
472 |
+
" address: 164 52 Soi Nom Chit, Thung Phaya Thai, Ratchathewi\n",
|
473 |
+
"\n",
|
474 |
+
" location: {'lat': 13.7549367, 'lng': 100.5312989}\n",
|
475 |
+
"\n",
|
476 |
+
" lacation_name: ร้านนันทา\n",
|
477 |
+
"\n",
|
478 |
+
" opening hours: {'open_now': True}\n",
|
479 |
+
"\n",
|
480 |
+
" rating: 0\n",
|
481 |
+
"\n",
|
482 |
+
" plus code: 7P52QG3J+XG\n",
|
483 |
+
"\n",
|
484 |
+
"\n",
|
485 |
+
" \n",
|
486 |
+
" address: 156/2 ซอย เพชรบุรี 7 Phetchaburi Rd, Thung Phaya Thai, Ratchathewi\n",
|
487 |
+
"\n",
|
488 |
+
" location: {'lat': 13.7564122, 'lng': 100.5303184}\n",
|
489 |
+
"\n",
|
490 |
+
" lacation_name: ร้านชำทองศรี\n",
|
491 |
+
"\n",
|
492 |
+
" opening hours: N/A\n",
|
493 |
+
"\n",
|
494 |
+
" rating: 0\n",
|
495 |
+
"\n",
|
496 |
+
" plus code: 7P52QG4J+H4\n",
|
497 |
+
"\n",
|
498 |
+
"\n",
|
499 |
+
" \n",
|
500 |
+
" address: QG6V+8G2, Soi Ratchaprarop 22, Makkasan, Ratchathewi\n",
|
501 |
+
"\n",
|
502 |
+
" location: {'lat': 13.7607492, 'lng': 100.5437717}\n",
|
503 |
+
"\n",
|
504 |
+
" lacation_name: PB Minimart\n",
|
505 |
+
"\n",
|
506 |
+
" opening hours: {'open_now': True}\n",
|
507 |
+
"\n",
|
508 |
+
" rating: 0\n",
|
509 |
+
"\n",
|
510 |
+
" plus code: N/A\n",
|
511 |
+
"\n",
|
512 |
+
"\n",
|
513 |
+
" \n",
|
514 |
+
" address: 5 ซอย อร่ามศรี Phaya Thai Rd, Thung Phaya Thai, Ratchathewi\n",
|
515 |
+
"\n",
|
516 |
+
" location: {'lat': 13.7552514, 'lng': 100.5324115}\n",
|
517 |
+
"\n",
|
518 |
+
" lacation_name: อนิรุช มินิมาร์ท\n",
|
519 |
+
"\n",
|
520 |
+
" opening hours: {'open_now': True}\n",
|
521 |
+
"\n",
|
522 |
+
" rating: 0\n",
|
523 |
+
"\n",
|
524 |
+
" plus code: 7P52QG4J+4X\n",
|
525 |
+
"\n",
|
526 |
+
"\n",
|
527 |
+
" \n",
|
528 |
+
" address: 208/1 Ratchaprarop Rd, Makkasan, Ratchathewi\n",
|
529 |
+
"\n",
|
530 |
+
" location: {'lat': 13.758491, 'lng': 100.5467617}\n",
|
531 |
+
"\n",
|
532 |
+
" lacation_name: ร้านป้าแดง มินิมาร์ท\n",
|
533 |
+
"\n",
|
534 |
+
" opening hours: {}\n",
|
535 |
+
"\n",
|
536 |
+
" rating: 0\n",
|
537 |
+
"\n",
|
538 |
+
" plus code: 7P52QG5W+9P\n",
|
539 |
+
"\n",
|
540 |
+
"\n",
|
541 |
+
" \n",
|
542 |
+
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
543 |
+
"Name: analyst\n",
|
544 |
+
"\n",
|
545 |
+
"I have gathered information about grocery stores (ร้านของชำ) near the Victory Monument (อนุสาวรีย์ชัยสมรภูมิ). Here are some of the notable results:\n",
|
546 |
+
"\n",
|
547 |
+
"1. **ร้านของชำ 1**\n",
|
548 |
+
" - **Address:** 163, 25 Soi Phetchaburi 5, Thung Phaya Thai, Ratchathewi\n",
|
549 |
+
" - **Location:** Latitude 13.7575211, Longitude 100.5284703\n",
|
550 |
+
" - **Rating:** 5\n",
|
551 |
+
" - **Open Now:** Yes\n",
|
552 |
+
"\n",
|
553 |
+
"2. **ร้านของชำ 2**\n",
|
554 |
+
" - **Address:** 467 1 Ratchawithi Rd, Thanon Phaya Thai, Ratchathewi\n",
|
555 |
+
" - **Location:** Latitude 13.7642431, Longitude 100.539397\n",
|
556 |
+
" - **Rating:** 4\n",
|
557 |
+
" - **Open Now:** Yes\n",
|
558 |
+
"\n",
|
559 |
+
"3. **ร้านของชำ 3**\n",
|
560 |
+
" - **Address:** 184/4 Soi Phahon Yothin 1, Phaya Thai\n",
|
561 |
+
" - **Location:** Latitude 13.7698885, Longitude 100.5358358\n",
|
562 |
+
" - **Rating:** 4.5\n",
|
563 |
+
" - **Open Now:** Yes\n",
|
564 |
+
"\n",
|
565 |
+
"4. **ร้านของชำ 4**\n",
|
566 |
+
" - **Address:** 476 Thanon Asok - Din Daeng, Din Daeng\n",
|
567 |
+
" - **Location:** Latitude 13.7631408, Longitude 100.5455863\n",
|
568 |
+
" - **Rating:** 4.4\n",
|
569 |
+
" - **Open Now:** Yes\n",
|
570 |
+
"\n",
|
571 |
+
"5. **ร้านของชำ 5**\n",
|
572 |
+
" - **Address:** 140/6 Ratchawithi Rd, Phaya Thai\n",
|
573 |
+
" - **Location:** Latitude 13.7708078, Longitude 100.5345492\n",
|
574 |
+
" - **Rating:** 5\n",
|
575 |
+
" - **Open Now:** Yes\n",
|
576 |
+
"\n",
|
577 |
+
"There are a total of 18 grocery stores found in the vicinity.\n",
|
578 |
+
"\n",
|
579 |
+
"Next, I will need to gather demographic data regarding the population in the area surrounding the Victory Monument to analyze the business opportunity further. Please hold on while I collect that information.\n",
|
580 |
+
"Tool Calls:\n",
|
581 |
+
" google_places (call_WuhlWTBQgU0nZwbMBdCVwf6i)\n",
|
582 |
+
" Call ID: call_WuhlWTBQgU0nZwbMBdCVwf6i\n",
|
583 |
+
" Args:\n",
|
584 |
+
" query: Victory Monument Bangkok demographics\n",
|
585 |
"=================================\u001b[1m Tool Message \u001b[0m=================================\n",
|
586 |
"Name: google_places\n",
|
587 |
"\n",
|
588 |
+
"1. Victory Monument\n",
|
589 |
+
"Address: QG7Q+X87, Phahon Yothin Rd, Khwaeng Thanon Phaya Thai, Khet Ratchathewi, Krung Thep Maha Nakhon 10400, Thailand\n",
|
590 |
+
"Google place ID: ChIJgV6P8rCe4jARDeGu63VNWdQ\n",
|
591 |
+
"Phone: Unknown\n",
|
592 |
+
"Website: Unknown\n",
|
593 |
+
"\n",
|
594 |
+
"\n",
|
595 |
+
"2. Victory Monument\n",
|
596 |
+
"Address: Thanon Phaya Thai, Ratchathewi, Bangkok 10400, Thailand\n",
|
597 |
+
"Google place ID: ChIJgyNezLae4jARDb68DW25BV8\n",
|
598 |
+
"Phone: Unknown\n",
|
599 |
+
"Website: http://www.bts.co.th/\n",
|
600 |
+
"\n",
|
601 |
+
"\n",
|
602 |
+
"3. Victory Monument\n",
|
603 |
+
"Address: Thanon Phaya Thai, Ratchathewi, Bangkok 10400, Thailand\n",
|
604 |
+
"Google place ID: ChIJEwyQ3rCe4jARk62JeFdOh4g\n",
|
605 |
+
"Phone: Unknown\n",
|
606 |
+
"Website: Unknown\n",
|
607 |
+
"\n",
|
608 |
+
"\n",
|
609 |
+
"4. Victory momument market\n",
|
610 |
+
"Address: QG7Q+JFF, Thanon Phaya Thai, Ratchathewi, Bangkok 10400, Thailand\n",
|
611 |
+
"Google place ID: ChIJ20qIBgCf4jAR2GmWQw3fYN0\n",
|
612 |
+
"Phone: Unknown\n",
|
613 |
+
"Website: Unknown\n",
|
614 |
+
"\n",
|
615 |
+
"\n",
|
616 |
+
"5. Victory Monument (Ratchawithi side)\n",
|
617 |
+
"Address: Thung Phaya Thai, Ratchathewi, Bangkok 10400, Thailand\n",
|
618 |
+
"Google place ID: ChIJ-fASHLGe4jAR6aspBE2QiTk\n",
|
619 |
+
"Phone: Unknown\n",
|
620 |
+
"Website: Unknown\n",
|
621 |
+
"\n",
|
622 |
+
"\n",
|
623 |
+
"6. VIX Bangkok Hotel @ Victory Monument\n",
|
624 |
+
"Address: 459 13-15 Thanon Ratchawithi, Khwaeng Thanon Phaya Thai, Khet Ratchathewi, Krung Thep Maha Nakhon 10400, Thailand\n",
|
625 |
+
"Google place ID: ChIJi6NE7LGe4jARIVOxSOdE7Ns\n",
|
626 |
+
"Phone: 065 441 4164\n",
|
627 |
+
"Website: https://www.vixbangkokhotel.com/\n",
|
628 |
+
"\n",
|
629 |
+
"\n",
|
630 |
+
"7. Victory Point\n",
|
631 |
+
"Address: QG7Q+F9R, ซอยราชวิถี 9 (เลิศปัญญา, Khwaeng Thanon Phaya Thai, Khet Ratchathewi, Krung Thep Maha Nakhon 10400, Thailand\n",
|
632 |
+
"Google place ID: ChIJO4Fr2rCe4jARspM8TZcOE7E\n",
|
633 |
+
"Phone: Unknown\n",
|
634 |
+
"Website: Unknown\n",
|
635 |
+
"\n",
|
636 |
+
"\n",
|
637 |
+
"8. Victory Monument (Phaya Thai Side)\n",
|
638 |
+
"Address: Thanon Phaya Thai, Ratchathewi, Bangkok 10400, Thailand\n",
|
639 |
+
"Google place ID: ChIJj3NG3rCe4jARZCgajLqNYwY\n",
|
640 |
+
"Phone: Unknown\n",
|
641 |
+
"Website: Unknown\n",
|
642 |
+
"\n",
|
643 |
+
"\n",
|
644 |
+
"9. Victory Monument (Din Daeng side)\n",
|
645 |
+
"Address: Thanon Phaya Thai, Ratchathewi, Bangkok 10400, Thailand\n",
|
646 |
+
"Google place ID: ChIJuWPz8bCe4jAR5dvTSk4O8uk\n",
|
647 |
+
"Phone: Unknown\n",
|
648 |
+
"Website: Unknown\n",
|
649 |
+
"\n",
|
650 |
+
"\n",
|
651 |
+
"10. World War I Volunteer Monument\n",
|
652 |
+
"Address: 4 Soi Na Phra That, Khwaeng Phra Borom Maha Ratchawang, Khet Phra Nakhon, Krung Thep Maha Nakhon 10200, Thailand\n",
|
653 |
+
"Google place ID: ChIJr1UBJw2Z4jARZ5tidTivoDA\n",
|
654 |
+
"Phone: Unknown\n",
|
655 |
+
"Website: http://www.resource.lib.su.ac.th/rattanakosin/index.php/2014-10-27-08-52-05/2015-10-19-03-54-00/2015-10-19-04-17-51\n",
|
656 |
+
"\n",
|
657 |
+
"\n",
|
658 |
+
"11. King Rama VI Monument\n",
|
659 |
+
"Address: 315 Thanon Ratchawithi, Khwaeng Thung Phaya Thai, Khet Ratchathewi, Krung Thep Maha Nakhon 10400, Thailand\n",
|
660 |
+
"Google place ID: ChIJ8825fLKe4jAR4OhUee1Kyfc\n",
|
661 |
+
"Phone: Unknown\n",
|
662 |
+
"Website: Unknown\n",
|
663 |
"\n",
|
664 |
"\n",
|
665 |
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
666 |
"Name: analyst\n",
|
667 |
"\n",
|
668 |
+
"I was unable to find specific demographic data directly related to the population around the Victory Monument. However, I can summarize the key points regarding the grocery stores found in the area:\n",
|
669 |
+
"\n",
|
670 |
+
"### Grocery Stores Near Victory Monument:\n",
|
671 |
+
"1. **ร้านของชำ 1**\n",
|
672 |
+
" - **Address:** 163, 25 Soi Phetchaburi 5, Thung Phaya Thai, Ratchathewi\n",
|
673 |
+
" - **Rating:** 5\n",
|
674 |
+
" - **Open Now:** Yes\n",
|
675 |
+
"\n",
|
676 |
+
"2. **ร้านของชำ 2**\n",
|
677 |
+
" - **Address:** 467 1 Ratchawithi Rd, Thanon Phaya Thai, Ratchathewi\n",
|
678 |
+
" - **Rating:** 4\n",
|
679 |
+
" - **Open Now:** Yes\n",
|
680 |
+
"\n",
|
681 |
+
"3. **ร้านของชำ 3**\n",
|
682 |
+
" - **Address:** 184/4 Soi Phahon Yothin 1, Phaya Thai\n",
|
683 |
+
" - **Rating:** 4.5\n",
|
684 |
+
" - **Open Now:** Yes\n",
|
685 |
+
"\n",
|
686 |
+
"4. **ร้านของชำ 4**\n",
|
687 |
+
" - **Address:** 476 Thanon Asok - Din Daeng, Din Daeng\n",
|
688 |
+
" - **Rating:** 4.4\n",
|
689 |
+
" - **Open Now:** Yes\n",
|
690 |
+
"\n",
|
691 |
+
"5. **ร้านของชำ 5**\n",
|
692 |
+
" - **Address:** 140/6 Ratchawithi Rd, Phaya Thai\n",
|
693 |
+
" - **Rating:** 5\n",
|
694 |
+
" - **Open Now:** Yes\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
"\n",
|
696 |
"### Next Steps:\n",
|
697 |
+
"To analyze the business opportunity effectively, I recommend looking into local demographic statistics such as population density, average income, and consumer behavior in the Ratchathewi district. This information can often be found through local government resources or demographic research websites.\n",
|
698 |
+
"\n",
|
699 |
+
"If you need further assistance in gathering specific demographic data or any other information, please let me know!\n",
|
700 |
+
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
701 |
+
"Name: data_collector\n",
|
702 |
+
"\n",
|
703 |
+
"FINAL ANSWER: I have gathered information about grocery stores near the Victory Monument (อนุสาวรีย์ชัยสมรภูมิ) and summarized the key points regarding the stores. However, I was unable to find specific demographic data directly related to the population around the Victory Monument. \n",
|
704 |
+
"\n",
|
705 |
+
"### Grocery Stores Near Victory Monument:\n",
|
706 |
+
"1. **ร้านของชำ 1**\n",
|
707 |
+
" - **Address:** 163, 25 Soi Phetchaburi 5, Thung Phaya Thai, Ratchathewi\n",
|
708 |
+
" - **Rating:** 5\n",
|
709 |
+
" - **Open Now:** Yes\n",
|
710 |
+
"\n",
|
711 |
+
"2. **ร้านของชำ 2**\n",
|
712 |
+
" - **Address:** 467 1 Ratchawithi Rd, Thanon Phaya Thai, Ratchathewi\n",
|
713 |
+
" - **Rating:** 4\n",
|
714 |
+
" - **Open Now:** Yes\n",
|
715 |
+
"\n",
|
716 |
+
"3. **ร้านของชำ 3**\n",
|
717 |
+
" - **Address:** 184/4 Soi Phahon Yothin 1, Phaya Thai\n",
|
718 |
+
" - **Rating:** 4.5\n",
|
719 |
+
" - **Open Now:** Yes\n",
|
720 |
+
"\n",
|
721 |
+
"4. **ร้านของชำ 4**\n",
|
722 |
+
" - **Address:** 476 Thanon Asok - Din Daeng, Din Daeng\n",
|
723 |
+
" - **Rating:** 4.4\n",
|
724 |
+
" - **Open Now:** Yes\n",
|
725 |
+
"\n",
|
726 |
+
"5. **ร้านของชำ 5**\n",
|
727 |
+
" - **Address:** 140/6 Ratchawithi Rd, Phaya Thai\n",
|
728 |
+
" - **Rating:** 5\n",
|
729 |
+
" - **Open Now:** Yes\n",
|
730 |
+
"\n",
|
731 |
+
"For further analysis, I recommend looking into local demographic statistics such as population density, average income, and consumer behavior in the Ratchathewi district. If you need more assistance, feel free to ask!\n"
|
|
|
|
|
|
|
|
|
732 |
]
|
733 |
}
|
734 |
],
|
735 |
"source": [
|
736 |
+
"# question = \"ค้นหาร้านของชำใกล้อนุสาวรีย์ชัยฯ พร้อมวิเคราะห์จำนวนประชากร\"\n",
|
737 |
"\n",
|
738 |
"# graph = workflow.compile()\n",
|
739 |
"\n",
|
chatbot_multiagent.py
CHANGED
@@ -226,7 +226,7 @@ graph = workflow.compile()
|
|
226 |
# pass
|
227 |
|
228 |
# %%
|
229 |
-
# question = "
|
230 |
|
231 |
# graph = workflow.compile()
|
232 |
|
|
|
226 |
# pass
|
227 |
|
228 |
# %%
|
229 |
+
# question = "ค้นหาร้านของชำใกล้อนุสาวรีย์ชัยฯ พร้อมวิเคราะห์จำนวนประชากร"
|
230 |
|
231 |
# graph = workflow.compile()
|
232 |
|
user_question_testsets.txt
CHANGED
@@ -11,4 +11,4 @@ Feasibility analysis for a bookstore near Thonglor
|
|
11 |
วิเคราะห์การเปิดร้านอาหารใกล้สยามพารากอน
|
12 |
วิเคราะห์คู่แข่งของร้านเบเกอรี่ใกล้ตลาดจตุจักร
|
13 |
ค้นหาร้านของชำใกล้อนุสาวรีย์ชัยฯ พร้อมวิเคราะห์จำนวนประชากร
|
14 |
-
วิเคราะห์ความเป็นไปได้ในการเปิดร้านหนังสือใกล้ทองหล่อ
|
|
|
11 |
วิเคราะห์การเปิดร้านอาหารใกล้สยามพารากอน
|
12 |
วิเคราะห์คู่แข่งของร้านเบเกอรี่ใกล้ตลาดจตุจักร
|
13 |
ค้นหาร้านของชำใกล้อนุสาวรีย์ชัยฯ พร้อมวิเคราะห์จำนวนประชากร
|
14 |
+
วิเคราะห์ความเป็นไปได้ในการเปิดร้านหนังสือใกล้ทองหล่อ
|