From 81237bd787242e1c5803fe30e56d96f6f44647c5 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Fri, 22 Mar 2024 19:18:17 -0300 Subject: [PATCH] fix(basic.gblib): FUNCTION GPT. --- packages/gpt.gblib/services/ChatServices.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/gpt.gblib/services/ChatServices.ts b/packages/gpt.gblib/services/ChatServices.ts index 20ab74a1..1dc2402d 100644 --- a/packages/gpt.gblib/services/ChatServices.ts +++ b/packages/gpt.gblib/services/ChatServices.ts @@ -327,7 +327,7 @@ export class ChatServices { \n\n{context}\n\n And based on \n\n{chat_history}\n\n - rephrase the response to the user using the aforementioned context. If you're unsure of the answer, utilize any relevant context provided to answer the question effectively. + rephrase the response to the user using the aforementioned context. If you're unsure of the answer, utilize any relevant context provided to answer the question effectively. Don“t output MD images tags url previously shown. ` ), new MessagesPlaceholder("chat_history"), @@ -435,12 +435,13 @@ export class ChatServices { GBLog.info(`Invalid Answer Mode in Config.xlsx: ${LLMMode}.`); } + const resultToPersist = result.replace(/\!\[.*\)/gi, ''); // Removes .MD url. await memory.saveContext( { input: question, }, { - output: result, + output: resultToPersist } );