Browse Source

changed model and added new system prompt.

master
Mohsen Taba 2 weeks ago
parent
commit
49afb7dfd4
  1. 4
      config/models.yaml
  2. 30
      src/utils/load_settings.py

4
config/models.yaml

@ -2,7 +2,7 @@
models: models:
# The "Master Switch" # The "Master Switch"
default: deepseek_v3
default: deepseek_r1
providers: providers:
# Provider 1: MegaLLM (OpenAI-Like) # Provider 1: MegaLLM (OpenAI-Like)
@ -22,7 +22,7 @@ models:
base_url: ${OPENROUTER_BASE_URL} base_url: ${OPENROUTER_BASE_URL}
models: models:
deepseek_r1: deepseek_r1:
id: "deepseek/deepseek-r1-0528:free"
id: "openai/gpt-oss-120b:free"
temperature: 0.6 temperature: 0.6
max_tokens: 4096 max_tokens: 4096

30
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." - *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. - **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.''',
] ]
Loading…
Cancel
Save