Skip to content

feat: add simple pptx_extractor for etl_type=dify#24184

Closed
kurokobo wants to merge 2 commits into
langgenius:mainfrom
kurokobo:pptx
Closed

feat: add simple pptx_extractor for etl_type=dify#24184
kurokobo wants to merge 2 commits into
langgenius:mainfrom
kurokobo:pptx

Conversation

@kurokobo

Copy link
Copy Markdown
Contributor

Summary

This PR introduces simple PPTXExtractor to support PPTX files in the Knowledge in the environment with ETL_TYPE=dify (which is default deployment).

By referring existing WordExtractor with python-docx, this PR implements simple text-extaction method for PPTX:

  • Using python-pptx by the same maintainer of python-docx.
  • Based on the WordExtractor with minimal modification.
  • Support extracting images, tables, and hyperlinks (with http or https) in the slides.

Closes #24182

Screenshots

Example PPTX file (includes some images and tables): https://create.microsoft.com/en-us/template/business-plan-presentation-96423eb0-8e02-4a99-b83b-bc60d19202d5

Before After
image PPTX is accepted: image

Preview of Chunks, works fine for images and tables:imageimage

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. 💪 enhancement New feature or request labels Aug 19, 2025
@kurokobo

Copy link
Copy Markdown
Contributor Author

I think this could serve as a temporary solution, at least until a RAG 2.0 is implemented and becomes widely adopted in the community—even if it gets merged.
Even if it doesn't get merged, I believe there is value in making my code public for users who want to customize things themselves 😃

@kurokobo

Copy link
Copy Markdown
Contributor Author

VDB tests are failing, but it seems to be unrelated to my PR. Maybe it will work if we just rerun it?

@kurokobo kurokobo closed this Aug 19, 2025
@kurokobo kurokobo reopened this Aug 19, 2025
@kurokobo

Copy link
Copy Markdown
Contributor Author

Re-opened to trigger CI again🙏

@kurokobo

Copy link
Copy Markdown
Contributor Author

Hmm, these tests are a bit flaky. Both tests fail for unrelated reasons, such as docker pull and internal HTTP requests.

Let me know if there is something I should do, thanks!

@crazywoola crazywoola closed this Aug 20, 2025
@crazywoola crazywoola reopened this Aug 20, 2025
@kurokobo

Copy link
Copy Markdown
Contributor Author

Wow, all checks have passed, thanks @crazywoola for re-running.

@crazywoola

Copy link
Copy Markdown
Member

Hey @kurokobo I merged this extractor in the official-plugin-repo, talked to our team, since rag 2.0 will be released by the end of the month, so we can close it and wait for the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💪 enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support PPTX in the Knowledge for environments where ETL_TYPE=dify.

2 participants