Skip to content

Commit 469a605

Browse files
committed
Add support for psychedelics_intention and cannabis_intention fields in llm-extract-profile.ts and adjust related type definitions
1 parent a26805f commit 469a605

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

backend/api/src/llm-extract-profile.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ async function validateProfileFields(
7575
'pref_romantic_styles',
7676
'relationship_status',
7777
'keywords',
78+
'psychedelics_intention',
79+
'cannabis_intention',
80+
'psychedelics_pref',
81+
'cannabis_pref',
7882
]
7983
for (const key of toArray) {
8084
if (result[key] !== undefined) {
@@ -99,10 +103,6 @@ async function validateProfileFields(
99103
'mbti',
100104
'psychedelics',
101105
'cannabis',
102-
'psychedelics_intention',
103-
'cannabis_intention',
104-
'psychedelics_pref',
105-
'cannabis_pref',
106106
'headline',
107107
'city',
108108
'country',
@@ -485,10 +485,10 @@ export async function callLLM(
485485
// Substances
486486
psychedelics: `String. One of: ${validChoices.psychedelics?.join(', ')}. Usage frequency of psychedelics/plant medicine, only if explicitly stated.`,
487487
cannabis: `String. One of: ${validChoices.cannabis?.join(', ')}. Usage frequency of cannabis, only if explicitly stated.`,
488-
psychedelics_intention: `String. Array. Any of: ${validChoices.psychedelics_intention?.join(', ')}. Only if they use psychedelics.`,
489-
cannabis_intention: `String. Array. Any of: ${validChoices.cannabis_intention?.join(', ')}. Only if they use cannabis.`,
490-
psychedelics_pref: `String. Array. Any of: ${validChoices.psychedelics_pref?.join(', ')}. Partner preference for psychedelics use.`,
491-
cannabis_pref: `String. Array. Any of: ${validChoices.cannabis_pref?.join(', ')}. Partner preference for cannabis use.`,
488+
psychedelics_intention: `Array. Any of: ${validChoices.psychedelics_intention?.join(', ')}. Only if they use psychedelics.`,
489+
cannabis_intention: `Array. Any of: ${validChoices.cannabis_intention?.join(', ')}. Only if they use cannabis.`,
490+
psychedelics_pref: `Array. Any of: ${validChoices.psychedelics_pref?.join(', ')}. Partner preference for psychedelics use.`,
491+
cannabis_pref: `Array. Any of: ${validChoices.cannabis_pref?.join(', ')}. Partner preference for cannabis use.`,
492492

493493
// Identity — big5 only if person explicitly states a score, never infer from personality description
494494
mbti: `String. One of: ${validChoices.mbti?.join(', ')}`,

0 commit comments

Comments
 (0)