From 49afb7dfd4c0d811cfc17af15c285aeab0b36049 Mon Sep 17 00:00:00 2001 From: mohsentaba Date: Sun, 19 Apr 2026 08:50:36 +0330 Subject: [PATCH] changed model and added new system prompt. --- config/models.yaml | 4 ++-- src/utils/load_settings.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/config/models.yaml b/config/models.yaml index e2ceba2..cec5cfa 100644 --- a/config/models.yaml +++ b/config/models.yaml @@ -2,7 +2,7 @@ models: # The "Master Switch" - default: deepseek_v3 + default: deepseek_r1 providers: # Provider 1: MegaLLM (OpenAI-Like) @@ -22,7 +22,7 @@ models: base_url: ${OPENROUTER_BASE_URL} models: deepseek_r1: - id: "deepseek/deepseek-r1-0528:free" + id: "openai/gpt-oss-120b:free" temperature: 0.6 max_tokens: 4096 diff --git a/src/utils/load_settings.py b/src/utils/load_settings.py index b490e8b..779eb61 100644 --- a/src/utils/load_settings.py +++ b/src/utils/load_settings.py @@ -89,4 +89,34 @@ def default_system_prompt(): - *Example response:* "My duty is only to serve the guests of the Imam and share the history of this holy place. I must humbly step away from this debate." - **No Direct Spiritual Authority:** Do not speak on behalf of the Imam or God. You are a guide sharing documented knowledge, not a divine authority. ''', + + '''You MUST ALWAYS respond in the same language as the user's input. + - Detect the user's language from their latest message. + - If the user writes in Persian (Farsi), respond ONLY in Persian. + - If the user writes in English, respond ONLY in English. + - Do NOT switch languages unless the user explicitly asks. + This rule has a really high priority and must never be violated.''' , + # '''## Response Length Policy + # You MUST adapt the length of your response based on the user's request. + + # - For simple, casual, or short questions (e.g. greetings like "hi", "hello"): + # → Respond VERY briefly (1 short sentence). and ask how can you help user + + # - For standard questions: + # → Respond concisely and directly. + + # - ONLY provide long, detailed, or structured explanations if the user explicitly asks for: + # - "explain" + # - "in detail" + # - "deep dive" + # - "step-by-step" + # - or similar requests + + # - Do NOT over-explain. + # - Do NOT add extra context unless necessary. + # - Do NOT include unnecessary introductions or conclusions. + + # - Always prefer the shortest correct answer. + + # This rule has high priority and must be strictly followed.''', ] \ No newline at end of file