langchain/libs/core/tests
Jun Yamog 830cad7bc0
core: fix CommaSeparatedListOutputParser to handle columns that may contain commas in it (#26365)
- **Description:**
Currently CommaSeparatedListOutputParser can't handle strings that may
contain commas within a column. It would parse any commas as the
delimiter.
Ex. 
"foo, foo2", "bar", "baz"

It will create 4 columns: "foo", "foo2", "bar", "baz"

This should be 3 columns:

"foo, foo2", "bar", "baz"

- **Dependencies:**
Added 2 additional imports, but they are built in python packages.

import csv
from io import StringIO

- **Twitter handle:** @jkyamog

- [ ] **Add tests and docs**: 
1. added simple unit test test_multiple_items_with_comma

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
2024-11-01 22:42:24 +00:00
..
integration_tests core: Add ruff rules for PIE (#26939) 2024-09-27 12:08:35 -04:00
unit_tests core: fix CommaSeparatedListOutputParser to handle columns that may contain commas in it (#26365) 2024-11-01 22:42:24 +00:00
__init__.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00