Conversation
Summary of ChangesHello @inoray, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 문서 전처리 파사드(facade)의 주요 리팩토링 및 기능 개선을 포함합니다. 핵심 변경 사항은 문서 청킹 로직의 지능화, OCR 통합 강화, 그리고 다양한 파일 형식 변환을 위한 전용 프로세서 도입입니다. 이를 통해 문서 처리의 정확성과 유연성을 높이고, 특정 문서 유형에 대한 처리 효율을 개선합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이번 PR은 전처리기 파사드 코드를 대대적으로 리팩토링하고 정리하는 작업을 포함하고 있습니다. 주요 변경 사항은 다음과 같습니다:
attachment_processor,convert_processor,intelligent_processor로 역할을 분리하여 코드 구조를 개선했습니다.attachment_processor_origin,basic_processor등 오래되거나 중복되는 파일을 삭제하여 코드를 정리했습니다.intelligent_processor에 문서 구조와 토큰 크기를 고려한 새로운GenosBucketChunker를 도입하여 청킹 로직을 고도화했습니다.convert_processor에서 PPT 파일 처리를 위해langchain로더를 사용하는 등 특정 파일 형식에 대한 처리 방식을 개선했습니다.- 전반적으로 코드의 가독성과 유지보수성이 향상되었습니다.
다만, convert_processor.py의 예외 처리 방식에 일부 위험 요소가 있어 리뷰 코멘트를 남겼습니다. 해당 부분을 수정하면 더 안정적인 코드가 될 것입니다. 전반적으로 훌륭한 리팩토링 작업입니다.
| except Exception as e: | ||
| if pdf_path.exists(): | ||
| return str(pdf_path) |
There was a problem hiding this comment.
convert_to_pdf 함수 내의 예외 처리 블록이 모든 Exception을 잡고 pdf_path가 존재하면 경로를 반환하도록 되어 있습니다. 이 방식은 soffice 변환 실패로 인해 비어 있거나 손상된 PDF 파일이 생성되었을 때 오류를 숨길 수 있는 위험이 있습니다. 오류를 로깅하고 None을 반환하여 후속 처리 단계에서 실패를 인지할 수 있도록 하는 것이 더 안전합니다.
| except Exception as e: | |
| if pdf_path.exists(): | |
| return str(pdf_path) | |
| except Exception as e: | |
| _log.error(f"[convert_to_pdf] PDF 변환 중 오류 발생: {e}", exc_info=True) | |
| return None |
| try: | ||
| page_image_meta = await self._extract_page_images(pdf_path, request) | ||
| except: | ||
| pass |
Checklist: