CSV Agent seems not to be compatible with utf8

### Bug Description

When uploading a basic CVS file in a flow with a CSV agent, the execution raises an exception due to UTF-8 encoding

Error building Component CSVAgent: 'utf-8' codec can't decode byte 0xe9 in position 7: invalid continuation byte

`
Error building Component CSVAgent: 

'utf-8' codec can't decode byte 0xe9 in position 7: invalid continuation byte

Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/langflow/graph/vertex/base.py", line 709, in _build_results
    result = await initialize.loading.get_instance_results(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langflow/interface/initialize/loading.py", line 68, in get_instance_results
    return await build_component(params=custom_params, custom_component=custom_component)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langflow/interface/initialize/loading.py", line 145, in build_component
    build_results, artifacts = await custom_component.build_results()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 837, in build_results
    return await self._build_with_tracing()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 819, in _build_with_tracing
    _results, _artifacts = await self._build_results()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 885, in _build_results
    result = await asyncio.to_thread(method)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread
    return await loop.run_in_executor(None, func_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 65, in build_agent_response
  File "/app/.venv/lib/python3.12/site-packages/langchain_experimental/agents/agent_toolkits/csv/base.py", line 57, in create_csv_agent
    df = pd.read_csv(path, **_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1026, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 620, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1620, in __init__
    self._engine = self._make_engine(f, self.engine)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1898, in _make_engine
    return mapping[engine](f, **self.options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in __init__
    self._reader = parsers.TextReader(src, **kwds)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "parsers.pyx", line 574, in pandas._libs.parsers.TextReader.__cinit__
  File "parsers.pyx", line 663, in pandas._libs.parsers.TextReader._get_header
  File "parsers.pyx", line 874, in pandas._libs.parsers.TextReader._tokenize_rows
  File "parsers.pyx", line 891, in pandas._libs.parsers.TextReader._check_tokenize_status
  File "parsers.pyx", line 2053, in pandas._libs.parsers.raise_parser_error
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 7: invalid continuation byte

`

### Reproduction

Create a basic flow
Add a CSV agent
Add a language llm such as mistral small
Add a csv file generated from excel

### Expected behavior

A basic CVS agent should be able to take of a basic csv file

### Who can help?

_No response_

### Operating System

Ubuntu 22.04

### Langflow Version

1.1.1

### Python Version

None

### Screenshot

_No response_

### Flow File

[CSVAgent.json](https://github.com/user-attachments/files/18081477/CSVAgent.json)


Labels: bug
State: closed