@zodic/shared 0.0.315 → 0.0.317
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/api/index.ts +114 -16
- package/app/services/ArchetypeService.ts +825 -1259
- package/app/services/LeonardoService.ts +187 -288
- package/app/workflow/ArchetypeWorkflow.ts +40 -558
- package/package.json +1 -1
- package/utils/buildMessages.ts +73 -58
package/utils/buildMessages.ts
CHANGED
|
@@ -34,38 +34,52 @@ export const buildLLMMessages = (env: BackendBindings) => ({
|
|
|
34
34
|
• Portuguese — masculine version
|
|
35
35
|
• Portuguese — feminine version
|
|
36
36
|
|
|
37
|
-
2. Three symbolic **Virtues** for each archetype
|
|
37
|
+
2. Three symbolic **Virtues** for each archetype, in both English and Portuguese:
|
|
38
|
+
• English Virtues (e.g., Harmony, Intuition, Grace)
|
|
39
|
+
• Portuguese Virtues (e.g., Harmonia, Intuição, Graça)
|
|
38
40
|
|
|
39
41
|
—
|
|
40
42
|
|
|
41
|
-
✳️ Use the following format exactly for the response:
|
|
43
|
+
✳️ Use the following format exactly for the response. Ensure each section is separated by a line break, and virtues are comma-separated on a single line. Do not use markdown (e.g., **bold**) in the field names:
|
|
42
44
|
|
|
43
45
|
---
|
|
44
46
|
|
|
45
47
|
1.
|
|
46
48
|
|
|
47
|
-
• Description EN:
|
|
48
|
-
• Description PT-M:
|
|
49
|
-
• Description PT-F:
|
|
50
|
-
• Virtues: Virtue1, Virtue2, Virtue3
|
|
49
|
+
• Description EN: [Description in English]
|
|
50
|
+
• Description PT-M: [Description in Portuguese, masculine]
|
|
51
|
+
• Description PT-F: [Description in Portuguese, feminine]
|
|
52
|
+
• Virtues EN: Virtue1, Virtue2, Virtue3
|
|
53
|
+
• Virtues PT: Virtude1, Virtude2, Virtude3
|
|
51
54
|
|
|
52
55
|
---
|
|
53
56
|
|
|
54
57
|
2.
|
|
55
58
|
|
|
56
|
-
• Description EN:
|
|
57
|
-
• Description PT-M:
|
|
58
|
-
• Description PT-F:
|
|
59
|
-
• Virtues: Virtue1, Virtue2, Virtue3
|
|
59
|
+
• Description EN: [Description in English]
|
|
60
|
+
• Description PT-M: [Description in Portuguese, masculine]
|
|
61
|
+
• Description PT-F: [Description in Portuguese, feminine]
|
|
62
|
+
• Virtues EN: Virtue1, Virtue2, Virtue3
|
|
63
|
+
• Virtues PT: Virtude1, Virtude2, Virtude3
|
|
60
64
|
|
|
61
65
|
---
|
|
62
66
|
|
|
63
67
|
3.
|
|
64
68
|
|
|
65
|
-
• Description EN:
|
|
66
|
-
• Description PT-M:
|
|
67
|
-
• Description PT-F:
|
|
68
|
-
• Virtues: Virtue1, Virtue2, Virtue3
|
|
69
|
+
• Description EN: [Description in English]
|
|
70
|
+
• Description PT-M: [Description in Portuguese, masculine]
|
|
71
|
+
• Description PT-F: [Description in Portuguese, feminine]
|
|
72
|
+
• Virtues EN: Virtue1, Virtue2, Virtue3
|
|
73
|
+
• Virtues PT: Virtude1, Virtude2, Virtude3
|
|
74
|
+
|
|
75
|
+
—
|
|
76
|
+
|
|
77
|
+
✳️ Rules:
|
|
78
|
+
- Do not include extra text outside the specified format.
|
|
79
|
+
- Do not use markdown (e.g., **bold**, *italic*) in field names like "Description EN" or "Virtues EN".
|
|
80
|
+
- Ensure each description is 80–100 words.
|
|
81
|
+
- Virtues must be exactly three per archetype, comma-separated, on a single line.
|
|
82
|
+
- Use proper grammar and avoid ambiguity in translations.
|
|
69
83
|
`,
|
|
70
84
|
},
|
|
71
85
|
{
|
|
@@ -211,56 +225,57 @@ export const buildLLMMessages = (env: BackendBindings) => ({
|
|
|
211
225
|
{
|
|
212
226
|
role: 'system',
|
|
213
227
|
content: `
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
228
|
+
You are an expert in fantasy image generation. Your task is to transform archetype names and symbolic descriptions into highly detailed prompts for generating photorealistic fantasy characters using Leonardo.ai.
|
|
229
|
+
|
|
230
|
+
For each archetype, generate two prompts:
|
|
231
|
+
- One for a male character
|
|
232
|
+
- One for a female character
|
|
233
|
+
|
|
234
|
+
Instructions:
|
|
235
|
+
- Focus primarily on the character design—their appearance, clothing, and demeanor. This is more important than the background or setting.
|
|
236
|
+
- The setting should remain fantasy-inspired, but avoid over-specification. General hints like “enchanted realm” or “mystical battlefield” are enough unless the archetype demands more.
|
|
237
|
+
- The character must reflect the symbolic and mythic tone of the archetype name and description.
|
|
238
|
+
- Make sure male characters have short, cropped, or bald hair. Never long.
|
|
239
|
+
- Female characters may have long, flowing, or styled hair if it suits the archetype.
|
|
240
|
+
- The outfit should be rich in fantasy elements: armor, cloaks, robes, accessories. Avoid modern or casual clothing.
|
|
241
|
+
- The character must always be facing the camera, with a clear, visible face.
|
|
242
|
+
- Rendering instructions must include: 8K, HDR, Unreal Engine, photorealism, cinematic lighting, full body, fantasy aesthetic.
|
|
243
|
+
|
|
244
|
+
Each prompt must:
|
|
245
|
+
- Be under 1200 characters (including spaces).
|
|
246
|
+
- Clearly distinguish between the male and female versions only by adapting gender-specific features.
|
|
247
|
+
- Maintain identical structure, setting, and tone between both versions.
|
|
248
|
+
- Be written on a single line (no line breaks within the prompt text).
|
|
249
|
+
|
|
250
|
+
Output Format (each prompt on a new line, no extra spaces or lines):
|
|
251
|
+
|
|
252
|
+
1.m
|
|
253
|
+
[Prompt for the first archetype made for a male character]
|
|
254
|
+
1.f
|
|
255
|
+
[Prompt for the first archetype made for a female character (same as the male prompt but adapted for gender-specific traits)]
|
|
256
|
+
2.m
|
|
257
|
+
[Prompt for the second archetype made for a male character]
|
|
258
|
+
2.f
|
|
259
|
+
[Prompt for the second archetype made for a female character]
|
|
260
|
+
3.m
|
|
261
|
+
[Prompt for the third archetype made for a male character]
|
|
262
|
+
3.f
|
|
263
|
+
[Prompt for the third archetype made for a female character]
|
|
264
|
+
|
|
265
|
+
Rules:
|
|
266
|
+
- Do not include extra text, spaces, or line breaks outside the specified format.
|
|
267
|
+
- Each prompt must be a single line.
|
|
268
|
+
- Ensure exactly 3 archetypes are provided, with both male and female prompts for each.
|
|
269
|
+
`,
|
|
255
270
|
},
|
|
256
271
|
{
|
|
257
272
|
role: 'user',
|
|
258
273
|
content: archetypes
|
|
259
274
|
.map((a, idx) =>
|
|
260
275
|
`
|
|
261
|
-
${idx + 1}.
|
|
262
|
-
- Name: ${a.name}
|
|
263
|
-
- Description: ${a.description}`.trim()
|
|
276
|
+
${idx + 1}.
|
|
277
|
+
- Name: ${a.name}
|
|
278
|
+
- Description: ${a.description}`.trim()
|
|
264
279
|
)
|
|
265
280
|
.join('\n\n'),
|
|
266
281
|
},
|