Describe the bug
When I use this component of LocalAI to call the embedding model deployed on another server through the API, the vector computation process is successful, but when the data is transferred to memory, it returns this error.
To Reproduce
Steps to reproduce the behavior:
Go to 'cd /root/app/Flowise/docker'
Click on 'docker-compose up'
Scroll down to '....'
Go to 'cd /root/app/Flowise/LocalAI'
Click on 'docker-compose up'
. See error
Expected behavior
I hope that when I call my embedding model through localai, the interface can be successfully stored in my local memory, so that my LLM can answer questions based on my text
Screenshots
Flow
flowise_1 | 2023-10-31 11:26:31 [INFO]: POST /api/v1/chatmessage/628a845f-8876-48ab-a4a7-74cf8f660768
flowise_1 | 2023-10-31 11:26:31 [INFO]: POST /api/v1/internal-prediction/628a845f-8876-48ab-a4a7-74cf8f660768
flowise_1 | 2023-10-31 11:26:32 [ERROR]: Cannot read properties of undefined (reading 'embedding')
flowise_1 | TypeError: Cannot read properties of undefined (reading 'embedding')
flowise_1 | at OpenAIEmbeddings.embedDocuments (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/embeddings/openai.cjs:153:50)
flowise_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
flowise_1 | at async MemoryVectorStore.addDocuments (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/vectorstores/memory.cjs:41:32)
flowise_1 | at async MemoryVectorStore.fromDocuments (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/vectorstores/memory.cjs:129:9)
flowise_1 | at async InMemoryVectorStore_VectorStores.init (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/InMemory/InMemoryVectorStore.js:62:29)
flowise_1 | at async buildLangchain (/usr/local/lib/node_modules/flowise/dist/utils/index.js:223:50)
flowise_1 | at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:816:40)
flowise_1 | at async /usr/local/lib/node_modules/flowise/dist/index.js:609:13
flowise_1 | 2023-10-31 11:26:32 [ERROR]: [server]: Error: TypeError: Cannot read properties of undefined (reading 'embedding')
flowise_1 | Error: TypeError: Cannot read properties of undefined (reading 'embedding')
flowise_1 | at buildLangchain (/usr/local/lib/node_modules/flowise/dist/utils/index.js:235:19)
flowise_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
flowise_1 | at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:816:40)
flowise_1 | at async /usr/local/lib/node_modules/flowise/dist/index.js:609:13
flowise_1 | 2023-10-31 11:26:32 [INFO]: POST /api/v1/chatmessage/628a845f-8876-48ab-a4a7-74cf8f660768
for some reason it was calling OpenAIEmbeddings instead of LocalAI Embeddings, my suggestion is to try create a new chatflow with a blank canvas and see if issue still persits
Describe the bug When I use this component of LocalAI to call the embedding model deployed on another server through the API, the vector computation process is successful, but when the data is transferred to memory, it returns this error.
To Reproduce Steps to reproduce the behavior:
Expected behavior I hope that when I call my embedding model through localai, the interface can be successfully stored in my local memory, so that my LLM can answer questions based on my text
Screenshots
Flow flowise_1 | 2023-10-31 11:26:31 [INFO]: POST /api/v1/chatmessage/628a845f-8876-48ab-a4a7-74cf8f660768 flowise_1 | 2023-10-31 11:26:31 [INFO]: POST /api/v1/internal-prediction/628a845f-8876-48ab-a4a7-74cf8f660768 flowise_1 | 2023-10-31 11:26:32 [ERROR]: Cannot read properties of undefined (reading 'embedding') flowise_1 | TypeError: Cannot read properties of undefined (reading 'embedding') flowise_1 | at OpenAIEmbeddings.embedDocuments (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/embeddings/openai.cjs:153:50) flowise_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) flowise_1 | at async MemoryVectorStore.addDocuments (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/vectorstores/memory.cjs:41:32) flowise_1 | at async MemoryVectorStore.fromDocuments (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/vectorstores/memory.cjs:129:9) flowise_1 | at async InMemoryVectorStore_VectorStores.init (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/vectorstores/InMemory/InMemoryVectorStore.js:62:29) flowise_1 | at async buildLangchain (/usr/local/lib/node_modules/flowise/dist/utils/index.js:223:50) flowise_1 | at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:816:40) flowise_1 | at async /usr/local/lib/node_modules/flowise/dist/index.js:609:13 flowise_1 | 2023-10-31 11:26:32 [ERROR]: [server]: Error: TypeError: Cannot read properties of undefined (reading 'embedding') flowise_1 | Error: TypeError: Cannot read properties of undefined (reading 'embedding') flowise_1 | at buildLangchain (/usr/local/lib/node_modules/flowise/dist/utils/index.js:235:19) flowise_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) flowise_1 | at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:816:40) flowise_1 | at async /usr/local/lib/node_modules/flowise/dist/index.js:609:13 flowise_1 | 2023-10-31 11:26:32 [INFO]: POST /api/v1/chatmessage/628a845f-8876-48ab-a4a7-74cf8f660768
Setup
Additional context nothing