@zodic/shared 0.0.37 → 0.0.39

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.
@@ -0,0 +1,134 @@
1
+ import { BackendBindings, ChatMessages, Crown } from '../types';
2
+ import { conceptPrompts } from './conceptPrompts';
3
+
4
+ export const buildChatGPTMessages = (env: BackendBindings) => ({
5
+ generateCosmicMirrorArchetypeBasicInfo: ({
6
+ sun,
7
+ ascendant,
8
+ moon,
9
+ }: Crown): ChatMessages => [
10
+ {
11
+ role: 'system',
12
+ content: env.PROMPT_GENERATE_ARCHETYPE,
13
+ },
14
+ {
15
+ role: 'user',
16
+ content: `
17
+ - Sun: ${sun}
18
+ - Ascendant: ${ascendant}
19
+ - Moon: ${moon}
20
+ `,
21
+ },
22
+ ],
23
+ generateCosmicMirrorArchetypesLeonardoPrompts: (
24
+ archetypes: Array<{ name: string; description: string }>
25
+ ): ChatMessages => [
26
+ {
27
+ role: 'system',
28
+ content: env.PROMPT_GENERATE_LEONARDO,
29
+ },
30
+ {
31
+ role: 'user',
32
+ content: `
33
+ 1.
34
+ - Name: ${archetypes[0].name}
35
+ - Description: ${archetypes[0].description}
36
+
37
+ 2.
38
+ - Name: ${archetypes[1].name}
39
+ - Description: ${archetypes[1].description}
40
+
41
+ 3.
42
+ - Name: ${archetypes[2].name}
43
+ - Description: ${archetypes[2].description}
44
+ `,
45
+ },
46
+ ],
47
+ personalizeCosmicMirrorLeonardoPrompt: ({
48
+ leonardoPrompt,
49
+ traits,
50
+ }: {
51
+ leonardoPrompt: string;
52
+ traits: string;
53
+ }): ChatMessages => [
54
+ {
55
+ role: 'system',
56
+ content: env.PROMPT_GENERATE_USER_LUMINOUS_SELF,
57
+ },
58
+ {
59
+ role: 'user',
60
+ content: `
61
+ - Prompt: ${leonardoPrompt}
62
+ - Traits: ${traits}
63
+ `,
64
+ },
65
+ ],
66
+ generateConceptBasicInfo: ({
67
+ combination,
68
+ conceptSlug,
69
+ }: {
70
+ combination: string;
71
+ conceptSlug: string;
72
+ }): ChatMessages => {
73
+ return [
74
+ {
75
+ role: 'system',
76
+ content: conceptPrompts(env)['basicInfo'][conceptSlug],
77
+ },
78
+ {
79
+ role: 'user',
80
+ content: `
81
+ Combination: ${combination}
82
+ `,
83
+ },
84
+ ];
85
+ },
86
+ generateConceptLeonardoPrompt: ({
87
+ combination,
88
+ conceptSlug,
89
+ }: {
90
+ combination: string;
91
+ conceptSlug: string;
92
+ }): ChatMessages => [
93
+ {
94
+ role: 'system',
95
+ content: conceptPrompts(env)['leonardoPrompt'][conceptSlug],
96
+ },
97
+ {
98
+ role: 'user',
99
+ content: `
100
+ Combination: ${combination}
101
+ `,
102
+ },
103
+ ],
104
+ generateConceptContent: ({
105
+ name,
106
+ description,
107
+ poem,
108
+ combination,
109
+ conceptSlug
110
+ }: {
111
+ name: string;
112
+ description: string;
113
+ poem: string;
114
+ conceptSlug: string;
115
+ combination: string;
116
+ }): ChatMessages => [
117
+ {
118
+ role: 'system',
119
+ content: conceptPrompts(env)['content'][conceptSlug],
120
+ },
121
+ {
122
+ role: 'user',
123
+ content: `
124
+ Concept Details:
125
+ - Combination: ${combination}
126
+ - Name: ${name}
127
+ - Description: ${description}
128
+ - Poem: ${poem}
129
+
130
+ Generate additional content to elaborate on this concept for frontend display.
131
+ `,
132
+ },
133
+ ],
134
+ });
@@ -0,0 +1,49 @@
1
+ import { BackendBindings } from '../types';
2
+
3
+ export const conceptPrompts: (
4
+ env: BackendBindings
5
+ ) => Record<string, Record<string, string>> = (env) => ({
6
+ basicInfo: {
7
+ crown: '',
8
+ scepter: '',
9
+ amulet: '',
10
+ lantern: '',
11
+ orb: '',
12
+ },
13
+ content: {
14
+ crown: '',
15
+ scepter: '',
16
+ amulet: '',
17
+ lantern: '',
18
+ orb: '',
19
+ },
20
+ leonardoPrompt: {
21
+ crown: '',
22
+ scepter: '',
23
+ amulet: '',
24
+ lantern: '',
25
+ orb: '',
26
+ },
27
+ });
28
+
29
+ // basicInfo: {
30
+ // crown: env.PROMPT_GENERATE_CONCEPT_BASIC_INFO_CROWN || '',
31
+ // scepter: env.PROMPT_GENERATE_CONCEPT_BASIC_INFO_SCEPTER || '',
32
+ // amulet: env.PROMPT_GENERATE_CONCEPT_BASIC_INFO_AMULET || '',
33
+ // lantern: env.PROMPT_GENERATE_CONCEPT_BASIC_INFO_LANTERN || '',
34
+ // orb: env.PROMPT_GENERATE_CONCEPT_BASIC_INFO_ORB || '',
35
+ // },
36
+ // content: {
37
+ // crown: env.PROMPT_GENERATE_CONCEPT_CONTENT_CROWN || '',
38
+ // scepter: env.PROMPT_GENERATE_CONCEPT_CONTENT_SCEPTER || '',
39
+ // amulet: env.PROMPT_GENERATE_CONCEPT_CONTENT_AMULET || '',
40
+ // lantern: env.PROMPT_GENERATE_CONCEPT_CONTENT_LANTERN || '',
41
+ // orb: env.PROMPT_GENERATE_CONCEPT_CONTENT_ORB || '',
42
+ // },
43
+ // leonardoPrompt: {
44
+ // crown: env.PROMPT_GENERATE_CONCEPT_LEONARDOPROMPT_CROWN || '',
45
+ // scepter: env.PROMPT_GENERATE_CONCEPT_LEONARDOPROMPT_SCEPTER || '',
46
+ // amulet: env.PROMPT_GENERATE_CONCEPT_LEONARDOPROMPT_AMULET || '',
47
+ // lantern: env.PROMPT_GENERATE_CONCEPT_LEONARDOPROMPT_LANTERN || '',
48
+ // orb: env.PROMPT_GENERATE_CONCEPT_LEONARDOPROMPT_ORB || '',
49
+ // }