LLMImageBlobParser#
- class langchain_community.document_loaders.parsers.images.LLMImageBlobParser(*, model: BaseChatModel, prompt: str = 'You are an assistant tasked with summarizing images for retrieval. 1. These summaries will be embedded and used to retrieve the raw image. Give a concise summary of the image that is well optimized for retrieval\n2. extract all the text from the image. Do not exclude any content from the page.\nFormat answer in markdown without explanatory text and without markdown delimiter ``` at the beginning. ')[source]#
Parser for analyzing images using a language model (LLM).
- model#
The language model to use for analysis.
- Type:
- prompt#
The prompt to provide to the language model.
- Type:
str
Initializes the LLMImageBlobParser.
- Parameters:
model (BaseChatModel) β The language model to use for analysis.
prompt (str) β The prompt to provide to the language model.
Methods
__init__
(*,Β model[,Β prompt])Initializes the LLMImageBlobParser.
lazy_parse
(blob)Lazily parse a blob and yields Documents containing the parsed content.
parse
(blob)Eagerly parse the blob into a document or documents.
- __init__(*, model: BaseChatModel, prompt: str = 'You are an assistant tasked with summarizing images for retrieval. 1. These summaries will be embedded and used to retrieve the raw image. Give a concise summary of the image that is well optimized for retrieval\n2. extract all the text from the image. Do not exclude any content from the page.\nFormat answer in markdown without explanatory text and without markdown delimiter ``` at the beginning. ')[source]#
Initializes the LLMImageBlobParser.
- Parameters:
model (BaseChatModel) β The language model to use for analysis.
prompt (str) β The prompt to provide to the language model.
- lazy_parse(blob: Blob) Iterator[Document] #
Lazily parse a blob and yields Documents containing the parsed content.