From f1cadfde2b19ce82dceb963e4b36ab45eca01ff7 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 4 Feb 2024 17:41:46 +0200 Subject: [PATCH] Fix llamacpp server --- public/scripts/textgen-settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index a803ec86c..bcbab5341 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -694,7 +694,7 @@ async function generateTextGenWithStreaming(generate_data, signal) { } else { const newText = data?.choices?.[0]?.text || data?.content || ''; text += newText; - logprobs = parseTextgenLogprobs(newText, data.choices[0]?.logprobs); + logprobs = parseTextgenLogprobs(newText, data.choices?.[0]?.logprobs); } yield { text, swipes, logprobs };