The following entry in the Docker log output provides the clue:
2024-01-05 12:22:08 TypeError: tokenChunks.slice is not a function
2024-01-05 12:22:08 at cannonball (/app/server/utils/helpers/chat/index.js:307:34)
2024-01-05 12:22:08 at /app/server/utils/helpers/chat/index.js:143:29
2024-01-05 12:22:08 at new Promise ()
2024-01-05 12:22:08 at messageArrayCompressor (/app/server/utils/helpers/chat/index.js:102:29)
2024-01-05 12:22:08 at LMStudioLLM.compressMessages (/app/server/utils/AiProviders/lmStudio/index.js:187:18)
2024-01-05 12:22:08 at streamChatWithWorkspace (/app/server/utils/chats/stream.js:98:39)
2024-01-05 12:22:08 at async /app/server/endpoints/chat.js:76:9
Looking at the file /app/server/utils/helpers/chat/index.js, specifically line 307 shows this:
Digging backwards through the code, the tokenChunks is an integer value, not an array, therefore doesn't support the slice method to split the array into parts.
The following entry in the Docker log output provides the clue:
2024-01-05 12:22:08 TypeError: tokenChunks.slice is not a function 2024-01-05 12:22:08 at cannonball (/app/server/utils/helpers/chat/index.js:307:34) 2024-01-05 12:22:08 at /app/server/utils/helpers/chat/index.js:143:29 2024-01-05 12:22:08 at new Promise ()
2024-01-05 12:22:08 at messageArrayCompressor (/app/server/utils/helpers/chat/index.js:102:29)
2024-01-05 12:22:08 at LMStudioLLM.compressMessages (/app/server/utils/AiProviders/lmStudio/index.js:187:18)
2024-01-05 12:22:08 at streamChatWithWorkspace (/app/server/utils/chats/stream.js:98:39)
2024-01-05 12:22:08 at async /app/server/endpoints/chat.js:76:9
Looking at the file /app/server/utils/helpers/chat/index.js, specifically line 307 shows this:
const leftChunks = tokenChunks.slice(0, middleIdx - Math.round(delta / 2));
Digging backwards through the code, the tokenChunks is an integer value, not an array, therefore doesn't support the slice method to split the array into parts.