Skip to content

Commit 5a24f71

Browse files
authored
Merge pull request #19 from Zipstack/feat/add-whisper-detail-api
feat: add whisperDetail method and remove deprecated V1 client
2 parents fcf291f + bbf2080 commit 5a24f71

4 files changed

Lines changed: 110 additions & 733 deletions

File tree

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,54 @@ The LLMWhisperer provides the following methods:
5454
- `whisper(options)`: Performs a whisper operation.
5555
- `whisperStatus(whisperHash)`: Retrieves the status of a whisper operation.
5656
- `whisperRetrieve(whisperHash)`: Retrieves the result of a whisper operation.
57+
- `whisperDetail(whisperHash)`: Retrieves metadata/details about a completed extraction job.
5758
- `highlightData(whisperHash, searchText)`: Highlights the specified text in the result of a whisper operation.
5859

60+
## Running Tests
61+
62+
### Environment Setup
63+
64+
Copy the sample environment file and fill in your API key:
65+
66+
```bash
67+
cp sample.env .env
68+
```
69+
70+
Then edit `.env` and set the required values:
71+
72+
```
73+
LLMWHISPERER_API_KEY=<your API key>
74+
LLMWHISPERER_BASE_URL_V2=https://llmwhisperer-api.us-central.unstract.com/api/v2
75+
LLMWHISPERER_LOGGING_LEVEL=DEBUG
76+
```
77+
78+
`LLMWHISPERER_API_KEY` is required for integration tests. The other variables are optional and have sensible defaults.
79+
80+
### Run All Tests
81+
82+
```bash
83+
npm install
84+
npm test
85+
```
86+
87+
### Run a Specific Test File
88+
89+
```bash
90+
npx jest --runInBand test/retry.test.js
91+
npx jest --runInBand test/test.js
92+
```
93+
94+
### Run a Specific Test by Name
95+
96+
```bash
97+
npx jest --runInBand -t "test name pattern"
98+
```
99+
100+
The test suite includes:
101+
102+
- **`test/test.js`** — Integration tests that call the live LLMWhisperer API (requires a valid `LLMWHISPERER_API_KEY`)
103+
- **`test/retry.test.js`** — Unit tests for retry behavior (mocked, no API key needed)
104+
59105
## Error Handling
60106

61107
Errors are handled by the LLMWhispererClientException class. This class extends the built-in Error class and adds a `statusCode` property.

0 commit comments

Comments
 (0)