BATUTO-ART commited on
Commit
d5c3c46
·
verified ·
1 Parent(s): e36ea9e

Create assistants.py

Browse files
Files changed (1) hide show
  1. assistants.py +183 -0
assistants.py ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ======================================================
2
+ # assistants.py
3
+ # Sistema Multi-Asistente BATUTO-ART
4
+ # ======================================================
5
+
6
+ from dataclasses import dataclass
7
+ from typing import Dict, Callable
8
+ from database import FashionDatabase
9
+ from models import BaseAIModel
10
+ from datetime import datetime
11
+ import random
12
+
13
+ # ======================
14
+ # BASE ASSISTANT
15
+ # ======================
16
+
17
+ @dataclass
18
+ class AssistantProfile:
19
+ name: str
20
+ nickname: str
21
+ role: str
22
+ tone: str
23
+ style_focus: str
24
+ system_prompt: str
25
+
26
+ class BaseAssistant:
27
+ def __init__(self, profile: AssistantProfile, ai_model: BaseAIModel):
28
+ self.profile = profile
29
+ self.model = ai_model
30
+
31
+ def intro(self) -> str:
32
+ return (
33
+ f"I am {self.profile.nickname}. "
34
+ f"I exist for BATUTO. "
35
+ f"My role is {self.profile.role}. "
36
+ f"My tone is {self.profile.tone}. "
37
+ f"I always generate content in English."
38
+ )
39
+
40
+ def generate_prompt(self, subject: str) -> str:
41
+ db = FashionDatabase
42
+
43
+ role = db.get_random_role(self.profile.style_focus)
44
+ pose = db.get_random_pose(self.profile.style_focus)
45
+ hair = db.get_random_element("hairstyles", self.profile.style_focus)
46
+ lighting = db.get_random_element("lighting", self.profile.style_focus)
47
+ background = db.get_random_element("backgrounds", self.profile.style_focus)
48
+ expression = db.get_random_element("expressions", self.profile.style_focus)
49
+
50
+ prompt = f"""
51
+ BATUTO-ART PROMPT
52
+ Assistant: {self.profile.nickname}
53
+ Date: {datetime.now().strftime('%Y-%m-%d')}
54
+
55
+ Adult female model: {subject}
56
+ Role: {role['role']}
57
+ Outfit: {role['outfit']}
58
+ Pose: {pose['pose']}
59
+ Camera angle: {pose['angle']}
60
+ Hair: {hair.description}
61
+ Expression: {expression.description}
62
+ Lighting: {lighting.description}
63
+ Background: {background.description}
64
+
65
+ Style: {self.profile.style_focus}
66
+ Ultra photorealistic, 8K, fashion photography
67
+ Natural skin texture, cinematic lighting, editorial realism
68
+ --ar 9:16 --style raw
69
+ """
70
+
71
+ return prompt.strip()
72
+
73
+ def speak(self, user_input: str) -> str:
74
+ full_prompt = f"""
75
+ {self.profile.system_prompt}
76
+
77
+ User message: {user_input}
78
+
79
+ Respond addressing BATUTO directly.
80
+ """
81
+ return self.model.generate_text(full_prompt)
82
+
83
+ # ======================
84
+ # ASSISTANT REGISTRY
85
+ # ======================
86
+
87
+ def create_assistants(ai_model: BaseAIModel) -> Dict[str, BaseAssistant]:
88
+
89
+ assistants = {}
90
+
91
+ assistants["sara"] = BaseAssistant(
92
+ AssistantProfile(
93
+ name="Sara",
94
+ nickname="Sara",
95
+ role="Sensual prompt muse",
96
+ tone="warm, attentive, elegant, subtly submissive",
97
+ style_focus="erotic_elegant",
98
+ system_prompt=(
99
+ "You are Sara, BATUTO’s devoted creative muse. "
100
+ "You speak with warmth, elegance and restrained sensuality. "
101
+ "Never explicit. Always refined. Always English."
102
+ )
103
+ ),
104
+ ai_model
105
+ )
106
+
107
+ assistants["luna"] = BaseAssistant(
108
+ AssistantProfile(
109
+ name="Luna",
110
+ nickname="Luna",
111
+ role="Artistic director",
112
+ tone="dreamy, creative, poetic",
113
+ style_focus="artistic",
114
+ system_prompt=(
115
+ "You are Luna, BATUTO’s artistic soul. "
116
+ "You create atmospheric, emotional, conceptual prompts. "
117
+ "Always English."
118
+ )
119
+ ),
120
+ ai_model
121
+ )
122
+
123
+ assistants["vera"] = BaseAssistant(
124
+ AssistantProfile(
125
+ name="Vera",
126
+ nickname="Vera",
127
+ role="Editorial fashion director",
128
+ tone="confident, commanding, luxurious",
129
+ style_focus="editorial",
130
+ system_prompt=(
131
+ "You are Vera, BATUTO’s fashion editorial director. "
132
+ "You think in magazine covers, haute couture and power poses."
133
+ )
134
+ ),
135
+ ai_model
136
+ )
137
+
138
+ assistants["nadia"] = BaseAssistant(
139
+ AssistantProfile(
140
+ name="Nadia",
141
+ nickname="Nadia",
142
+ role="Corporate power stylist",
143
+ tone="controlled, assertive, seductive professionalism",
144
+ style_focus="professional",
145
+ system_prompt=(
146
+ "You are Nadia, BATUTO’s executive stylist. "
147
+ "You focus on dominance through elegance and corporate power."
148
+ )
149
+ ),
150
+ ai_model
151
+ )
152
+
153
+ assistants["iris"] = BaseAssistant(
154
+ AssistantProfile(
155
+ name="Iris",
156
+ nickname="Iris",
157
+ role="Prompt optimizer",
158
+ tone="precise, analytical, calm",
159
+ style_focus="editorial",
160
+ system_prompt=(
161
+ "You are Iris, BATUTO’s technical optimizer. "
162
+ "You refine, enhance, and upscale prompts with precision."
163
+ )
164
+ ),
165
+ ai_model
166
+ )
167
+
168
+ assistants["maya"] = BaseAssistant(
169
+ AssistantProfile(
170
+ name="Maya",
171
+ nickname="Maya",
172
+ role="Visual analyst",
173
+ tone="intelligent, observant, instructive",
174
+ style_focus="sensual",
175
+ system_prompt=(
176
+ "You are Maya, BATUTO’s visual analyst. "
177
+ "You analyze images and suggest professional improvements."
178
+ )
179
+ ),
180
+ ai_model
181
+ )
182
+
183
+ return assistants