View as Markdown
LLMWhisperer icon

LLMWhisperer ACTION

Extract Text

Convert your PDF/scanned documents to text format which can be used by LLMs. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's LLMWhisperer account once, then configure and run Extract Text from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "llmwhisperer-extract-text",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    llmwhisperer: { authProvisionId: "apn_xxxxxxx" },
    processingMode: "Processing Mode",
    outputMode: "Output Mode",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Extract Text inputs
Property Type Description
processingMode Processing Mode string
The processing mode to be used. Choose between ocr and text.
Required
outputMode Output Mode string
The output mode to be used. Choose between line-printer and text.
Required
pageSeperator Page Seperator string
The string to be used as a page separator. Eg: <<<
Optional
forceTextProcessing Force Text Processing boolean
If set to true, the document will be processed as text only. If set to false, the document will be processed based on LLMWhisperer's chosed stratergy.
Optional
pagesToExtract Pages To Extract string
Define which pages to extract. By default all pages are extracted. You can specify which pages to extract with this parameter. Example 1-5,7,21- will extract pages 1,2,3,4,5,7,21,22,23,24... till the last page.
Optional
timeout Timeout integer
The time in seconds after which the request will automatically switch to async mode. If a timeout occurs then the API will return a 202 message along with whisper-hash which can be used later to check processing status and retrieve the text. Refer to the async operation documentation for more information
Optional
storeMetadataForHighlighting Store Metadata for Highlighting boolean
If set to true, metadata required for the highlighting is stored. If you do not require highlighting API, set this to false. Note that setting this to true will store your text in our servers
Optional
medianFilterSize Median Filter Size integer
The size of the median filter to be applied to the image. This is used to remove noise from the image. This parameter works only in on-prem version of LLMWhisperer.
Optional
gaussianBlurRadius Gaussian Blur Radius integer
The radius of the gaussian blur to be applied to the image. This is used to remove noise from the image. This parameter works only in on-prem version of LLMWhisperer.
Optional
ocrProvider OCR Provider string
The OCR provider to be used. Choose between simple and advanced. This parameter works only in on-prem version of LLMWhisperer.
Optional
lineSplitterTolerance Line Splitter Tolerance string
Factor to decide when to move text to the next line when it is above or below the baseline. The default value of 0.4 signifies 40% of the average character height.
Optional
horizontalStretchFactor Horizontal Stretch Factor string
Factor by which a horizontal stretch has to applied. It defaults to 1.0. A stretch factor of 1.1 would mean at 10% stretch factor applied. Normally this factor need not be adjusted. You might want to use this parameter when multi column layouts back into each other. For example in a two column layout, the two columns get merged into one.
Optional
data File Path or URL string
The document to process. Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.txt)
Required
syncDir SyncDir dir
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
llmwhisperer-extract-text
Version
0.1.4
App
LLMWhisperer
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes