Strengthened writing.

This commit is contained in:
2026-02-05 22:26:55 -05:00
parent e6110a6a54
commit 7e5dbe6f00
7 changed files with 577 additions and 350 deletions

View File

@@ -85,7 +85,30 @@ def select_best_models(force_refresh=False):
utils.log("SYSTEM", f"Bootstrapping model selection with: {bootstrapper}")
model = genai.GenerativeModel(bootstrapper)
prompt = f"Analyze this list of available Google Gemini models:\n{json.dumps(models)}\n\nSelect the best model for each of these three roles based on these criteria:\n- Most recent version with best features and ability.\n- Beta versions are okay, but avoid 'experimental' if a stable beta/prod version exists.\n- Consider quota efficiency (Flash is cheaper/faster, Pro is smarter).\n\nROLES:\n1. LOGIC: For complex reasoning, JSON structuring, and plot planning.\n2. WRITER: For creative fiction writing, prose generation, and speed.\n3. ARTIST: For generating visual art prompts and design instructions.\n\nAlso provide a 'ranking' list of ALL models analyzed, ordered from best/most useful to worst/least useful, with a short reason.\n\nReturn JSON: {{ 'logic': {{ 'model': 'model_name', 'reason': 'reasoning' }}, 'writer': {{ 'model': 'model_name', 'reason': 'reasoning' }}, 'artist': {{ 'model': 'model_name', 'reason': 'reasoning' }}, 'ranking': [ {{ 'model': 'model_name', 'reason': 'reasoning' }} ] }}"
prompt = f"""
ROLE: AI Model Architect
TASK: Select the optimal Gemini models for specific application roles.
AVAILABLE_MODELS:
{json.dumps(models)}
CRITERIA:
- LOGIC: Needs complex reasoning, JSON adherence, and instruction following. (Prefer Pro/1.5).
- WRITER: Needs creativity, prose quality, and speed. (Prefer Flash/1.5 for speed, or Pro for quality).
- ARTIST: Needs visual prompt understanding.
CONSTRAINTS:
- Avoid 'experimental' unless no stable version exists.
- Prioritize 'latest' or stable versions.
OUTPUT_FORMAT (JSON):
{{
"logic": {{ "model": "string", "reason": "string" }},
"writer": {{ "model": "string", "reason": "string" }},
"artist": {{ "model": "string", "reason": "string" }},
"ranking": [ {{ "model": "string", "reason": "string" }} ]
}}
"""
try:
response = model.generate_content(prompt)