From 6dffa397f25bf62a88169c2dcf2f9c818c90bdd9 Mon Sep 17 00:00:00 2001 From: Jeas0001 Date: Wed, 14 May 2025 09:04:28 +0200 Subject: [PATCH] Changed the initial message for the ai integration --- backend/API/Services/OpenAiRecipes.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/API/Services/OpenAiRecipes.cs b/backend/API/Services/OpenAiRecipes.cs index 2e70375..b502595 100644 --- a/backend/API/Services/OpenAiRecipes.cs +++ b/backend/API/Services/OpenAiRecipes.cs @@ -41,12 +41,12 @@ namespace API.Services new SystemChatMessage($"You are a a helpful assistant. You give back {recipeDTO.NumberOfRecipes} recipes on the dish that you have been given. " + $"Answer in the language {recipeDTO.Language}. " + $"Answer in .json format using this structure {jsonStructure}. " + - $"For the ingredients keep the names short ie. 'grated cheese' instead of 'cheese, grated (e.g., cheddar or gouda)'" + + $"Make ingredient names as short as possible and use title case ie. 'grated cheese' instead of 'cheese, grated (e.g., cheddar or gouda)'" + $"Avoid item/dishes that the person is allergic to here is a list {allergi}"), new UserChatMessage(recipeDTO.Dish), ]; - // Here we send the mess messages to chatgpt + // Here we send the messages to chatgpt ChatCompletion chat = await client.CompleteChatAsync(messages); return chat;