자료 파일 읽기
read_documentReads PDFs, HWP/HWPX, Office files, images, and text from the materials folder, lists available files when no path is given, and extracts selected PDF pages or page images.
Instructions
Read files the user put in the materials folder: PDF, Korean HWP/HWPX, docx, pptx, xlsx, txt/md/csv, png/jpg. No path: list files and the folder location. PDF: pages ("1-3,7"); mode="images" returns page images (scans, formula-heavy pages). Long text: part=2, 3, … Example: {"path": "physics/ch3.pdf", "pages": "1-5"} On failure: outside the folder or unsupported → ask the user to put the file there or save it as PDF.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | text | |
| part | No | ||
| path | No | File in the materials folder; empty = list files | |
| pages | No | PDF pages, e.g. "1-3,7" |