From 469a605f838fc1acbe3a3ddf03bf407b0a04181c Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 29 Apr 2026 19:23:39 +0200 Subject: [PATCH] Add support for `psychedelics_intention` and `cannabis_intention` fields in `llm-extract-profile.ts` and adjust related type definitions --- backend/api/src/llm-extract-profile.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/api/src/llm-extract-profile.ts b/backend/api/src/llm-extract-profile.ts index debd2c7e..8e1b1750 100644 --- a/backend/api/src/llm-extract-profile.ts +++ b/backend/api/src/llm-extract-profile.ts @@ -75,6 +75,10 @@ async function validateProfileFields( 'pref_romantic_styles', 'relationship_status', 'keywords', + 'psychedelics_intention', + 'cannabis_intention', + 'psychedelics_pref', + 'cannabis_pref', ] for (const key of toArray) { if (result[key] !== undefined) { @@ -99,10 +103,6 @@ async function validateProfileFields( 'mbti', 'psychedelics', 'cannabis', - 'psychedelics_intention', - 'cannabis_intention', - 'psychedelics_pref', - 'cannabis_pref', 'headline', 'city', 'country', @@ -485,10 +485,10 @@ export async function callLLM( // Substances psychedelics: `String. One of: ${validChoices.psychedelics?.join(', ')}. Usage frequency of psychedelics/plant medicine, only if explicitly stated.`, cannabis: `String. One of: ${validChoices.cannabis?.join(', ')}. Usage frequency of cannabis, only if explicitly stated.`, - psychedelics_intention: `String. Array. Any of: ${validChoices.psychedelics_intention?.join(', ')}. Only if they use psychedelics.`, - cannabis_intention: `String. Array. Any of: ${validChoices.cannabis_intention?.join(', ')}. Only if they use cannabis.`, - psychedelics_pref: `String. Array. Any of: ${validChoices.psychedelics_pref?.join(', ')}. Partner preference for psychedelics use.`, - cannabis_pref: `String. Array. Any of: ${validChoices.cannabis_pref?.join(', ')}. Partner preference for cannabis use.`, + psychedelics_intention: `Array. Any of: ${validChoices.psychedelics_intention?.join(', ')}. Only if they use psychedelics.`, + cannabis_intention: `Array. Any of: ${validChoices.cannabis_intention?.join(', ')}. Only if they use cannabis.`, + psychedelics_pref: `Array. Any of: ${validChoices.psychedelics_pref?.join(', ')}. Partner preference for psychedelics use.`, + cannabis_pref: `Array. Any of: ${validChoices.cannabis_pref?.join(', ')}. Partner preference for cannabis use.`, // Identity — big5 only if person explicitly states a score, never infer from personality description mbti: `String. One of: ${validChoices.mbti?.join(', ')}`,