mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-08-08 14:02:09 +02:00
k
This commit is contained in:
@@ -342,9 +342,14 @@ def process_image_sections(documents: list[Document]) -> list[IndexingDocument]:
|
|||||||
Returns:
|
Returns:
|
||||||
List of IndexingDocument objects with processed_sections as list[Section]
|
List of IndexingDocument objects with processed_sections as list[Section]
|
||||||
"""
|
"""
|
||||||
# Get the vision LLM
|
# Check if image extraction and analysis is enabled before trying to get a vision LLM
|
||||||
|
if not get_image_extraction_and_analysis_enabled():
|
||||||
|
llm = None
|
||||||
|
else:
|
||||||
|
# Only get the vision LLM if image processing is enabled
|
||||||
llm = get_default_llm_with_vision()
|
llm = get_default_llm_with_vision()
|
||||||
if not llm or not get_image_extraction_and_analysis_enabled():
|
|
||||||
|
if not llm:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"No vision-capable LLM available. Image sections will not be processed."
|
"No vision-capable LLM available. Image sections will not be processed."
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user