diff --git a/module-d/module-d-en.md b/module-d/module-d-en.md index e4bad22..7b7a275 100644 --- a/module-d/module-d-en.md +++ b/module-d/module-d-en.md @@ -29,17 +29,23 @@ A Node.js environment is required to run the back-end middleware. *(After installation, you must restart your terminal to apply the environment variables.)* #### **2.4. AI Model Download & Characteristics** -Open your terminal and run the following commands sequentially to download the two AI models used in this project. (Verify the installation using the `ollama list` command). +Open your terminal and run the following commands sequentially to download the two AI models used in this project. * **Download Text Processing Model:** `ollama pull phi3` * **[Model Characteristics]:** A Small Language Model (SLM) developed by Microsoft. It is lightweight and fast, possessing excellent text generation and logical reasoning capabilities, making it ideal for writing city introductions. * **Download Vision (Image) Processing Model:** `ollama pull llava` * **[Model Characteristics]:** A Multimodal AI equipped with 'Vision' capabilities alongside text. It analyzes uploaded landmark images to describe objects or scenery and extracts core keywords. +**🚨 IMPORTANT: Verify Model Names via `ollama list`** +Depending on the installation environment or timing, the exact names and tags of the downloaded models may vary (e.g., `phi3:latest`, `phi3:pb3`, `llava:latest`, or just `llava`). After downloading, you **MUST** run the `ollama list` command in your terminal to check the exact "NAME" of the models successfully installed on your PC. You will need these exact names for the next step. + --- ### **3. AI Middleware Server Setup & Execution** -The provided Starter Kit contains an `ai-api` folder created by the AI engineering team. Inside, you will find `server.js` and `package.json`. **(🚨 NOTICE: Do NOT modify the code in this server under any circumstances.)** +The provided Starter Kit contains an `ai-api` folder created by the AI engineering team. Inside, you will find `server.js` and `package.json`. + +**🚨 NOTICE regarding `server.js` modification:** +You must open `server.js` and update the model names to match your local environment. Locate the `model: 'phi3'` and `model: 'llava'` properties inside the API routes and change them to the exact names you verified using the `ollama list` command (e.g., change to `model: 'phi3:pb3'`). **Other than updating these two model names, do NOT modify the core logic of this server under any circumstances.** 1. Open a terminal and navigate to the provided `ai-api` folder directory. 2. Enter the following command to install the required packages: @@ -48,7 +54,6 @@ The provided Starter Kit contains an `ai-api` folder created by the AI engineeri `npm start` 4. If the message `πŸš€ AI Middleware Server running on http://localhost:3000` appears in the terminal, the server is running correctly. Do not close this terminal until the competition module ends. ---- ### **4. API Testing via HOPPSCOTCH** Before starting your development, you must use Hoppscotch (or Postman) to test the two provided APIs and understand the format of the data they return. diff --git a/module-d/module-d-kr.md b/module-d/module-d-kr.md index a771a27..be957f1 100644 --- a/module-d/module-d-kr.md +++ b/module-d/module-d-kr.md @@ -29,17 +29,23 @@ *(μ„€μΉ˜κ°€ μ™„λ£Œλ˜λ©΄ 터미널을 μž¬μ‹œμž‘ν•΄μ•Ό ν™˜κ²½λ³€μˆ˜κ°€ μ μš©λ©λ‹ˆλ‹€.)* #### **2.4. AI λͺ¨λΈ λ‹€μš΄λ‘œλ“œ 및 νŠΉμ§•** -터미널을 μ—΄κ³  μ•„λž˜ λͺ…λ Ήμ–΄λ₯Ό 순차적으둜 μ‹€ν–‰ν•˜μ—¬ λ³Έ κ³Όμ œμ— μ‚¬μš©ν•  2개의 AI λͺ¨λΈμ„ λ‹€μš΄λ‘œλ“œν•©λ‹ˆλ‹€. (`ollama list` λͺ…λ Ήμ–΄λ‘œ μ„€μΉ˜ μ™„λ£Œ 확인) +터미널을 μ—΄κ³  μ•„λž˜ λͺ…λ Ήμ–΄λ₯Ό 순차적으둜 μ‹€ν–‰ν•˜μ—¬ λ³Έ κ³Όμ œμ— μ‚¬μš©ν•  2개의 AI λͺ¨λΈμ„ λ‹€μš΄λ‘œλ“œν•©λ‹ˆλ‹€. * **ν…μŠ€νŠΈ 처리 λͺ¨λΈ λ‹€μš΄λ‘œλ“œ:** `ollama pull phi3` * **[λͺ¨λΈ νŠΉμ§•]:** Microsoftμ—μ„œ κ°œλ°œν•œ μ΄ˆκ²½λŸ‰ μ–Έμ–΄ λͺ¨λΈ(SLM)μž…λ‹ˆλ‹€. 가볍고 λΉ λ₯΄λ©΄μ„œλ„ ν›Œλ₯­ν•œ λ¬Έμž₯ 생성 및 논리적 μΆ”λ‘  λŠ₯λ ₯을 κ°–μΆ”κ³  μžˆμ–΄ λ„μ‹œμ˜ μ†Œκ°œκΈ€μ„ μž‘μ„±ν•˜λŠ” 데 μ‚¬μš©λ©λ‹ˆλ‹€. * **λΉ„μ „(이미지) 처리 λͺ¨λΈ λ‹€μš΄λ‘œλ“œ:** `ollama pull llava` * **[λͺ¨λΈ νŠΉμ§•]:** ν…μŠ€νŠΈλΏλ§Œ μ•„λ‹ˆλΌ '눈(Vision)'을 κ°€μ§„ λ©€ν‹°λͺ¨λ‹¬(Multimodal) AIμž…λ‹ˆλ‹€. μ‚¬μš©μžκ°€ μ—…λ‘œλ“œν•œ λͺ…μ†Œ 이미지λ₯Ό λΆ„μ„ν•˜μ—¬ κ·Έ μ•ˆμ˜ κ°μ²΄λ‚˜ 풍경을 μ„€λͺ…ν•˜κ³  핡심 ν‚€μ›Œλ“œλ₯Ό μΆ”μΆœν•˜λŠ” 역할을 ν•©λ‹ˆλ‹€. +**🚨 μ€‘μš”: `ollama list`λ₯Ό ν†΅ν•œ λͺ¨λΈλͺ… 확인** +μ„€μΉ˜ ν™˜κ²½μ΄λ‚˜ λ‹€μš΄λ‘œλ“œ μ‹œμ μ— 따라 μ„€μΉ˜λœ λͺ¨λΈμ˜ μ •ν™•ν•œ 이름과 νƒœκ·Έκ°€ λ‹€λ₯Ό 수 μžˆμŠ΅λ‹ˆλ‹€ (예: `phi3:latest`, `phi3:pb3`, `llava:latest` λ˜λŠ” νƒœκ·Έ 없이 `llava`). λ‹€μš΄λ‘œλ“œκ°€ μ™„λ£Œλ˜λ©΄ ν„°λ―Έλ„μ—μ„œ λ°˜λ“œμ‹œ `ollama list` λͺ…λ Ήμ–΄λ₯Ό μ‹€ν–‰ν•˜μ—¬ PC에 μ„€μΉ˜λœ λͺ¨λΈλ“€μ˜ μ •ν™•ν•œ "NAME"을 ν™•μΈν•˜μ‹­μ‹œμ˜€. λ‹€μŒ λ‹¨κ³„μ˜ μ„œλ²„ μ„€μ •μ—μ„œ 이 μ •ν™•ν•œ 이름이 ν•„μš”ν•©λ‹ˆλ‹€. + --- ### **3. AI Middleware Server μ„€μΉ˜ 및 μ‹€ν–‰** -제곡된 Starter Kit μ•ˆμ—λŠ” AI μ—”μ§€λ‹ˆμ–΄λ§ νŒ€μ΄ μž‘μ„±ν•œ `ai-api` 폴더가 μžˆμŠ΅λ‹ˆλ‹€. 이 폴더 μ•ˆμ—λŠ” `server.js`와 `package.json`이 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. **(🚨 주의: 이 μ„œλ²„μ˜ μ½”λ“œλŠ” μ ˆλŒ€ μˆ˜μ •ν•˜μ§€ λ§ˆμ‹­μ‹œμ˜€.)** +제곡된 Starter Kit μ•ˆμ—λŠ” AI μ—”μ§€λ‹ˆμ–΄λ§ νŒ€μ΄ μž‘μ„±ν•œ `ai-api` 폴더가 μžˆμŠ΅λ‹ˆλ‹€. 이 폴더 μ•ˆμ—λŠ” `server.js`와 `package.json`이 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. + +**🚨 `server.js` λͺ¨λΈλͺ… μˆ˜μ • μ•ˆλ‚΄ 및 μ£Όμ˜μ‚¬ν•­:** +μ„ μˆ˜λ“€μ€ `server.js` νŒŒμΌμ„ μ—΄κ³  본인의 둜컬 ν™˜κ²½μ— 맞게 λͺ¨λΈλͺ…을 μ—…λ°μ΄νŠΈν•΄μ•Ό ν•©λ‹ˆλ‹€. 파일 λ‚΄ API 라우트 μ½”λ“œμ— μž‘μ„±λœ `model: 'phi3'`와 `model: 'llava'` 속성을 μ°Ύμ•„, μ•žμ„œ `ollama list` λͺ…λ Ήμ–΄λ‘œ ν™•μΈν•œ μ •ν™•ν•œ μ΄λ¦„μœΌλ‘œ λ³€κ²½ν•˜μ‹­μ‹œμ˜€ (예: `model: 'phi3:pb3'`둜 λ³€κ²½). **이 두 개의 λͺ¨λΈλͺ…을 μˆ˜μ •ν•˜λŠ” 것 외에, μ„œλ²„μ˜ λ‹€λ₯Έ 핡심 둜직 μ½”λ“œλŠ” μ ˆλŒ€ μˆ˜μ •ν•˜μ§€ λ§ˆμ‹­μ‹œμ˜€.** 1. 터미널을 μ—΄κ³  제곡된 `ai-api` 폴더 경둜둜 μ΄λ™ν•©λ‹ˆλ‹€. 2. μ•„λž˜ λͺ…λ Ήμ–΄λ₯Ό μž…λ ₯ν•˜μ—¬ ν•„μˆ˜ νŒ¨ν‚€μ§€λ₯Ό μ„€μΉ˜ν•©λ‹ˆλ‹€. @@ -47,7 +53,7 @@ 3. μ„€μΉ˜κ°€ μ™„λ£Œλ˜λ©΄ μ„œλ²„λ₯Ό μ‹€ν–‰ν•©λ‹ˆλ‹€. `npm start` 4. 터미널에 `πŸš€ AI Middleware Server running on http://localhost:3000` λ©”μ‹œμ§€κ°€ 좜λ ₯되면 μ„œλ²„κ°€ 정상 μž‘λ™ 쀑인 κ²ƒμž…λ‹ˆλ‹€. 이 터미널은 κ³Όμ œκ°€ 끝날 λ•ŒκΉŒμ§€ λ‹«μ§€ λ§ˆμ‹­μ‹œμ˜€. - + --- ### **4. HOPPSCOTCHλ₯Ό ν™œμš©ν•œ API ν…ŒμŠ€νŠΈ** diff --git a/module-d/module-d-uz.md b/module-d/module-d-uz.md index 6f5d275..0cc7f94 100644 --- a/module-d/module-d-uz.md +++ b/module-d/module-d-uz.md @@ -29,17 +29,23 @@ Back-end oraliq dasturini (middleware) ishga tushirish uchun Node.js muhiti tala *(O'rnatish tugagandan so'ng, muhit o'zgaruvchilari (environment variables) qo'llanilishi uchun terminalni qayta ishga tushirishingiz kerak.)* #### **2.4. AI modellarini yuklab olish va ularning xususiyatlari** -Ushbu loyihada foydalaniladigan ikkita AI modelini yuklab olish uchun terminalni oching va quyidagi buyruqlarni ketma-ket bajaring. (O'rnatish muvaffaqiyatli bo'lganini `ollama list` buyrug'i orqali tekshiring). +Ushbu loyihada foydalaniladigan ikkita AI modelini yuklab olish uchun terminalni oching va quyidagi buyruqlarni ketma-ket bajaring. * **Matnni qayta ishlash modelini yuklab olish:** `ollama pull phi3` * **[Model xususiyatlari]:** Microsoft tomonidan ishlab chiqilgan Kichik Til Modeli (SLM - Small Language Model). U yengil va tez bo'lib, mukammal matn yaratish va mantiqiy fikrlash qobiliyatiga ega. Bu uni shahar haqida qisqacha ma'lumot yozish uchun ideal qiladi. * **Ko'rish (Tasvir) ni qayta ishlash modelini yuklab olish:** `ollama pull llava` * **[Model xususiyatlari]:** Matn bilan bir qatorda 'Ko'rish' (Vision) imkoniyatlari bilan jihozlangan Multimodal AI. U foydalanuvchi tomonidan yuklangan diqqatga sazovor joylar tasvirlarini tahlil qilib, ob'ektlar yoki manzaralarni tasvirlaydi va asosiy kalit so'zlarni (keywords) ajratib oladi. +**🚨 MUHIM: Model nomlarini `ollama list` orqali tekshiring** +O'rnatish muhiti yoki vaqtiga qarab, yuklab olingan modellarning aniq nomlari va teglari farq qilishi mumkin (masalan, `phi3:latest`, `phi3:pb3`, `llava:latest` yoki shunchaki `llava`). Yuklab olgandan so'ng, kompyuteringizda muvaffaqiyatli o'rnatilgan modellarning aniq "NAME" (Nomi) ni tekshirish uchun terminalingizda albatta `ollama list` buyrug'ini ishga tushirishingiz SHART. Keyingi qadamdagi server sozlamalari uchun sizga ushbu aniq nomlar kerak bo'ladi. + --- ### **3. AI Middleware Serverni o'rnatish va ishga tushirish** -Taqdim etilgan Starter Kit ichida AI muhandislik jamoasi tomonidan yaratilgan `ai-api` papkasi mavjud. Uning ichida `server.js` va `package.json` fayllarini topasiz. **(🚨 DIQQAT: Hech qanday holatda ushbu server kodini o'zgartirmang.)** +Taqdim etilgan Starter Kit ichida AI muhandislik jamoasi tomonidan yaratilgan `ai-api` papkasi mavjud. Uning ichida `server.js` va `package.json` fayllarini topasiz. + +**🚨 `server.js` faylini o'zgartirish bo'yicha DIQQAT va eslatma:** +Ishtirokchilar `server.js` faylini ochishi va model nomlarini o'zlarining mahalliy muhitiga moslashtirishi kerak. API marshrutlari (routes) kodidagi `model: 'phi3'` va `model: 'llava'` qatorlarini toping va ularni oldingi qadamda `ollama list` buyrug'i yordamida tekshirgan aniq nomlarga o'zgartiring (masalan, `model: 'phi3:pb3'` ga o'zgartiring). **Ushbu ikkita model nomini o'zgartirishdan tashqari, hech qanday holatda ushbu serverning asosiy mantiqiy kodlarini o'zgartirmang.** 1. Terminalni oching va taqdim etilgan `ai-api` papkasi katalogiga o'ting. 2. Kerakli paketlarni o'rnatish uchun quyidagi buyruqni kiriting: