The `llmwhisperer-client` is a JavaScript client library designed to facilitate interaction with the LLMWhisper API. Its primary function is to preprocess complex documents, such as PDFs and images, to extract raw text in a format optimized for consumption by Large Language Models. The library, currently at stable version 2.5.0, appears to follow an active release cadence with frequent minor updates. Key differentiators include a "Layout Preserving Mode" for maintaining document structure, automatic switching between native text and OCR modes, and intelligent handling of interactive elements like checkboxes in PDF forms. This enables robust and accurate structured data extraction from various document types, including invoices, purchase orders, and bank statements, by presenting data to LLMs in their most understandable form.
npm install llmwhisperer-clientVerified import paths — ran on the pinned version, not inferred.
Initializes the LLMWhisperer client with optional configuration, demonstrating how to provide an API key and base URL, falling back to environment variables.
Migrate all client instantiations and API calls to use `LLMWhispererClientV2`. Review the `LLMWhispererClientV2` documentation for updated API signatures.
Ensure `LLMWHISPERER_API_KEY` is set in your environment or pass `{ apiKey: 'YOUR_API_KEY' }` to the client constructor.Review the official client documentation for `LLMWhispererClientV2` and update your application logic to conform to the new API. Explicitly use `LLMWhispererClientV2` for new integrations or when upgrading from older major versions.
Wrap API calls in `try-catch` blocks and specifically handle `LLMWhispererClientException` to manage API failures, network issues, or invalid responses gracefully.
Update your code to use `LLMWhispererClientV2`. Change `new LLMWhispererClient(...)` to `new LLMWhispererClientV2(...)`.
Provide the API key: `new LLMWhispererClientV2({ apiKey: 'YOUR_API_KEY' })` or set `LLMWHISPERER_API_KEY=YOUR_API_KEY` in your environment.Change the import statement to use ES module syntax: `import { LLMWhispererClientV2 } from 'llmwhisperer-client';`.No dependency data recorded yet.