File size: 1,067 Bytes
eaead5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
34
# assets_manager.py - Fetches or generates assets like avatars, audio, visuals
import os
import random

AVATAR_DIR = "assets/default_avatars"

# For now, we use static files. Later this can connect to DALL·E, Gemini image gen, etc.
CATEGORY_AVATARS = {
    "educational": ["teacher_bot.png", "friendly_helper.png"],
    "assistive": ["aid_bot.png"],
    "entertainment": ["party_bot.png"],
    "industrial": ["mech_bot.png"],
    "healthcare": ["nurse_bot.png"],
    "home automation": ["smart_home_avatar.png"],
    "retail": ["greeter_bot.png"],
    "creative": ["abstract_bot.png"]
}

def fetch_visual_assets(intent_category: str) -> dict:
    avatars = CATEGORY_AVATARS.get(intent_category, CATEGORY_AVATARS["creative"])
    selected = random.choice(avatars)
    path = os.path.join(AVATAR_DIR, selected)

    return {
        "avatar_image": path,
        "tts_voice": "gpt-4o-mini-tts",
        "style": "friendly",
        "theme_color": "#4F46E5"  # Default vibrant purple
    }

# Example
if __name__ == "__main__":
    print(fetch_visual_assets("retail"))