Repository navigation
feat(ParseDocument): 호스트 그림 읽기 함수로 문서 속 그림을 글로 (4.104.0) - #178
Merged
Merged
Conversation
ToolContext.extras["image_reader"] 가 있으면 [Image] 자리에 그림에서 읽은 글과 설명을 넣는다. 같은 그림은 한 번만 읽고 번호는 처음 나온 순서, 서로 다른 그림 최대 30장(20 MiB 상한). 읽지 못한 그림과 함수가 없을 때는 예전처럼 [Image]. _extract 는 그대로 글만 돌려준다. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
왜
ParseDocument 는 문서 속 그림을
[Image]자리표시로만 남겨, 그림을 볼 수 없는 모델은 스캔 페이지·차트·도해의 내용을 받지 못했습니다. XGEN 은 파일 저장소 그림 처리(관리자 VLM 하나, 그림 바이트마다 한 번 읽어 저장)를 만들었고, 같은 결과를 ParseDocument 에도 주려 합니다.무엇을 바꿨나
ToolContext.extras["image_reader"]로 그림 읽기 함수((바이트, 이름) -> 글 | None)를 주면, 그림 자리에 그 결과를 넣습니다.[Image]입니다. 임시 그림 경로는 결과에 남기지 않습니다._extract는 예전 그대로 글만 돌려줍니다. 그림까지 받는 것은_extract_with_images입니다.test_no_direct_file_io허용 목록에 parse_document_tool 을 이유와 함께 더했습니다(doc2chunk 가 이 호출의 임시 폴더에 꺼낸 그림이라 작업 공간 파일이 아닙니다).시험
tests/unit/test_parse_document_lock.py): 그림 읽기 함수가 있으면 같은 그림을 한 번만 읽고, 읽지 못한 그림은[Image]로 남고, 임시 경로가 남지 않습니다. 함수가 없으면 예전 그대로입니다.tests/unit전체 통과.머지 뒤
xgen-workflow 의 런타임 고정을 4.104.0 으로 올리면 켜집니다. workflow MR 이
extras["image_reader"]를 이미 싣습니다(그 전 판은 무시).🤖 Generated with Claude Code