@zodic/shared 0.0.158 → 0.0.160
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.
|
@@ -233,11 +233,12 @@ export class ConceptService {
|
|
|
233
233
|
} {
|
|
234
234
|
console.log('📌 Parsing basic info response from ChatGPT:', response);
|
|
235
235
|
|
|
236
|
+
// ✅ More flexible regex to handle variations in formatting
|
|
236
237
|
const enMatch = response.match(
|
|
237
|
-
/EN:\s
|
|
238
|
+
/EN:\s*(?:•\s*)?Name:\s*(.+?)\s*(?:•\s*)?Description:\s*([\s\S]+?)\s*(?:•\s*)?Poetic Passage:\s*([\s\S]+?)\s*(?=PT:|$)/
|
|
238
239
|
);
|
|
239
240
|
const ptMatch = response.match(
|
|
240
|
-
/PT:\s
|
|
241
|
+
/PT:\s*(?:•\s*)?Nome:\s*(.+?)\s*(?:•\s*)?Descrição:\s*([\s\S]+?)\s*(?:•\s*)?Passagem Poética:\s*([\s\S]+)/
|
|
241
242
|
);
|
|
242
243
|
|
|
243
244
|
if (!enMatch || !ptMatch) {
|
|
@@ -245,7 +246,7 @@ export class ConceptService {
|
|
|
245
246
|
throw new Error('Invalid basic info response format');
|
|
246
247
|
}
|
|
247
248
|
|
|
248
|
-
// ✅ Function to clean text (removes leading/trailing spaces & unwanted
|
|
249
|
+
// ✅ Function to clean text (removes leading/trailing spaces & unwanted symbols)
|
|
249
250
|
const cleanText = (text: string) => text.trim().replace(/\*/g, '');
|
|
250
251
|
|
|
251
252
|
// ✅ Parse and clean extracted content
|
package/package.json
CHANGED
package/utils/conceptPrompts.ts
CHANGED
|
@@ -66,7 +66,7 @@ For the given combination, generate the following in both languages, ensuring th
|
|
|
66
66
|
|
|
67
67
|
Rules & Formatting:
|
|
68
68
|
• Do not mention zodiac signs or planets explicitly.
|
|
69
|
-
• Do not mention the Crown’s name in the description or poem. In the description, you can use "this Crown".
|
|
69
|
+
• Do not mention the Crown’s name in the description or poem. In the description, you can use "this Crown" and similar unespecific terms.
|
|
70
70
|
• Ensure both descriptions are structurally and emotionally equivalent.
|
|
71
71
|
• Write the poem freely in each language to maximize impact, avoiding direct translation.
|
|
72
72
|
• Use rich, symbolic language while keeping it accessible and inspiring.
|