Langchain - Flowise Help Needed -- 2
Budget: $30 – $250 USD
I am using the UI Flowise to develop a LangChain Chat model with a downloaded, opensource local LLM. I keep getting an error: "Cannot read properties of undefined (reading '0')". I have checked all the dependencies and requirements and made sure versions are up to date - such as python, Nodejs, etc.
I am sure the problem is in an undefined object in Nodejs somewhere. I need someone to find that file and make the changes so the langchain works. I need someone familiar with phython, Nodejs, Langchain and preferably Flowise which is really just an UI for langchain.
My log reads:
2023-08-10 22:33:13 [INFO]: ⬆️ POST /api/v1/chatmessage/5c7c9f51-ba1b-4cea-99f9-a4467ca40466
2023-08-10 22:33:13 [INFO]: ⬆️ POST /api/v1/internal-prediction/5c7c9f51-ba1b-4cea-99f9-a4467ca40466
2023-08-10 22:33:13 [INFO]: [server]: Chatflow 5c7c9f51-ba1b-4cea-99f9-a4467ca40466 added into ChatflowPool
2023-08-10 22:33:13 [ERROR]: [server]: Error: Cannot read properties of undefined (reading '0')
TypeError: Cannot read properties of undefined (reading '0')
at OpenAIChat._call (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/llms/openai-chat.cjs:463:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async OpenAIChat._generate (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/llms/base.cjs:256:29)
at async OpenAIChat._generateUncached (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/llms/base.cjs:133:22)
at async LLMChain._call (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/chains/llm_chain.cjs:121:33)
at async LLMChain.call (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/chains/base.cjs:98:28)
at async runPrediction (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/chains/LLMChain/LLMChain.js:132:29)
at async LLMChain_Chains.run (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/chains/LLMChain/LLMChain.js:77:21)
at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:873:23)
2023-08-10 22:33:13 [INFO]: ⬆️ POST /api/v1/chatmessage/5c7c9f51-ba1b-4cea-99f9-a4467ca40466
Additional context
Works perfect with no errors when using OpenAI API as the llm.
My chatflow:
Setup
Installation [npx flowise start]
Flowise Version [1.3.3]
OS: [Linux - virtual server]
Browser [chrome]
Latest 18+ version of Nodejs
I am sure the problem is in an undefined object in Nodejs somewhere. I need someone to find that file and make the changes so the langchain works. I need someone familiar with phython, Nodejs, Langchain and preferably Flowise which is really just an UI for langchain.
My log reads:
2023-08-10 22:33:13 [INFO]: ⬆️ POST /api/v1/chatmessage/5c7c9f51-ba1b-4cea-99f9-a4467ca40466
2023-08-10 22:33:13 [INFO]: ⬆️ POST /api/v1/internal-prediction/5c7c9f51-ba1b-4cea-99f9-a4467ca40466
2023-08-10 22:33:13 [INFO]: [server]: Chatflow 5c7c9f51-ba1b-4cea-99f9-a4467ca40466 added into ChatflowPool
2023-08-10 22:33:13 [ERROR]: [server]: Error: Cannot read properties of undefined (reading '0')
TypeError: Cannot read properties of undefined (reading '0')
at OpenAIChat._call (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/llms/openai-chat.cjs:463:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async OpenAIChat._generate (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/llms/base.cjs:256:29)
at async OpenAIChat._generateUncached (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/llms/base.cjs:133:22)
at async LLMChain._call (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/chains/llm_chain.cjs:121:33)
at async LLMChain.call (/usr/local/lib/node_modules/flowise/node_modules/langchain/dist/chains/base.cjs:98:28)
at async runPrediction (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/chains/LLMChain/LLMChain.js:132:29)
at async LLMChain_Chains.run (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/chains/LLMChain/LLMChain.js:77:21)
at async App.processPrediction (/usr/local/lib/node_modules/flowise/dist/index.js:873:23)
2023-08-10 22:33:13 [INFO]: ⬆️ POST /api/v1/chatmessage/5c7c9f51-ba1b-4cea-99f9-a4467ca40466
Additional context
Works perfect with no errors when using OpenAI API as the llm.
My chatflow:
Setup
Installation [npx flowise start]
Flowise Version [1.3.3]
OS: [Linux - virtual server]
Browser [chrome]
Latest 18+ version of Nodejs