your-papa/obsidian-Smart2Brain

TypeError: Cannot read properties of undefined (reading 'reduce')

Opened this issue · 1 comments

What happened?

when i try to use smart second brain to answer question based on my notes
IUKS6XUW`PLB 9U_R@@47NH
it report TypeError: Cannot read properties of undefined (reading 'reduce'), full stack as below:

Error Statement


TypeError: Cannot read properties of undefined (reading 'reduce')
at IQ.eval [as func] (plugin:smart-second-brain:386:711)
at eval (plugin:smart-second-brain:246:17082)
at K2.run (plugin:smart-second-brain:245:17381)
at i (plugin:smart-second-brain:246:17043)
at new Promise ()
at IQ._transform (plugin:smart-second-brain:246:17006)
at async WA.tapOutputIterable (plugin:smart-second-brain:245:15199)
at async IQ._transformStreamWithConfig (plugin:smart-second-brain:246:3480)
at async Uo._streamIterator (plugin:smart-second-brain:246:13751)
at async Uo.transform (plugin:smart-second-brain:246:3965)

Steps to Reproduce

step 1 - set parameter as below
image
step 2 - ask assistant

Smart Second Brain Version

1.3.0

Debug Info

console log info:

[S2B] Initializing second brain
Gen Model: {model: 'qwen2', baseUrl: 'http://localhost:11434', temperature: 0.5, contextWindow: 1848, lcModel: {…}}baseUrl: "http://localhost:11434"contextWindow: 1748lcModel: nH {lc_serializable: true, lc_kwargs: {…}, lc_runnable: true, name: undefined, verbose: false, …}model: "qwen2"temperature: 0.5[[Prototype]]: Object
Embed Model: {model: 'nomic-embed-text', baseUrl: 'http://localhost:11434', similarityThreshold: 0.75, k: 100}
plugin:smart-second-brain:285 [PAPA] Restored vectorstore from backup
plugin:smart-second-brain:285 [PAPA] Restored recordManager from backup
plugin:smart-second-brain:285 [PAPA] Loaded 1951 documents from Obsidian
plugin:smart-second-brain:285 [PAPA] Embedding documents in mode full
plugin:smart-second-brain:285 [PAPA] Indexed all: Added 0 documents, skipped 1951 documents, deleted 0 documents
plugin:smart-second-brain:285 [PAPA] Running RAG... Input: {isRAG: true, userQuery

network request correct
image

cl93a commented

Same issue here. Solved by setting the language
image