FlowiseAI / Flowise

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

[BUG] Pyodide Packages Loading Problem - Chatflow: CSV Agent with LocalAI #2496

Open agpaola opened 1 month ago

agpaola commented 1 month ago

Describe the bug

I am encountering an issue when trying to use the CSV Agent with a LocalAI whose model is 'gpt-4-32k'. When I prompt "Hello" in the chat, it replies like this:

PythonError: Traceback (most recent call last): File "/lib/python311.zip/_pyodide/_base.py", line 571, in eval_code_async await CodeRunner( File "/lib/python311.zip/_pyodide/_base.py", line 394, in run_async coroutine = eval(self.code, globals, locals) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1, in ModuleNotFoundError: The module 'pandas' is included in the Pyodide distribution, but it is not installed. You can install it by calling: await micropip.install("pandas") in Python, or await pyodide.loadPackage("pandas") in JavaScript See
https://pyodide.org/en/stable/usage/loading-packages.html
for more details.

Is this a Flowise bug or caused by my flowise installed node_modules?

$ npm pandas --version
10.8.0

To Reproduce Steps to reproduce the behavior:

  1. Go to 'CSV Agent' template

image

  1. Replace the CHATOPENAI with LOCALAI (I am using a local model)
  2. Prompt "Hello"
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Flow The local AI is not publicly available.

Setup

WizKid1968 commented 3 weeks ago

Any updates? I'm getting an error running csv-agent as well which is associated with pandas not being installed, which is rendering the following: { "statusCode": 500, "success": false, "message": "Error: nodesService.executeCustomFunction - Error running custom function: Error: ReferenceError: read_csv is not defined", "stack": {} }

agpaola commented 3 weeks ago

Any updates? I'm getting an error running csv-agent as well which is associated with pandas not being installed, which is rendering the following: { "statusCode": 500, "success": false, "message": "Error: nodesService.executeCustomFunction - Error running custom function: Error: ReferenceError: read_csv is not defined", "stack": {} }

Hello, unfortunately I don't have any updates. Your read_csv error is related to the read csv code of the CSV agent. Just for curiosity, which model are you using?