log recommendations

This commit is contained in:
Danel Kungla
2025-09-23 10:50:20 +03:00
parent fee8534fcc
commit 3dd82902fe
3 changed files with 21 additions and 5 deletions

View File

@@ -125,11 +125,10 @@ async function recommendationsLoader(
weight: weight.toString(),
},
},
max_output_tokens: 100,
});
const json = JSON.parse(response.output_text);
await supabaseClient
const updateAiResponse = await supabaseClient
.schema('medreport')
.from('ai_responses')
.insert({
@@ -144,7 +143,7 @@ async function recommendationsLoader(
weight,
}),
latest_data_change: latestISO,
response: JSON.stringify(response.output_text),
response: response.output_text,
});
return json.recommended;