agentcoinorg/evo.ninja

Csv gets stored using global var if it is too large

Opened this issue · 1 comments

Describe the bug
When storing csv files as variables, Evo can't read from files stored as global variables.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://evo.ninja

  2. Add a sample csv file
    SampleCSVFile_119kb.csv

  3. Prompt used to produce error: "Return all rows in this sample csv file that contain the word xerox"

  4. See error:

-> The assistant has attempted to filter rows from the CSV data stored in the variable ${dataFile_1} using the csv_filterRows function, but encountered an error: "Error: cannot convert 'null' or 'undefined' to object." This error suggests that the variable ${dataFile_1} may not be properly initialized or accessible within the function call context.

Given the information in the chat, the best next step for the assistant would be to ensure that the variable ${dataFile_1} is correctly defined and contains the CSV data. If the variable is not set or the data is not stored correctly, the assistant should attempt to read the CSV file again and store its content in a variable that can be used for filtering.

Since the assistant has the capability to read and analyze CSV data, it should use the fs_readCSV function to read the CSV file "SampleCSVFile_119kb.csv" and store the content in a variable. After successfully reading the file and storing its content, the assistant can then proceed to filter the rows that contain the word "xerox" in the "Product Name" column.

Expected behavior
Since the assistant is capable of using functions that interact with the file system, it should execute a function to parse the CSV file and filter the relevant rows. If the resulting data is very large, the assistant should store it in a variable and present the relevant chunks to the user as needed.

Additional context
Link to Discord thread

Related: #530