From a2264f46ffd18d5f41b27940667d8e98d1a17892 Mon Sep 17 00:00:00 2001
From: timothycarambat <rambat1010@gmail.com>
Date: Tue, 14 Jan 2025 14:43:00 -0800
Subject: [PATCH] add `index` to response object for marshalling resolves #2956

---
 server/utils/chats/openaiCompatible.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/utils/chats/openaiCompatible.js b/server/utils/chats/openaiCompatible.js
index fcae97827..38bb27188 100644
--- a/server/utils/chats/openaiCompatible.js
+++ b/server/utils/chats/openaiCompatible.js
@@ -481,6 +481,7 @@ function formatJSON(
     model: model,
     choices: [
       {
+        index: 0,
         [chunked ? "delta" : "message"]: {
           role: "assistant",
           content: chat.textResponse,
-- 
GitLab