Enhance Decision Engine configuration: Add 'router_profile' setting to decision_engine.yaml and update the DecisionEngine class to utilize this profile when generating responses, improving flexibility in strategy determination.

This commit is contained in:
Lars committed 2026-01-02 07:45:34 +01:00
1 parent de05784428
commit 9a98093e70
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -79,6 +79,7 @@ class DecisionEngine:
async def _determine_strategy(self, query: str) -> str:
"""Nutzt den LLM-Router zur Wahl der Such-Strategie."""
prompt_key = self.config.get("settings", {}).get("router_prompt_key", "intent_router_v1")
router_profile = self.config.get("settings", {}).get("router_profile")
router_prompt_template = self.llm_service.get_prompt(prompt_key)
if not router_prompt_template:
return "FACT_WHAT"
@@ -87,7 +88,7 @@ class DecisionEngine:
try:
# Der Router nutzt den Standard-Provider (auto)
response = await self.llm_service.generate_raw_response(
full_prompt, max_retries=1, priority="realtime"
full_prompt, max_retries=1, priority="realtime", profile_name=router_profile
)
return str(response).strip().upper()
except Exception as e: