Ver código fonte

Fix: PlainParser using fix in presentation (#9239)

### What problem does this PR solve?

tiny fix about the using of `deepdoc.pdf_parser.PlainParser` in
`rag.app.presentation.chunk`, I referred to other ways of using this
class.
So tiny the fix is, a issue seems unnecessary.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.20.1
yzz 2 meses atrás
pai
commit
550e65bb22
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2
    1
      rag/app/presentation.py

+ 2
- 1
rag/app/presentation.py Ver arquivo

@@ -135,7 +135,8 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
sections = pdf_parser(filename, binary, from_page=from_page, to_page=to_page, callback=callback)
elif layout_recognizer == "Plain Text":
pdf_parser = PlainParser()
sections, _ = pdf_parser(filename, binary, from_page=from_page, to_page=to_page, callback=callback)
sections, _ = pdf_parser(filename if not binary else binary, from_page=from_page, to_page=to_page,
callback=callback)
else:
vision_model = LLMBundle(kwargs["tenant_id"], LLMType.IMAGE2TEXT, llm_name=layout_recognizer, lang=lang)
pdf_parser = VisionParser(vision_model=vision_model, **kwargs)

Carregando…
Cancelar
Salvar