mirror of https://github.com/hwchase17/langchain
Adding File-Like object support in CSV Agent Toolkit (#10409)
If loading a CSV from a direct or temporary source, loading the file-like object (subclass of IOBase) directly allows the agent creation process to succeed, instead of throwing a ValueError. Added an additional elif and tweaked value error message. Added test to validate this functionality. Pandas from_csv supports this natively but this current implementation only accepts strings or paths to files. https://pandas.pydata.org/docs/user_guide/io.html#io-read-csv-table --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com> Co-authored-by: Bagatur <baskaryan@gmail.com>pull/10509/head
parent
999163fbd6
commit
50128c8b39
Loading…
Reference in New Issue