From f13e31b497f96874bf434e5f84d1bade449be92e Mon Sep 17 00:00:00 2001 From: Jamal Soueidan Date: Mon, 1 Jul 2024 06:56:49 +0200 Subject: [PATCH] Update OpenAIServiceProductTitle to enhance descriptions and increase max_tokens --- src/functions/openai/services/product-title.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functions/openai/services/product-title.ts b/src/functions/openai/services/product-title.ts index eacddff1..a733f3e8 100644 --- a/src/functions/openai/services/product-title.ts +++ b/src/functions/openai/services/product-title.ts @@ -21,14 +21,14 @@ export const OpenAIServiceProductTitle = async ({ messages: [ { role: "system", - content: `You are an expert in correcting treatment titles and descriptions. Please correct any grammatical errors in title and description. If the description is missing, add a short sentence that encourages customers to buy the product. Please responds with title, description json format and keep the language in danish.`, + content: `You are an expert in correcting treatment titles and descriptions. Please correct any grammatical errors in title and description. If the description is missing, add a short sentence that encourages customers to buy this treatment, the text should be from the indiviual beauty professional as seller of the treatment. Please responds with title, description json format and keep the language in danish.`, }, { role: "user", content: `Title: ${title}\nDescription: ${description || ""}`, }, ], - max_tokens: 100, + max_tokens: 500, response_format: { type: "json_object", },