FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
29.77k stars 15.34k forks source link

[BUG] Expected property name or '}' in JSON at position 1 #2874

Open yyoussef11 opened 1 month ago

yyoussef11 commented 1 month ago

Describe the bug When running a chatflow using ollamaembeddings and Redis VectorStore i am receiving this error :

SyntaxError: Expected property name or '}' in JSON at position 1 at JSON.parse () at similaritySearchVectorWithScore (~\Flowise\packages\components\dist\nodes\vectorstores\Redis\Redis.js:276:44) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async vectorStore.similaritySearchVectorWithScore (~\Flowise\packages\components\dist\nodes\vectorstores\Redis\Redis.js:214:20) at async RedisVectorStore.similaritySearch (~\Flowise\node_modules.pnpm\@langchain+core@0.2.14langchain@0.2.3@aws-sdk+client-s3@3.529.1_@aws-sdk+credential-provide_iy4pkl2ze2vpuxlmnivkyhhz5q\node_modules\@langchain\core\dist\vectorstores.cjs:108:25)

To Reproduce Build a chatflow with "Recursive Character Text Splitter", Read from a folder, pass the document to a Redis vector store Use OllamaEmbeddings and use ChatOllama and Convesational Retrieval QA Chain

Expected behavior The pexected behavior is after upserting the files, when communicating with the Chatflow i want to receive results.

HenryHengZJ commented 1 month ago

does it works with other embeddings? or does ollama embedding work with other vector store

yyoussef11 commented 1 month ago

@HenryHengZJ actually when i changed the "top k" value of the Redis retriever from 1000 to 100, it didn't fail. Noting that the same "top k" value is used with another embedded data, and it worked.

Could it be the amount of embedded data was not enough?

to answer your questions: Ollama Embeddings worked with In Memory vector store

HenryHengZJ commented 3 weeks ago

I am guessing there might be some sort of rate limit from Redis? or from the embeddings side