quivr/backend/core/parsers/txt.py

10 lines
373 B
Python
Raw Normal View History

from langchain.document_loaders import TextLoader
2023-06-28 20:39:27 +03:00
from models.files import File
2023-06-19 23:46:25 +03:00
from models.settings import CommonsDep
from .common import process_file
2023-05-18 02:22:13 +03:00
2023-05-22 09:39:55 +03:00
2023-06-28 20:39:27 +03:00
async def process_txt(commons: CommonsDep, file: File, enable_summarization, brain_id, user_openai_api_key):
return await process_file(commons, file, TextLoader, enable_summarization, brain_id,user_openai_api_key)