Registry / llm-agents / llmwhisperer-client

llmwhisperer-client

JSON →
library2.7.0jsnpmunverified

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-client
INSTALL
IMPORT
SIG · LLMWHISPERER-CLIEN
L
llmwhisperer-client
llm-agentsjavascriptv2.7.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LLMWhispererClientV2
import { LLMWhispererClientV2 } from 'llmwhisperer-client';
const { LLMWhispererClientV2 } = require('llmwhisperer-client');
While CommonJS `require` is shown in the README, modern JavaScript projects often prefer ES Modules. Both are supported in v2.x.
LLMWhispererClientException
import { LLMWhispererClientException } from 'llmwhisperer-client';
Used for handling errors specific to the LLMWhisperer client, providing structured error information.
LLMWhispererClientOptions
import type { LLMWhispererClientOptions } from 'llmwhisperer-client';
TypeScript type definition for the client configuration options, useful for strict type checking.

Initializes the LLMWhisperer client with optional configuration, demonstrating how to provide an API key and base URL, falling back to environment variables.

import { LLMWhispererClientV2 } from 'llmwhisperer-client'; // Configure the client. API key can be set via LLMWHISPERER_API_KEY env variable. const options = { apiKey: process.env.LLMWHISPERER_API_KEY ?? 'YOUR_SECRET_API_KEY', baseUrl: process.env.LLMWHISPERER_BASE_URL ?? 'https://api.llmwhisperer.com/v2', apiTimeout: 5000, // Timeout in milliseconds loggingLevel: 'info' // 'error', 'warn', 'info', 'debug' }; // Create a new client instance const client = new LLMWhispererClientV2(options); async function runWhisperExample() { try { // Replace with actual whisper options like document content, type, etc. // This is a placeholder as the README does not provide a full `whisper` example. // Example: const whisperResult = await client.whisper({ content: '...', type: 'pdf' }); console.log('Client initialized and ready to make API calls.'); console.log('You can now use methods like client.whisper(), client.whisperStatus(), etc.'); } catch (error) { console.error('An error occurred:', error.message); } } runWhisperExample();
Debug
Known issues
breakingAs of version `2.5.0`, the previously deprecated V1 client (e.g., `LLMWhispererClient` without the `V2` suffix) has been completely removed. Applications still relying on V1 client imports or methods will encounter runtime errors.
fix
Migrate all client instantiations and API calls to use `LLMWhispererClientV2`. Review the `LLMWhispererClientV2` documentation for updated API signatures.
affects: >=2.5.0
gotchaThe LLMWhisperer client requires an API key for authentication. If the `LLMWHISPERER_API_KEY` environment variable is not set, the `apiKey` property must be explicitly provided in the options object during `LLMWhispererClientV2` instantiation.
fix
Ensure `LLMWHISPERER_API_KEY` is set in your environment or pass `{ apiKey: 'YOUR_API_KEY' }` to the client constructor.
affects: >=2.0.0
breakingVersion `2.0.0` introduced `LLMWhispererClientV2`, signaling a major API revision. While specific breaking changes from a V1 client aren't detailed in the immediate changelog, the introduction of a new client class implies an incompatible API surface compared to any pre-2.0.0 client.
fix
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.
affects: >=2.0.0
gotchaErrors returned from the API or encountered internally by the client are typically wrapped in an `LLMWhispererClientException`. Neglecting to catch this specific exception type can lead to unhandled errors.
fix
Wrap API calls in `try-catch` blocks and specifically handle `LLMWhispererClientException` to manage API failures, network issues, or invalid responses gracefully.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: LLMWhispererClient is not a constructor
Attempting to instantiate the removed V1 client after upgrading to version `2.5.0` or higher.
fix
Update your code to use `LLMWhispererClientV2`. Change `new LLMWhispererClient(...)` to `new LLMWhispererClientV2(...)`.
Error: API key is missing or invalid.
The `apiKey` was not provided in the client options object, and the `LLMWHISPERER_API_KEY` environment variable is not set.
fix
Provide the API key: `new LLMWhispererClientV2({ apiKey: 'YOUR_API_KEY' })` or set `LLMWHISPERER_API_KEY=YOUR_API_KEY` in your environment.
ReferenceError: require is not defined in ES module scope
Using CommonJS `require()` syntax (`const { ... } = require(...)`) in an ES Module project (`"type": "module"` in `package.json`).
fix
Change the import statement to use ES module syntax: `import { LLMWhispererClientV2 } from 'llmwhisperer-client';`.
Upgrade
Version history
2.7.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources