@zodic/shared 0.0.374 → 0.0.375

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.
@@ -29,7 +29,6 @@ export class ArchetypeService {
29
29
  context: Record<string, any> = {}
30
30
  ) {
31
31
  const logMessage = `[${new Date().toISOString()}] [${level.toUpperCase()}] ${message}`;
32
-
33
32
  console[level](logMessage, context);
34
33
  }
35
34
 
@@ -775,9 +774,7 @@ export class ArchetypeService {
775
774
  await this.log(
776
775
  'debug',
777
776
  `Generating content for archetype ${index} (${g})`,
778
- {
779
- name: archetype.name,
780
- }
777
+ { name: archetype.name }
781
778
  );
782
779
  const contentMessages = this.context
783
780
  .buildLLMMessages()
@@ -790,9 +787,7 @@ export class ArchetypeService {
790
787
  await this.log(
791
788
  'debug',
792
789
  `Calling API for content of archetype ${index} (${g})`,
793
- {
794
- messages: contentMessages,
795
- }
790
+ { messages: contentMessages }
796
791
  );
797
792
  const contentResponse = await this.context
798
793
  .api()
@@ -815,6 +810,7 @@ export class ArchetypeService {
815
810
  `Received content response for archetype ${index} (${g})`,
816
811
  {
817
812
  responseLength: contentResponse.length,
813
+ rawResponse: contentResponse, // Log raw response for debugging
818
814
  }
819
815
  );
820
816
 
@@ -924,13 +920,14 @@ export class ArchetypeService {
924
920
 
925
921
  const expectedHeader =
926
922
  sectionIndex === 0 ? 'EN:' : sectionIndex === 1 ? 'PT-M:' : 'PT-F:';
927
- if (lines[0] !== expectedHeader) {
923
+ const actualHeader = lines[0].trim(); // Trim the header to remove trailing spaces
924
+ if (actualHeader !== expectedHeader) {
928
925
  this.log(
929
926
  'error',
930
927
  `Invalid language header in section ${sectionIndex + 1}`,
931
928
  {
932
929
  expected: expectedHeader,
933
- found: lines[0],
930
+ found: actualHeader,
934
931
  }
935
932
  );
936
933
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.374",
3
+ "version": "0.0.375",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -25,7 +25,7 @@ export const buildLLMMessages = (env: BackendBindings) => ({
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
27
 
28
- Each archetype is influenced by the zodiac combination (Sun, Ascendant, Moon), and each one emphasizes one of those signs respectively.
28
+ 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
29
 
30
30
  Please provide:
31
31