mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: none type error. (#11735)
### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -25,6 +25,8 @@ from rag.prompts.generator import vision_llm_figure_describe_prompt
|
|||||||
|
|
||||||
|
|
||||||
def vision_figure_parser_figure_data_wrapper(figures_data_without_positions):
|
def vision_figure_parser_figure_data_wrapper(figures_data_without_positions):
|
||||||
|
if not figures_data_without_positions:
|
||||||
|
return []
|
||||||
return [
|
return [
|
||||||
(
|
(
|
||||||
(figure_data[1], [figure_data[0]]),
|
(figure_data[1], [figure_data[0]]),
|
||||||
@ -35,7 +37,9 @@ def vision_figure_parser_figure_data_wrapper(figures_data_without_positions):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def vision_figure_parser_docx_wrapper(sections,tbls,callback=None,**kwargs):
|
def vision_figure_parser_docx_wrapper(sections, tbls, callback=None,**kwargs):
|
||||||
|
if not tbls:
|
||||||
|
return []
|
||||||
try:
|
try:
|
||||||
vision_model = LLMBundle(kwargs["tenant_id"], LLMType.IMAGE2TEXT)
|
vision_model = LLMBundle(kwargs["tenant_id"], LLMType.IMAGE2TEXT)
|
||||||
callback(0.7, "Visual model detected. Attempting to enhance figure extraction...")
|
callback(0.7, "Visual model detected. Attempting to enhance figure extraction...")
|
||||||
@ -53,6 +57,8 @@ def vision_figure_parser_docx_wrapper(sections,tbls,callback=None,**kwargs):
|
|||||||
|
|
||||||
|
|
||||||
def vision_figure_parser_pdf_wrapper(tbls, callback=None, **kwargs):
|
def vision_figure_parser_pdf_wrapper(tbls, callback=None, **kwargs):
|
||||||
|
if not tbls:
|
||||||
|
return []
|
||||||
try:
|
try:
|
||||||
vision_model = LLMBundle(kwargs["tenant_id"], LLMType.IMAGE2TEXT)
|
vision_model = LLMBundle(kwargs["tenant_id"], LLMType.IMAGE2TEXT)
|
||||||
callback(0.7, "Visual model detected. Attempting to enhance figure extraction...")
|
callback(0.7, "Visual model detected. Attempting to enhance figure extraction...")
|
||||||
|
|||||||
Reference in New Issue
Block a user