From 2c725a1b110b399ef6f371acaa0460c1340045a1 Mon Sep 17 00:00:00 2001 From: AbdulrhmanGoni Date: Sat, 18 Jan 2025 00:46:29 +0300 Subject: [PATCH] feat: change CSV dataset file format structure Change the CSV dataset file format structure from one column which is 'text' column to three columns structure which are 'system', 'prompt' and 'response' columns. --- src/services/export/CSV_Format.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/services/export/CSV_Format.ts b/src/services/export/CSV_Format.ts index 5796fbd..aaf3c34 100644 --- a/src/services/export/CSV_Format.ts +++ b/src/services/export/CSV_Format.ts @@ -8,16 +8,15 @@ function CSV_Formater({ answer, }: InstructionBase): string { return ( - `"${systemMessage ? sanitizer(systemMessage) + ". " : ""}` + - `### Prompt: ${sanitizer(question)}. ` + - `### Response: ${sanitizer(answer)}." \n` + `"${systemMessage ? sanitizer(systemMessage) : ""}",` + + `"${sanitizer(question)}","${sanitizer(answer)}"\n` ); } const QAFormat: DatasetFormat = { formater: CSV_Formater, decorators: { - first: "text\n", + first: "system,prompt,response\n", }, };