langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
46.76k stars 6.61k forks source link

epub is mising a dot #8735

Closed taowang1993 closed 4 days ago

taowang1993 commented 4 days ago

Self Checks

Dify version

0.8.3

Cloud or Self Hosted

Cloud, Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

https://github.com/langgenius/dify/blob/main/api/core/rag/extractor/extract_processor.py

the extention epub should be .epub

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 4 days ago

Yes, there is a bug in the extract_processor.py file where the extension for EPUB files is not recognized correctly. The code incorrectly checks for the extension as "epub" instead of ".epub".

The current code:

elif file_extension == "epub":
    extractor = UnstructuredEpubExtractor(file_path)

It should be:

elif file_extension == ".epub":
    extractor = UnstructuredEpubExtractor(file_path)

This change will ensure that .epub files are correctly recognized and processed [1].

To continue talking to Dosu, mention @dosu.