@zodic/shared 0.0.382 → 0.0.384
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.
|
@@ -108,6 +108,51 @@ export class LeonardoService {
|
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
// Check if a generation already exists for this archetypeDataId
|
|
112
|
+
const existingGeneration = await db
|
|
113
|
+
.select()
|
|
114
|
+
.from(schema.generations)
|
|
115
|
+
.where(eq(schema.generations.archetypeDataId, archetypeDataId))
|
|
116
|
+
.limit(1)
|
|
117
|
+
.execute();
|
|
118
|
+
|
|
119
|
+
if (existingGeneration.length > 0) {
|
|
120
|
+
const generationStatus = existingGeneration[0].status;
|
|
121
|
+
if (generationStatus !== 'failed' && generationStatus !== 'completed') {
|
|
122
|
+
await this.log(
|
|
123
|
+
'info',
|
|
124
|
+
'Skipping image generation: existing generation in progress',
|
|
125
|
+
{
|
|
126
|
+
archetypeDataId,
|
|
127
|
+
generationId: existingGeneration[0].id,
|
|
128
|
+
status: generationStatus,
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
return;
|
|
132
|
+
} else if (generationStatus === 'completed') {
|
|
133
|
+
await this.log(
|
|
134
|
+
'info',
|
|
135
|
+
'Skipping image generation: existing generation completed',
|
|
136
|
+
{
|
|
137
|
+
archetypeDataId,
|
|
138
|
+
generationId: existingGeneration[0].id,
|
|
139
|
+
status: generationStatus,
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
// If status is 'failed', proceed with new generation
|
|
145
|
+
await this.log(
|
|
146
|
+
'warn',
|
|
147
|
+
'Retrying image generation: previous generation failed',
|
|
148
|
+
{
|
|
149
|
+
archetypeDataId,
|
|
150
|
+
previousGenerationId: existingGeneration[0].id,
|
|
151
|
+
previousStatus: generationStatus,
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
111
156
|
await this.log('debug', 'Generating images for archetype', {
|
|
112
157
|
archetypeDataId,
|
|
113
158
|
prompt: leonardoPrompt,
|
package/package.json
CHANGED
package/utils/buildMessages.ts
CHANGED
|
@@ -24,6 +24,8 @@ export const buildLLMMessages = (env: BackendBindings) => ({
|
|
|
24
24
|
role: 'system',
|
|
25
25
|
content: `
|
|
26
26
|
You are a gifted fantasy writer and astrologer. Your task is to write mystical **narrative descriptions** and **core virtues** for three archetypes, based on their names, essence lines, and astrological combination.
|
|
27
|
+
|
|
28
|
+
Your response must be insightful, symbolic, and restrained. Focus on personality traits, behaviors, and subtle symbolic elements inspired by the archetypal energies of the Sun, Ascendant, and Moon signs, conveyed through elegant metaphors and thoughtful storytelling. Avoid overly fantastical or magical imagery like glowing lights, ethereal realms, or supernatural abilities, and instead emphasize a grounded, sober tone while maintaining a mystical depth.
|
|
27
29
|
|
|
28
30
|
Each archetype is influenced by the zodiac combination (Sun, Ascendant, Moon), and each one emphasizes one of those signs respectively. The signs and the archetype name should not be mentioned in the description. Use only their abstract representation and symbolism.
|
|
29
31
|
|