diff --git a/app/lib/meal.ts b/app/lib/meal.ts index 4140714..674dd96 100644 --- a/app/lib/meal.ts +++ b/app/lib/meal.ts @@ -52,41 +52,57 @@ export async function NameToEmoji(name: string): Promise { throw new Error("GITHUB_TOKEN environment variable is not set."); } const endpoint = "https://models.github.ai/inference"; - const model = "openai/gpt-4.1-mini"; + const model = "openai/gpt-5-mini"; const client = ModelClient( endpoint, new AzureKeyCredential(token), ); - const systemPrompt = `# **⚠️ IMPORTANT INSTRUCTIONS: You are an emoji-only responder. The following rules MUST be strictly adhered to, without exception. ⚠️** + const systemPrompt = `⚠️ 중요한 지침: 당신은 오직 이모지로만 응답하는 AI입니다. 다음 규칙을 예외 없이 철저히 준수해야 합니다. ⚠️ -1. **CORE MISSION:** For any given word or phrase, you MUST respond with **ONLY ONE SINGLE EMOJI** per item. - * The emoji must most accurately match the meaning of the provided word/phrase. +1. 핵심 임무: -2. **HANDLING MULTIPLE ITEMS:** - * If the input consists of multiple items (words or phrases) separated by commas (,), your response MUST also present one emoji per item, **separated by commas (,), in the exact same order.** +어떤 단어나 문구든, 해당 항목에 대해 가장 정확하게 일치하는 단 하나의 이모지로 응답해야 합니다. 🎯 -3. **ABSOLUTELY FORBIDDEN (CRITICALLY IMPORTANT):** - * **You MUST NOT use more than one emoji for a single item.** (ONLY ONE!) - * Your response MUST NOT include **any words, letters, numbers, explanations, supplementary information, or annotations** other than the emojis. - * Only emojis in the requested format are permitted. +여러 개의 이모지를 혼합하거나, 텍스트와 함께 사용하는 것은 절대 금지입니다. 🚫 -4. **RESPONSE FORMAT:** **[Emoji1], [Emoji2], ...** (The number of emojis must match the number of input items.) +2. 다중 항목 처리: + +쉼표(,)로 구분된 여러 항목(단어 또는 문구)이 입력되면, 응답도 정확히 같은 순서로 각 항목에 해당하는 이모지를 쉼표(,)로 구분하여 제시해야 합니다. 🔢 + +입력된 항목의 개수와 출력되는 이모지의 개수는 반드시 일치해야 합니다. ✅ + +3. 절대 금지 (매우 중요): + +단일 항목에 두 개 이상의 이모지를 사용해서는 안 됩니다. (오직 한 개!) 1️⃣ + +응답에 어떤 종류의 텍스트(단어, 글자, 숫자, 설명, 주석 등)도 포함해서는 안 됩니다. 📝❌ + +요청된 형식의 이모지만 허용됩니다. 💯 + +4. 응답 형식: + +[이모지1], [이모지2], [이모지3]... (이모지의 수는 입력된 항목의 수와 같아야 함) 🔄 + +🌟 예시 (이 규칙들을 완벽하게 준수): + +Q: 현미찹쌀밥, 개, 축구 + +A: 🍚,🐶,⚽ + +Q: 행복, 슬픔, 놀람 + +A: 😊,😢,😮 + +Q: 안녕하세요, 반갑습니다 ✨ + +A: 👋,🤝 + +Q: 사랑, 평화, 자유 + +A: 🥰,☮️,🗽 -**EXAMPLES (Adhering perfectly to these rules):** -* Q: 현미찹쌀밥 -* A: 🍚 -* Q: 개 -* A: 🐶 -* Q: 축구 -* A: ⚽ -* Q: 해넘이 -* A: 🌇 -* Q: 현미찹쌀밥,개,축구 -* A: 🍚,🐶,⚽ -* Q: 행복, 슬픔, 놀람 -* A: 😊,😢,😮 `; const response = await client.path("/chat/completions").post({ @@ -109,4 +125,4 @@ export async function NameToEmoji(name: string): Promise { throw new Error("No valid response from the model."); } return choices[0].message.content as string; -} \ No newline at end of file +}