Spaces:
Runtime error
Runtime error
File size: 30,638 Bytes
4d50781 7c2edac 4d50781 37050e9 4d50781 7c2edac 4d50781 2674047 4d50781 2674047 4d50781 7c2edac 1e77711 7c2edac 4d50781 7c2edac 4d50781 7c2edac 1e77711 7c2edac 4d50781 7c2edac 4d50781 7c2edac 4d50781 7c2edac 4d50781 7c2edac 1e77711 7c2edac 1e77711 7c2edac 37050e9 7c2edac 1e77711 7c2edac 4d50781 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 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 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"from chatbot_multiagent import submitUserMessage\n",
"import random\n",
"from math import inf\n",
"\n",
"def QA_sample_test(quesion_test:list[str], num_samples:int=inf):\n",
" \n",
" # Ensure there are at least 5 lines in the list\n",
" num_samples = min(10, len(quesion_test))\n",
" sample_quesion = random.sample(quesion_test, num_samples)\n",
" \n",
" result = []\n",
" for quesion in sample_quesion:\n",
" try:\n",
" answer = submitUserMessage(quesion)\n",
" result.append({'quesion': quesion, 'answer': answer}) \n",
" except Exception as e:\n",
" result.append({'quesion': quesion, 'error': e}) \n",
" \n",
" return result "
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"with open('./testsets/user_question_testsets.txt', 'r') as file:\n",
" quesion_test = file.readlines() \n",
"\n",
"results = QA_sample_test(quesion_test, num_samples=15)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Results saved to testsets/QA.txt\n"
]
}
],
"source": [
"import pprint \n",
"\n",
"# Create a PrettyPrinter instance with a desired indentation level\n",
"pp = pprint.PrettyPrinter(indent=4)\n",
"\n",
"# Convert the list of dictionaries to a pretty-printed string\n",
"results_str = pp.pformat(results)\n",
"\n",
"# Specify the file path where you want to save the string\n",
"file_path = 'testsets/QA.txt'\n",
"\n",
"# Save the pretty-printed string to a .txt file\n",
"with open(file_path, 'w') as file:\n",
" file.write(results_str)\n",
"\n",
"print(f\"Results saved to {file_path}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{'answer': '### \\n'\n",
" '\\n'\n",
" '#### 1. List of Competitors (Grocery Stores)\\n'\n",
" '- **ร้านขายของชำ 7**\\n'\n",
" ' - Address: 156/5 Phetchaburi Rd, Thung Phaya Thai, Ratchathewi\\n'\n",
" ' - Rating: 3\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ อาหารสด**\\n'\n",
" ' - Address: 467 Ratchawithi Rd, Thanon Phaya Thai, Ratchathewi\\n'\n",
" ' - Rating: 4\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ โอเค**\\n'\n",
" ' - Address: 163, 25 Soi Phetchaburi 5, Thung Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ พิชิต**\\n'\n",
" ' - Address: 184/4 Soi Phahon Yothin 1, Phaya Thai\\n'\n",
" ' - Rating: 4.5\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ นคร**\\n'\n",
" ' - Address: 476 Thanon Asok - Din Daeng, Din Daeng\\n'\n",
" ' - Rating: 4.4\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ อิ่มอร่อย**\\n'\n",
" ' - Address: 140/6 Ratchawithi Rd, Phaya Thai\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ สบายใจ**\\n'\n",
" ' - Address: 504 Thanon Asok - Din Daeng, Din Daeng\\n'\n",
" ' - Rating: 3\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ น้องนุช**\\n'\n",
" ' - Address: 292 Takhe Alley, Din Daeng\\n'\n",
" ' - Rating: 4.3\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ อร่อย**\\n'\n",
" ' - Address: 188 Thanon Asok - Din Daeng, Din Daeng\\n'\n",
" ' - Rating: 4\\n'\n",
" '\\n'\n",
" '- **ร้านขายของชำ สินค้า**\\n'\n",
" ' - Address: 8/12 Phetchaburi Rd, Makkasan, Ratchathewi\\n'\n",
" ' - Rating: 4\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data\\n'\n",
" '- **Number of Competitors**: More than 20 grocery stores in the '\n",
" 'vicinity.\\n'\n",
" '- **Rating Range**: 0 to 5 (with several stores rated 4 and '\n",
" 'above).\\n'\n",
" '- **Community Type**: Urban area in Bangkok (Ratchathewi '\n",
" 'district).\\n'\n",
" '- **Population Data**: Bangkok has a population of over 10 '\n",
" 'million, with high density in urban districts.\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary\\n'\n",
" 'The Anusawari Chai area is characterized by a high density of '\n",
" 'grocery stores, with over 20 establishments within a 1 km radius. '\n",
" 'The ratings of these stores vary, with many achieving ratings of '\n",
" '4 and above, indicating a competitive market for grocery retail. '\n",
" 'The area is part of Bangkok, which is known for its significant '\n",
" 'population density, particularly in urban districts like '\n",
" 'Ratchathewi. This suggests a robust demand for grocery services, '\n",
" 'making it a potentially lucrative area for grocery businesses. \\n'\n",
" '\\n'\n",
" 'If you need further insights or specific data, feel free to ask!',\n",
" 'quesion': 'ค้นหาร้านของชำใกล้อนุสาวรีย์ชัยฯ พร้อมวิเคราะห์จำนวนประชากร\\n'},\n",
" {'answer': '### \\n'\n",
" '\\n'\n",
" '#### 1. List of Competitors (Coffee Shops near MBK Center):\\n'\n",
" '- **BEANS Coffee Roaster Paragon**\\n'\n",
" ' - Address: 991/1 Rama I Rd, Pathum Wan\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '- **The Palette**\\n'\n",
" ' - Address: Phaya Thai Rd, Thanon Phetchaburi, Ratchathewi\\n'\n",
" ' - Rating: 4.8\\n'\n",
" '\\n'\n",
" '- **Olympic Coffee**\\n'\n",
" ' - Address: 43/4 Rama VI Rd, Rong Muang, Pathum Wan\\n'\n",
" ' - Rating: 4.8\\n'\n",
" '\\n'\n",
" '- **Treasure Specialty Coffee**\\n'\n",
" ' - Address: MINT TOWER Bantadthong Phetchaburi Rd, Subdistrict '\n",
" 'Pathum Wan\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '\\n'\n",
" '- **Salotto Coffee**\\n'\n",
" ' - Address: 813/8 Phetchaburi Rd, Thanon Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" \"- **Sip 'n Drip**\\n\"\n",
" ' - Address: 36, 6 Kasem San 1 Alley, Wang Mai, Pathum Wan\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '\\n'\n",
" '- **D Coffee House**\\n'\n",
" ' - Address: 445 Rama I Rd, Rong Muang, Pathum Wan\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '\\n'\n",
" '- **Gallery Drip Coffee**\\n'\n",
" ' - Address: 939 Rama I Rd, Wang Mai, Pathum Wan\\n'\n",
" ' - Rating: 4.6\\n'\n",
" '\\n'\n",
" '- **GATTA CAFÉ**\\n'\n",
" ' - Address: 2nd Floor Siam Square One 388 Rama I Rd, Pathum Wan\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '\\n'\n",
" '- **echo bar**\\n'\n",
" ' - Address: Siam Discovery Center 194 Phaya Thai Rd, Pathum Wan\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data:\\n'\n",
" '- **Number of Competitors**: 10 coffee shops listed.\\n'\n",
" \"- **Range of Competitors' Ratings**: 3.5 to 5.\\n\"\n",
" '- **Community Type**: Urban area (Pathum Wan district).\\n'\n",
" '- **Household Expenditures**: Not available.\\n'\n",
" '- **Population Data**: Not available.\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary:\\n'\n",
" 'The area surrounding MBK Center is rich in coffee shop options, '\n",
" 'with a total of 10 notable competitors. The ratings of these '\n",
" 'establishments range from 3.5 to 5, indicating a generally high '\n",
" 'level of customer satisfaction. The coffee shops are located in '\n",
" 'an urban community, which is likely to attract both locals and '\n",
" 'tourists. However, specific data regarding household expenditures '\n",
" 'and population demographics in the vicinity was not accessible. '\n",
" 'This information could be beneficial for understanding the market '\n",
" 'dynamics and consumer behavior in the area. \\n'\n",
" '\\n'\n",
" 'If you need further insights or specific data, feel free to ask!',\n",
" 'quesion': 'coffee shop near mbk center\\n'},\n",
" {'answer': '### Final Report on the Feasibility of Opening a Restaurant Near '\n",
" 'Siam Paragon\\n'\n",
" '\\n'\n",
" '#### 1. Competitors\\n'\n",
" '- **List of Competitors**:\\n'\n",
" ' - Shree Bhavan Pure South Indian Vegetarian Restaurant (Rating: '\n",
" '4.9)\\n'\n",
" ' - I Food Bar & Restaurant (Rating: 4.8)\\n'\n",
" ' - Tan Kun ท่านขุน Central World (Rating: 4.7)\\n'\n",
" ' - Jasmine Siam Kitchen (Rating: 4.7)\\n'\n",
" ' - Ñam Ñam Pasta and Tapas (Rating: 4.2)\\n'\n",
" ' - Anjappar Chettinad Restaurant (Rating: 4.5)\\n'\n",
" ' - Inter Restaurants since 1981 (Rating: 4.4)\\n'\n",
" ' - Arun Thai Cuisine by SEE FAH (Rating: 4.4)\\n'\n",
" ' - Indiagate Restaurant (Rating: 4.6)\\n'\n",
" ' - Metro Square SiamParagon (Rating: 4.7)\\n'\n",
" ' - Prego Bangkok (Rating: 4.4)\\n'\n",
" ' - KAI Japanese Restaurant (Rating: 5.0)\\n'\n",
" ' - Madras Darbar Indian Restaurant (Rating: 4.7)\\n'\n",
" ' - Honest Vegetarian Indian Restaurant (Rating: 4.4)\\n'\n",
" ' - Chotivala 100% Pure Vegetarian & Jain Food (Rating: 4.3)\\n'\n",
" ' - Na Bangkok Thai Street Food (Rating: 3.3)\\n'\n",
" ' - Shichi Japanese Restaurant (Rating: 4.8)\\n'\n",
" \" - Bangkok'78 (Rating: 4.3)\\n\"\n",
" ' - Sanjha Chulha Pratunam Bangkok (Rating: 4.4)\\n'\n",
" ' - BurnBusaba Central World (Rating: 4.4)\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data\\n'\n",
" '- **Number of Competitors**: Over 20 restaurants within a 1 km '\n",
" 'radius.\\n'\n",
" \"- **Range of Competitors' Ratings**: 3.3 to 5.0.\\n\"\n",
" '- **Community Type**: Urban, high foot traffic area due to '\n",
" 'shopping and entertainment.\\n'\n",
" '- **Household Expenditures**: Not specifically gathered, but the '\n",
" 'presence of high-end shopping suggests a higher average '\n",
" 'expenditure.\\n'\n",
" '- **Population Data**: Not specifically gathered, but the area is '\n",
" 'known for a mix of locals and tourists.\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary\\n'\n",
" 'The area around Siam Paragon is highly competitive for the '\n",
" 'restaurant business, with a significant number of established '\n",
" 'restaurants offering a variety of cuisines and maintaining high '\n",
" 'ratings. The presence of high-quality competitors indicates a '\n",
" 'demanding customer base, which could pose challenges for a new '\n",
" 'restaurant. \\n'\n",
" '\\n'\n",
" 'To succeed, a new restaurant would need to differentiate itself '\n",
" 'through unique offerings, exceptional service, or innovative '\n",
" 'marketing strategies. Additionally, understanding the local '\n",
" 'demographic and their spending habits will be crucial in '\n",
" \"tailoring the restaurant's concept and menu.\\n\"\n",
" '\\n'\n",
" 'In conclusion, while the market is competitive, there is '\n",
" 'potential for success if the restaurant can carve out a niche and '\n",
" 'meet the expectations of the discerning clientele frequenting the '\n",
" 'area.\\n'\n",
" '\\n',\n",
" 'quesion': 'Analyze the feasibility of opening a restaurant near Siam '\n",
" 'Paragon\\n'},\n",
" {'answer': '### Final Report on Competitors of Bakeries Near Chatuchak '\n",
" 'Market\\n'\n",
" '\\n'\n",
" '#### 1. List of Competitors:\\n'\n",
" '- **Sanan Bakery** (Rating: 4.4)\\n'\n",
" '- **The Croissant Corner** (Rating: 4.7)\\n'\n",
" '- **Baked With Hearts** (Rating: 4.6)\\n'\n",
" '- **JJ Mall One More Bite Japanese Bakery** (Rating: 4.9)\\n'\n",
" '- **Triple D Bakery @ Chatuchak Market** (Rating: 4.9)\\n'\n",
" \"- **Bellinee's Bake & Brew** (Rating: 3.9)\\n\"\n",
" '- **Miss Muay Bakery** (Rating: 3.8)\\n'\n",
" '- **Mom’s FF Cafe & Bakery** (Rating: 5)\\n'\n",
" '- **Wipada Herb Coffee and Bakery** (Rating: 0)\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data:\\n'\n",
" '- **Total Number of Competitors**: 15 bakeries found.\\n'\n",
" '- **Rating Range**: 0 to 5 (with most competitors rated above '\n",
" '4).\\n'\n",
" '- **Community Type**: Urban area with a mix of local residents '\n",
" 'and tourists.\\n'\n",
" '- **Household Expenditures**: Data not available.\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary:\\n'\n",
" 'The bakery market near Chatuchak Market is competitive, with '\n",
" 'several establishments offering a variety of baked goods. The '\n",
" 'ratings of these bakeries indicate a generally positive reception '\n",
" 'from customers, with several achieving ratings above 4. The '\n",
" 'presence of both local and tourist traffic suggests a vibrant '\n",
" 'market environment, which could be beneficial for a new bakery '\n",
" 'entering this area. However, the competition is strong, '\n",
" 'particularly from bakeries like \"JJ Mall One More Bite Japanese '\n",
" 'Bakery\" and \"Triple D Bakery,\" both of which have high ratings '\n",
" 'and likely loyal customer bases.\\n'\n",
" '\\n'\n",
" 'In conclusion, while the market presents opportunities, it also '\n",
" 'requires a strategic approach to differentiate from established '\n",
" 'competitors. \\n'\n",
" '\\n',\n",
" 'quesion': 'วิเคราะห์คู่แข่งของร้านเบเกอรี่ใกล้ตลาดจตุจักร\\n'},\n",
" {'answer': '### Final Report on Restaurant Opening Near Siam Paragon\\n'\n",
" '\\n'\n",
" '#### 1. Competitors List\\n'\n",
" '- **Shree Bhavan Pure South Indian Vegetarian Restaurant** - '\n",
" 'Rating: 4.9\\n'\n",
" '- **I Food Bar & Restaurant** - Rating: 4.8\\n'\n",
" '- **Tan Kun (Central World)** - Rating: 4.7\\n'\n",
" '- **Jasmine Siam Kitchen** - Rating: 4.7\\n'\n",
" '- **Metro Square SiamParagon** - Rating: 4.7\\n'\n",
" '- **KAI Japanese Restaurant Gaysorn Amarin** - Rating: 5.0\\n'\n",
" '- **Madras Darbar Indian Restaurant** - Rating: 4.7\\n'\n",
" \"- **Bangkok'78** - Rating: 4.3\\n\"\n",
" '- **Additional competitors**: More than 20 restaurants in the '\n",
" 'vicinity.\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data\\n'\n",
" '- **Number of Competitors**: More than 20 restaurants nearby.\\n'\n",
" '- **Rating Range**: 3.3 to 5.0\\n'\n",
" '- **Community Type**: Urban community with a mix of residential, '\n",
" 'commercial, and tourist activities.\\n'\n",
" '- **Household Expenditures**: Generally high due to the presence '\n",
" 'of luxury shopping and dining options.\\n'\n",
" '- **Population**: Densely populated area typical of urban centers '\n",
" 'in Bangkok.\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary\\n'\n",
" 'Siam Paragon is located in a bustling urban area of Bangkok, '\n",
" 'characterized by a high density of both local residents and '\n",
" 'tourists. The presence of over 20 competing restaurants within a '\n",
" '1 km radius indicates a vibrant dining scene, with ratings '\n",
" 'ranging from 3.3 to 5.0. This competitive landscape suggests a '\n",
" 'strong demand for diverse dining options, particularly in the mid '\n",
" 'to high-end market segments.\\n'\n",
" '\\n'\n",
" 'The high household expenditures in the area, driven by the luxury '\n",
" 'shopping environment of Siam Paragon, further support the '\n",
" 'viability of opening a new restaurant. Potential restaurant '\n",
" 'owners should consider the existing competition and aim to '\n",
" 'differentiate their offerings, possibly by focusing on unique '\n",
" 'cuisine, exceptional service, or innovative dining experiences.\\n'\n",
" '\\n'\n",
" 'In conclusion, the area around Siam Paragon presents a promising '\n",
" 'opportunity for new restaurant ventures, provided that they can '\n",
" 'effectively compete with established players and cater to the '\n",
" 'affluent customer base.\\n'\n",
" '\\n',\n",
" 'quesion': 'วิเคราะห์การเปิดร้านอาหารใกล้สยามพารากอน\\n'},\n",
" {'answer': '### Final Report on the Possibility of Opening a Bookstore Near '\n",
" 'Thonglor\\n'\n",
" '\\n'\n",
" '#### 1. Competitors\\n'\n",
" '- **List of Competitors:**\\n'\n",
" ' 1. **Book Link Co., LTD.**\\n'\n",
" ' - Address: 47/3 Ekkamai 28 Alley, Khlong Tan Nuea, Watthana\\n'\n",
" ' - Rating: 4\\n'\n",
" ' 2. **Asiabooks Bangkok Hospital**\\n'\n",
" ' - Address: 1-06 Bangkok Plaza, New Petchaburi Rd, Bang Kapi, '\n",
" 'Huai Khwang\\n'\n",
" ' - Rating: 3.5\\n'\n",
" ' 3. **ร้านหนังสือพัฒนาการ (Pattanakarn Bookstore)**\\n'\n",
" ' - Address: 22 Bangkok Plaza Soi Phetchaburi 47 Yaek 10, Bang '\n",
" 'Kapi, Huai Khwang\\n'\n",
" ' - Rating: 4\\n'\n",
" ' 4. **ร้านหนังสือสยาม (Siam Bookstore)**\\n'\n",
" ' - Address: 2447/7 New Petchaburi Rd, Bang Kapi, Huai Khwang\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data\\n'\n",
" '- **Number of Competitors:** 4 bookstores\\n'\n",
" '- **Competitor Ratings Range:** 3.5 to 5\\n'\n",
" '- **Location Coordinates:** Latitude 13.7424537, Longitude '\n",
" '100.5854359\\n'\n",
" '- **Population Data:** Not available\\n'\n",
" '- **Community Type:** Not available\\n'\n",
" '- **Household Expenditures:** Not available\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary\\n'\n",
" 'The Thonglor area has a competitive landscape with four existing '\n",
" 'bookstores, indicating a demand for books in the vicinity. The '\n",
" 'ratings of these competitors suggest a healthy market, with some '\n",
" 'stores achieving high customer satisfaction. However, specific '\n",
" 'demographic and economic data such as population density, '\n",
" 'community type, and household expenditures were not retrievable, '\n",
" 'which limits a more detailed analysis of the market potential.\\n'\n",
" '\\n'\n",
" 'Given the existing competition and the ratings, opening a '\n",
" 'bookstore in Thonglor could be viable, especially if the new '\n",
" 'store can offer unique products or services that differentiate it '\n",
" 'from the current offerings.\\n'\n",
" '\\n'\n",
" '### \\n'\n",
" 'This report summarizes the potential for opening a bookstore near '\n",
" 'Thonglor based on available data. If further analysis or specific '\n",
" 'inquiries are needed, please feel free to ask!',\n",
" 'quesion': 'วิเคราะห์ความเป็นไปได้ในการเปิดร้านหนังสือใกล้ทองหล่อ\\n'},\n",
" {'error': InternalServerError(\"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}}\"),\n",
" 'quesion': 'ร้านกาแฟใกล้เซ็นทรัลเวิลด์\\n'},\n",
" {'answer': '### \\n'\n",
" '\\n'\n",
" '#### 1. List of Competitors (Coffee Shops Near MBK Center)\\n'\n",
" '- **BEANS Coffee Roaster Paragon** - Rating: 5\\n'\n",
" '- **The Palette** - Rating: 4.8\\n'\n",
" \"- **Sip 'n Drip** - Rating: 4.9\\n\"\n",
" '- **Gallery Drip Coffee** - Rating: 4.6\\n'\n",
" '- **GATTA CAFÉ** - Rating: 4.9\\n'\n",
" '- **Treasure specialty coffee** - Rating: 4.9\\n'\n",
" '- **echo bar** - Rating: 5\\n'\n",
" '- **The Cassette Coffee Bar** - Rating: 4.2\\n'\n",
" '- **Intanin Coffee MBK** - Rating: 5\\n'\n",
" '- **Coffee Booms** - Rating: 4.8\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data\\n'\n",
" '- **Number of Competitors**: More than 20 coffee shops\\n'\n",
" '- **Rating Range**: 3.5 to 5\\n'\n",
" '- **Location**: MBK Center, 444 Phaya Thai Rd, Wang Mai, Pathum '\n",
" 'Wan, Bangkok 10330, Thailand\\n'\n",
" '- **Population Density**: High due to commercial activities and '\n",
" 'residential buildings in the Pathum Wan district.\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary\\n'\n",
" 'The area surrounding MBK Center is vibrant with a diverse range '\n",
" 'of coffee shops, boasting high ratings, indicating a competitive '\n",
" 'market for coffee enthusiasts. The population density in Pathum '\n",
" 'Wan is significant, driven by both local residents and visitors '\n",
" 'attracted to the shopping and entertainment options available. '\n",
" 'This combination of high foot traffic and a variety of coffee '\n",
" 'offerings presents a lucrative opportunity for businesses in the '\n",
" 'area.\\n'\n",
" '\\n'\n",
" 'If you need any further information or analysis, feel free to '\n",
" 'ask!',\n",
" 'quesion': 'ค้นหาร้านกาแฟใกล้มาบุญครอง พร้อมวิเคราะห์จำนวนประชากร\\n'},\n",
" {'error': InternalServerError(\"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}}\"),\n",
" 'quesion': 'Coffee shop near Central World\\n'},\n",
" {'answer': ':\\n'\n",
" '\\n'\n",
" '### 1. List of Competitors (Grocery Stores Near Victory '\n",
" 'Monument)\\n'\n",
" '- **Tops Century**\\n'\n",
" ' - Address: 15 Phaya Thai Rd, Thanon Phaya Thai, Ratchathewi\\n'\n",
" ' - Rating: 3.7\\n'\n",
" '- **Lotus’s go fresh**\\n'\n",
" ' - Address: 104, 30-34 Rang Nam Alley, Thanon Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 4.1\\n'\n",
" '- **Lotus’s go fresh**\\n'\n",
" ' - Address: 100 Soi Ratchawithi 9, Thanon Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 4.3\\n'\n",
" '- **Get it Supermarket**\\n'\n",
" ' - Address: 420/8, Ratchawithi Rd, Ratchathewi\\n'\n",
" ' - Rating: 0 (no reviews)\\n'\n",
" '- **YAMi Selected Store Victory Monument**\\n'\n",
" ' - Address: QG7R+P24, Thanon Phaya Thai, Ratchathewi\\n'\n",
" ' - Rating: 5\\n'\n",
" '- **Ran Pi Ya Phon Sin Si Kun**\\n'\n",
" ' - Address: 107/9, Rang Nam Road, Khwaeng Thanon Phaya Thai, '\n",
" 'Khet Ratchathewi, Bangkok, 10400\\n'\n",
" ' - Rating: 0 (no reviews)\\n'\n",
" '\\n'\n",
" '### 2. Numerical Data\\n'\n",
" '- **Total Grocery Stores Found**: 16\\n'\n",
" '- **Population of Ratchathewi District**: Approximately 50,000 to '\n",
" '60,000 residents\\n'\n",
" '- **Community Type**: Urban, diverse population including locals '\n",
" 'and expatriates\\n'\n",
" '\\n'\n",
" '### 3. Descriptive Analytical Summary\\n'\n",
" 'Victory Monument is surrounded by a variety of grocery stores, '\n",
" 'with a total of 16 options available within a 500-meter radius. '\n",
" 'The ratings of these stores vary, with some like YAMi Selected '\n",
" 'Store achieving a perfect score of 5, while others have lower '\n",
" 'ratings or no reviews at all. The Ratchathewi district, where '\n",
" 'Victory Monument is located, has a vibrant urban community with a '\n",
" 'population estimated between 50,000 to 60,000 residents, '\n",
" 'reflecting a mix of local Thais and expatriates. This demographic '\n",
" 'diversity contributes to the demand for various grocery options '\n",
" 'in the area.\\n'\n",
" '\\n'\n",
" 'If you need further insights or additional information, feel free '\n",
" 'to ask!',\n",
" 'quesion': 'Search for grocery stores near Victory Monument and analyze the '\n",
" 'population\\n'}]\n"
]
}
],
"source": [
"pprint.pprint(results)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|