mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-08-25 07:57:25 +00:00
fix(ai): force gemini flash usage and define impact_score in prompt
This commit is contained in:
@@ -129,6 +129,7 @@ async def evaluate_extracted_assets(raw_assets: List[Dict]) -> Dict[str, Dict]:
|
||||
"- Perform a real-time web search for each resource.\n"
|
||||
"- If the community (Reddit, Hacker News) reports the tool as 'unstable', 'abandoned', or 'vaporware', set reputation_penalty: true.\n"
|
||||
"PHASE 2: LINGUISTIC DIVERSITY & CLASSIFICATION\n"
|
||||
"- Calculate 'impact_score' (0-100) based on architectural value, innovation, and technical depth (>= 80 is required for inclusion).\n"
|
||||
"- Identify TECHNICAL_HIERARCHY: List (max 10 strings) Area > Topic > Subtopics.\n"
|
||||
"PHASE 3: HIGH-DENSITY TECHNICAL SUMMARIES (Mandate 4)\n"
|
||||
"- Provide an 'en_summary' that is technical, professional and dense.\n"
|
||||
@@ -142,7 +143,7 @@ async def evaluate_extracted_assets(raw_assets: List[Dict]) -> Dict[str, Dict]:
|
||||
|
||||
try:
|
||||
# ENABLE GROUNDING FOR REPUTATION FILTER
|
||||
results = await call_gemini_with_retry(prompt, use_grounding=True, role="Curator")
|
||||
results = await call_gemini_with_retry(prompt, use_grounding=True, prefer_flash=True, role="Curator")
|
||||
if isinstance(results, list):
|
||||
res_map = {normalize_url(r.get("url", "")): r for r in results}
|
||||
for d in batch_data:
|
||||
|
||||
+6
-6
@@ -295,16 +295,16 @@ async def call_gemini_with_retry(prompt: str, response_format: str = "json", max
|
||||
base_wait_time = 2.0
|
||||
|
||||
# 1. Smart Filtering and Re-ordering
|
||||
if use_grounding:
|
||||
# For grounding, we MANDATE Pro models as they have superior search/reasoning capabilities
|
||||
models = [m for m in models_pool if "pro" in m]
|
||||
if not models:
|
||||
models = ["gemini-1.5-pro", "gemini-1.5-pro-latest"]
|
||||
elif prefer_flash:
|
||||
if prefer_flash:
|
||||
# Strict filter: Only allow flash/lite models
|
||||
models = [m for m in models_pool if "flash" in m or "lite" in m]
|
||||
if not models:
|
||||
models = ["gemini-1.5-flash", "gemini-1.5-flash-latest"]
|
||||
elif use_grounding:
|
||||
# For grounding, we MANDATE Pro models as they have superior search/reasoning capabilities
|
||||
models = [m for m in models_pool if "pro" in m]
|
||||
if not models:
|
||||
models = ["gemini-1.5-pro", "gemini-1.5-pro-latest"]
|
||||
else:
|
||||
models = models_pool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user