From 0e785754d405bf00616ad4700320caa198de2634 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Fri, 8 Dec 2023 18:38:09 +0100 Subject: [PATCH] openaiExplainPatch: include model name --- src/openaiExplainPatch.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openaiExplainPatch.js b/src/openaiExplainPatch.js index b34acd7..294febc 100644 --- a/src/openaiExplainPatch.js +++ b/src/openaiExplainPatch.js @@ -116,9 +116,11 @@ Desired format: console.log(`user_prompt:\n\n${user_prompt}`); } + let m = null; + for (let i = 0; i < realModels.length; i++) try { - let m = realModels[i]; + m = realModels[i]; let enc = encoding_for_model(m); if (enc.encode(patchBody).length < amplification*max_tokens) throw new Error("The patch is trivial, no need for a summarization"); @@ -154,5 +156,5 @@ Desired format: console.log(aiResponse.choices[0].message); } - return aiResponse.choices[0].message.content; + return aiResponse.choices[0].message.content+`\n\n`; }