Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API POST /ingest failed for creating Assistant with CSV file #228

Open
ldhoax opened this issue Mar 16, 2024 · 2 comments
Open

API POST /ingest failed for creating Assistant with CSV file #228

ldhoax opened this issue Mar 16, 2024 · 2 comments

Comments

@ldhoax
Copy link

ldhoax commented Mar 16, 2024

I'm trying to create an Assistant with a CSV file.
The assistant has been created successfully, but I got ValueError: Unsupported mime type: text/csv in POST /ingest" API. I tried with other file types like HTML, PDF,.. it works fine!

The error in langchain_community/document_loaders/parsers/generic.py in lazy_parse (line 70). I can not figure out error in opengpts or langchain_community

image
image

@mkorpela
Copy link
Collaborator

Hi @ldhoax,
Thanks for the report. CSV for /ingest is not currently supported.

Seems that the UI has CSV there.
image

Related code is in /backend/parsing.py if you want to try to add the support:

HANDLERS = {
    "application/pdf": PDFMinerParser(),
    "text/plain": TextParser(),
    "text/html": BS4HTMLParser(),
    "application/msword": MsWordParser(),
    "application/vnd.openxmlformats-officedocument.wordprocessingml.document": (
        MsWordParser()
    ),
}

@ldhoax
Copy link
Author

ldhoax commented Mar 16, 2024

Thanks a lot @mkorpela

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants