mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-17 21:32:36 +01:00
k
This commit is contained in:
parent
1ed28413e6
commit
d133e44bc3
@ -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
|
||||||
llm = get_default_llm_with_vision()
|
if not get_image_extraction_and_analysis_enabled():
|
||||||
if not llm or 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()
|
||||||
|
|
||||||
|
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."
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user