This example pipeline demonstrates how to summarize a document and
extract necessary information with OpenAI.
-
Configure the File Reader Snap to pass your
PDF file.
-
Configure the PDF Parser Snap to parse the PDF file
as an image. Set Parser type to Pages to image
converter to enable the downstream Snap to process the document as an
image.
-
Configure the OpenAI Multimodal Content Generator Snap with the
Type set to image and Content
type with image/jpeg to retreive the image from the
usptream Snap for multimodal content processing.
On validation, the Snap outputs a structured response that includes
sl_content
(the actual content), sl_contentType
(content format), and sl_type
(indicating the modality).
OpenAI Multimodal Content Generator Snap
configuration |
OpenAI Multimodal Content Generator Snap
output |
|
|
-
Configure the OpenAI Prompt Generator Snap with the
upstream multimodal content and set the prompt to Summarize the uploaded
document in 5 key points, and provide the count of nonfederal wildfires reported in
2018.
On validation, the Snap displays the upstream multimodal content passed, including the
prompt details.
OpenAI Prompt Generator Snap configuration |
OpenAI Prompt Generator Snap output |
|
|
-
Configure the OpenAI Chat Completions Snap to
process incoming multimodal content and generate the responses based on the prompt.
On validation, the Snap displays the response with the summarized information, the
answer to the specific query, and cites the source from the document.
OpenAI Chat Completions Snap configuration |
OpenAI Chat Completions Snap output |
|
|
To successfully reuse pipelines:
- Download and import the pipeline into the SnapLogic Platform.
- Configure Snap accounts, as applicable.
- Provide pipeline parameters, as applicable.