File size: 1,016 Bytes
43fb5c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202cf3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from sophistication.sophistication_levels import sophistication_levels

def create_sophistication_instruction(sophistication_key):
    """
    Creates instruction text based on the selected sophistication level key.
    
    Args:
        sophistication_key: String key for the sophistication level (e.g., "Nivel 1 - Mercado Nuevo")
    
    Returns:
        str: Instruction text for the selected sophistication level
    """
    # Get the sophistication level data from the dictionary using the key
    level_data = sophistication_levels.get(sophistication_key, {})
    
    if not level_data:
        return ""
    
    # Create the instruction text using the level data
    instruction = f"""NIVEL DE SOFISTICACIÓN DEL MERCADO:
{level_data.get('description', '')}

Estrategia recomendada:
{level_data.get('strategy', '')}

Características de este nivel:
- {'\n- '.join(level_data.get('characteristics', []))}

Ejemplo de gancho para este nivel:
"{level_data.get('example', '')}"
"""
    
    return instruction