@zodic/shared 0.0.89 → 0.0.91

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.
@@ -5,6 +5,7 @@ import { v4 as uuidv4 } from 'uuid';
5
5
  import { schema } from '../..';
6
6
  import { Languages } from '../../types';
7
7
  import { KVConcept, sizes } from '../../types/scopes/legacy';
8
+ import { leonardoInitImages } from '../../utils/initImages';
8
9
  import { buildConceptKVKey } from '../../utils/KVKeysBuilders';
9
10
  import { AppContext } from '../base/AppContext';
10
11
 
@@ -53,20 +54,24 @@ export class ConceptService {
53
54
  description: string;
54
55
  poem: string;
55
56
  } {
56
- console.log('Parsing basic info response from ChatGPT');
57
- const nameMatch = response.match(/- Name: (.+)/);
58
- const descriptionMatch = response.match(/- Description: (.+)/);
59
- const poemMatch = response.match(/- Poem: (.+)/);
57
+ console.log('📌 Parsing basic info response from ChatGPT:', response);
58
+
59
+ const nameMatch = response.match(/1\.\s*Name:\s*(.+)/);
60
+ const descriptionMatch = response.match(/2\.\s*Description:\s*([\s\S]+?)\s*3\./);
61
+ const poemMatch = response.match(/3\.\s*Poem\/Quote:\s*([\s\S]+)/);
60
62
 
61
63
  if (!nameMatch || !descriptionMatch || !poemMatch) {
64
+ console.error('❌ Invalid basic info response format:', response);
62
65
  throw new Error('Invalid basic info response format');
63
66
  }
64
67
 
65
- return {
66
- name: nameMatch[1].trim(),
67
- description: descriptionMatch[1].trim(),
68
- poem: poemMatch[1].trim(),
69
- };
68
+ const name = nameMatch[1].trim();
69
+ const description = descriptionMatch[1].trim();
70
+ const poem = poemMatch[1].trim();
71
+
72
+ console.log('✅ Parsed basic info:', { name, description, poem });
73
+
74
+ return { name, description, poem };
70
75
  }
71
76
 
72
77
  /**
@@ -253,6 +258,14 @@ export class ConceptService {
253
258
  prompt: concept.leonardoPrompt,
254
259
  width,
255
260
  height,
261
+ controlNets: [
262
+ {
263
+ "initImageId": leonardoInitImages.concetps.crown.imageId,
264
+ "initImageType": "UPLOADED",
265
+ "preprocessorId": 100, // content reference
266
+ "strengthType": "Low",
267
+ },
268
+ ]
256
269
  });
257
270
 
258
271
  const generationId = leonardoResponse?.sdGenerationJob?.generationId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.89",
3
+ "version": "0.0.91",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {