quivr/backend/parsers/csv.py

20 lines
419 B
Python
Raw Normal View History

from langchain.document_loaders import CSVLoader
from models import File
from .common import process_file
2023-05-13 00:05:31 +03:00
2023-05-22 09:39:55 +03:00
def process_csv(
2023-06-28 20:39:27 +03:00
file: File,
enable_summarization,
2023-06-28 20:39:27 +03:00
brain_id,
user_openai_api_key,
):
return process_file(
file=file,
loader_class=CSVLoader,
enable_summarization=enable_summarization,
brain_id=brain_id,
user_openai_api_key=user_openai_api_key,
)