llm-large-files 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +205 -0
- package/README.md +48 -8
- package/dist/anthropic/adapter.d.ts +106 -0
- package/dist/anthropic/adapter.d.ts.map +1 -0
- package/dist/anthropic/adapter.js +391 -0
- package/dist/anthropic/adapter.js.map +1 -0
- package/dist/anthropic/index.d.ts +3 -0
- package/dist/anthropic/index.d.ts.map +1 -0
- package/dist/anthropic/index.js +2 -0
- package/dist/anthropic/index.js.map +1 -0
- package/dist/ask.d.ts +144 -0
- package/dist/ask.d.ts.map +1 -0
- package/dist/ask.js +540 -0
- package/dist/ask.js.map +1 -0
- package/dist/budget.d.ts +23 -0
- package/dist/budget.d.ts.map +1 -0
- package/dist/budget.js +64 -0
- package/dist/budget.js.map +1 -0
- package/dist/cache.d.ts +11 -2
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +36 -7
- package/dist/cache.js.map +1 -1
- package/dist/errors.d.ts +21 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +44 -0
- package/dist/errors.js.map +1 -0
- package/dist/evidence.d.ts +40 -0
- package/dist/evidence.d.ts.map +1 -0
- package/dist/evidence.js +137 -0
- package/dist/evidence.js.map +1 -0
- package/dist/gemini/adapter.d.ts +50 -0
- package/dist/gemini/adapter.d.ts.map +1 -0
- package/dist/gemini/adapter.js +179 -0
- package/dist/gemini/adapter.js.map +1 -0
- package/dist/gemini/chat.d.ts +32 -71
- package/dist/gemini/chat.d.ts.map +1 -1
- package/dist/gemini/chat.js +38 -284
- package/dist/gemini/chat.js.map +1 -1
- package/dist/gemini/errors.d.ts +11 -0
- package/dist/gemini/errors.d.ts.map +1 -0
- package/dist/gemini/errors.js +14 -0
- package/dist/gemini/errors.js.map +1 -0
- package/dist/gemini/generate.d.ts +12 -13
- package/dist/gemini/generate.d.ts.map +1 -1
- package/dist/gemini/generate.js +62 -26
- package/dist/gemini/generate.js.map +1 -1
- package/dist/gemini/index.d.ts +3 -1
- package/dist/gemini/index.d.ts.map +1 -1
- package/dist/gemini/index.js +2 -1
- package/dist/gemini/index.js.map +1 -1
- package/dist/gemini/sse.d.ts +1 -2
- package/dist/gemini/sse.d.ts.map +1 -1
- package/dist/gemini/sse.js +1 -38
- package/dist/gemini/sse.js.map +1 -1
- package/dist/http.d.ts +20 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +55 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/library.d.ts +50 -5
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +56 -26
- package/dist/library.js.map +1 -1
- package/dist/map-reduce.d.ts +15 -0
- package/dist/map-reduce.d.ts.map +1 -1
- package/dist/map-reduce.js +58 -27
- package/dist/map-reduce.js.map +1 -1
- package/dist/model.d.ts +196 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +41 -0
- package/dist/model.js.map +1 -0
- package/dist/openai/adapter.d.ts +85 -0
- package/dist/openai/adapter.d.ts.map +1 -0
- package/dist/openai/adapter.js +293 -0
- package/dist/openai/adapter.js.map +1 -0
- package/dist/openai/index.d.ts +3 -0
- package/dist/openai/index.d.ts.map +1 -0
- package/dist/openai/index.js +2 -0
- package/dist/openai/index.js.map +1 -0
- package/dist/output-limit.d.ts +30 -0
- package/dist/output-limit.d.ts.map +1 -0
- package/dist/output-limit.js +92 -0
- package/dist/output-limit.js.map +1 -0
- package/dist/plan.d.ts +20 -4
- package/dist/plan.d.ts.map +1 -1
- package/dist/plan.js +44 -7
- package/dist/plan.js.map +1 -1
- package/dist/ranged.d.ts +2 -2
- package/dist/ranged.d.ts.map +1 -1
- package/dist/ranged.js +11 -4
- package/dist/ranged.js.map +1 -1
- package/dist/retry.d.ts +54 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +111 -0
- package/dist/retry.js.map +1 -0
- package/dist/search.d.ts +16 -2
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +109 -26
- package/dist/search.js.map +1 -1
- package/dist/sse.d.ts +3 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +39 -0
- package/dist/sse.js.map +1 -0
- package/dist/stores.d.ts +5 -1
- package/dist/stores.d.ts.map +1 -1
- package/dist/stores.js +58 -15
- package/dist/stores.js.map +1 -1
- package/dist/text.d.ts +12 -1
- package/dist/text.d.ts.map +1 -1
- package/dist/text.js +43 -15
- package/dist/text.js.map +1 -1
- package/dist/tools.d.ts +23 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +115 -35
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +33 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/api.md +253 -28
- package/docs/configuration.md +89 -10
- package/docs/getting-started.md +69 -16
- package/docs/how-it-works.md +46 -4
- package/docs/security.md +36 -3
- package/package.json +21 -3
- package/src/anthropic/adapter.ts +454 -0
- package/src/anthropic/index.ts +2 -0
- package/src/ask.ts +675 -0
- package/src/budget.ts +71 -0
- package/src/cache.ts +32 -8
- package/src/errors.ts +42 -0
- package/src/evidence.ts +162 -0
- package/src/gemini/adapter.ts +218 -0
- package/src/gemini/chat.ts +62 -333
- package/src/gemini/errors.ts +15 -0
- package/src/gemini/generate.ts +72 -30
- package/src/gemini/index.ts +3 -1
- package/src/gemini/sse.ts +1 -34
- package/src/http.ts +59 -0
- package/src/index.ts +34 -4
- package/src/library.ts +102 -29
- package/src/map-reduce.ts +52 -23
- package/src/model.ts +200 -0
- package/src/openai/adapter.ts +345 -0
- package/src/openai/index.ts +2 -0
- package/src/output-limit.ts +99 -0
- package/src/plan.ts +46 -7
- package/src/ranged.ts +13 -6
- package/src/retry.ts +132 -0
- package/src/search.ts +116 -25
- package/src/sse.ts +34 -0
- package/src/stores.ts +51 -15
- package/src/text.ts +39 -12
- package/src/tools.ts +127 -38
- package/src/types.ts +29 -3
package/docs/getting-started.md
CHANGED
|
@@ -138,9 +138,15 @@ What `askGemini` does each turn:
|
|
|
138
138
|
3. Adds each document's text or card at the start of the first user message, where it stays for
|
|
139
139
|
the whole conversation (so follow-up questions reuse Gemini's prompt cache), and a short tool
|
|
140
140
|
guide to the system prompt.
|
|
141
|
-
4. Runs the tool loop if needed (up to `
|
|
141
|
+
4. Runs the tool loop if needed (up to `limits.toolTurns` requests, default 12). If the model keeps
|
|
142
142
|
searching, the last request is sent without tools so it has to answer. `result.answered` is
|
|
143
143
|
`false` in the rare case that there is still no answer (a blocked prompt, or an empty reply).
|
|
144
|
+
5. Sends a request again when the model was busy or could not be reached, keeps the request
|
|
145
|
+
inside the model's window as tool results add up, and returns what the question used
|
|
146
|
+
(`result.usage`) and what it read (`result.evidence`).
|
|
147
|
+
|
|
148
|
+
`askGemini` is `askWithFiles` with a Gemini model. Everything it does, it does for
|
|
149
|
+
[any other model](#with-another-model-askwithfiles) too.
|
|
144
150
|
|
|
145
151
|
**Vertex AI:**
|
|
146
152
|
|
|
@@ -212,27 +218,57 @@ Kept files take disk space until they expire, which is why this is off by defaul
|
|
|
212
218
|
costs and the measurements are in [Pictures in PDFs](configuration.md#pictures-in-pdfs), and what
|
|
213
219
|
to think about before turning it on in [Security](security.md#original-files).
|
|
214
220
|
|
|
215
|
-
### With another model:
|
|
221
|
+
### With another model: `askWithFiles`
|
|
222
|
+
|
|
223
|
+
The loop is not Gemini's. `askWithFiles` takes the model as an adapter, and two adapters come with
|
|
224
|
+
the package next to Gemini's:
|
|
225
|
+
|
|
226
|
+
```ts
|
|
227
|
+
import { askWithFiles, DocumentsNotFoundError, ModelRequestError } from "llm-large-files";
|
|
228
|
+
import { openAiCompatible } from "llm-large-files/openai";
|
|
229
|
+
import { anthropic } from "llm-large-files/anthropic";
|
|
230
|
+
|
|
231
|
+
// Any Chat Completions endpoint: OpenAI, Azure OpenAI, DeepSeek, LiteLLM, vLLM, Ollama, OpenRouter.
|
|
232
|
+
const model = openAiCompatible({
|
|
233
|
+
baseUrl: "https://api.deepseek.com/v1",
|
|
234
|
+
apiKey: process.env.DEEPSEEK_API_KEY!,
|
|
235
|
+
model: "deepseek-v4-pro",
|
|
236
|
+
contextTokens: 1_000_000, // the budget of a question follows it
|
|
237
|
+
body: { temperature: 0.3 },
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
// Or Claude:
|
|
241
|
+
const claude = anthropic({ apiKey: process.env.ANTHROPIC_API_KEY!, model: "claude-opus-5-5", fallbacks: "default" });
|
|
242
|
+
|
|
243
|
+
const result = await askWithFiles({
|
|
244
|
+
files, model, documentIds, messages,
|
|
245
|
+
owner: req.user?.id,
|
|
246
|
+
system: "You are our support assistant.",
|
|
247
|
+
signal: abort.signal,
|
|
248
|
+
onText: (text) => send("text", text),
|
|
249
|
+
onActivity: (text) => send("activity", text),
|
|
250
|
+
onStep: (text) => send("step", text),
|
|
251
|
+
});
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
`messages` are `{ role: "user" | "assistant", text }`. A turn that holds more than text takes
|
|
255
|
+
parts, with anything but text in the provider's own form:
|
|
256
|
+
`{ role: "user", parts: [{ text: "What is in this picture?" }, { native: { type: "image_url", image_url: { url } } }] }`.
|
|
216
257
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
(`{ name, description, input_schema: parameters }`) also accept.
|
|
258
|
+
**Two models, of two providers.** `explorer` is a second adapter. It makes the tool calls and
|
|
259
|
+
reads whole files in parts, and `model` writes the answer from what the tools returned:
|
|
220
260
|
|
|
221
261
|
```ts
|
|
222
|
-
|
|
223
|
-
// 1. Add prepared.blocks.get(id) for each document to the user's message.
|
|
224
|
-
// 2. Add prepared.instruction to the system prompt.
|
|
225
|
-
// 3. If prepared.plan.searchable is not empty, give the model tools:
|
|
226
|
-
const tools = files.tools(prepared.plan.searchable, { generate: myTextCompletion /* optional: enables analyze-all */ });
|
|
227
|
-
// tools.declarations → your SDK's tool format
|
|
228
|
-
// for each tool call: const result = await tools.execute(call.name, call.args)
|
|
229
|
-
// return result to the model; repeat until it answers.
|
|
262
|
+
await askWithFiles({ files, model: claude, explorer: model, documentIds, messages });
|
|
230
263
|
```
|
|
231
264
|
|
|
232
|
-
|
|
233
|
-
|
|
265
|
+
**Errors.** A model's HTTP error is a `ModelRequestError` with a `status` (0 when the model could
|
|
266
|
+
not be reached). It reaches you after the request was tried again, when another try could have
|
|
267
|
+
helped.
|
|
234
268
|
|
|
235
|
-
|
|
269
|
+
**A model without an adapter** needs one object with a `send` method:
|
|
270
|
+
[your own adapter](api.md#your-own-adapter). `files.prepare()` and `files.tools()` are still there
|
|
271
|
+
for a loop that is all your own; `view_pages` in such a loop is described in
|
|
236
272
|
[Your own loop](configuration.md#your-own-loop).
|
|
237
273
|
|
|
238
274
|
## Keeping the conversation working
|
|
@@ -241,7 +277,24 @@ To offer `view_pages` in your own loop, it has to send a file to the model with
|
|
|
241
277
|
because the history grows. Stateful APIs that keep history server-side (such as Gemini
|
|
242
278
|
Interactions with `previous_interaction_id`) don't mix with per-turn planning.
|
|
243
279
|
- Keep the document IDs with the conversation, not with one message. Pass all of them on every turn.
|
|
280
|
+
- Keep **what a question read** with the conversation too. `result.toolTurns` is plain JSON: store
|
|
281
|
+
it between the question and its answer, and pass it back in `messages` in that place. The model
|
|
282
|
+
then sees its earlier searches and reads, and a follow-up question often needs no new one. In a
|
|
283
|
+
live check a follow-up took one request instead of three.
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
const messages = history.flatMap((turn) => [
|
|
287
|
+
{ role: "user", text: turn.question }, ...turn.toolTurns, { role: "assistant", text: turn.answer },
|
|
288
|
+
]).concat({ role: "user", text: newQuestion });
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
If your history is Gemini `contents`, `geminiToolTurns(result.toolTurns)` gives the rounds in
|
|
292
|
+
that form.
|
|
293
|
+
- `result.evidence` lists, for each tool call, the document and the lines or pages the model was
|
|
294
|
+
shown. Store it with the answer if you want to show sources, or to check a citation later.
|
|
244
295
|
- Expired documents raise `DocumentsNotFoundError` (with `.ids`). Ask the user to attach them again.
|
|
296
|
+
A store that could not be read raises `DocumentStoreError` instead: the documents are still
|
|
297
|
+
there, so retry the request. With `ttlMs: Infinity` documents do not expire at all.
|
|
245
298
|
|
|
246
299
|
## Run the demo
|
|
247
300
|
|
package/docs/how-it-works.md
CHANGED
|
@@ -46,8 +46,10 @@ FATAL line listed on the card.
|
|
|
46
46
|
substring hits. No index to build, it works in any language, and "timeout" also matches
|
|
47
47
|
"timeouts". A passage containing the exact phrase gets a boost.
|
|
48
48
|
- `exact` and `regex`: matching lines with optional context. Regexes with nested quantifiers are
|
|
49
|
-
refused up front
|
|
50
|
-
|
|
49
|
+
refused up front. A regex scan runs in slices of 250 ms, with other work in between, under a
|
|
50
|
+
3-second limit that can interrupt a match in progress. A line that takes two whole slices
|
|
51
|
+
ends the search there, so a pattern that backtracks without end returns partial results in
|
|
52
|
+
under a second. The regex searches of one question share 6 seconds.
|
|
51
53
|
- **`read_document`**: numbered line ranges, trimmed to the result-size cap, with `next_start_line`
|
|
52
54
|
for paging.
|
|
53
55
|
- **`get_document_overview`**: the full outline and profile, the first and last lines, and how many
|
|
@@ -97,6 +99,10 @@ slide deck: little text, a picture on every page.
|
|
|
97
99
|
3. If the notes are still too large, merge them in batches (or pairs) for up to 8 rounds.
|
|
98
100
|
4. Write one answer from the notes, flagging contradictions and parts that couldn't be read.
|
|
99
101
|
|
|
102
|
+
A model that thinks counts its thoughts in the output limit. When a reply stops at the limit with
|
|
103
|
+
half of it or more spent on thoughts, or with nothing written, the Gemini helper asks once more
|
|
104
|
+
with 32,768 and starts there for the later parts.
|
|
105
|
+
|
|
100
106
|
Part notes are capped at 4,096 output tokens and the answer at 8,192. When either cap is reached,
|
|
101
107
|
the tool result says the answer is incomplete and points the model to exact search. That matters
|
|
102
108
|
for "list every…" tasks: in a live test with 1,200 matching lines, 492 came back, flagged as
|
|
@@ -106,7 +112,42 @@ tool: it reports `total_matching_lines`.
|
|
|
106
112
|
|
|
107
113
|
Jobs needing more than `maxMapChunks` parts are refused, with advice to narrow the question first.
|
|
108
114
|
|
|
109
|
-
## The
|
|
115
|
+
## The loop (`askWithFiles`)
|
|
116
|
+
|
|
117
|
+
One loop serves every model. A provider is an adapter that turns the loop's request into its own
|
|
118
|
+
and reads the reply back; everything else happens once, in the core:
|
|
119
|
+
|
|
120
|
+
- **Retries.** A request that failed with HTTP 408, 409, 429 or 5xx, or that got no answer, is sent
|
|
121
|
+
again after a wait that doubles, or after the wait the provider asks for. Not after text of the
|
|
122
|
+
reply was shown, and not after a refusal such as 400 or 401. The part reads of a whole-file read
|
|
123
|
+
follow the same rule.
|
|
124
|
+
- **Calls of one turn run together**, four at a time, and are answered in the order they were made.
|
|
125
|
+
Looks at pages run one after another, because each is given the room the one before it left.
|
|
126
|
+
Regex searches do too: they share the time of the tool set. At most eight calls of a turn run.
|
|
127
|
+
- **Room.** The loop counts the request as it grows. Each call gets the room that is left, old
|
|
128
|
+
results are shortened to stand-ins when it runs short, and a call that finds none ends the tools:
|
|
129
|
+
the next request is the answer. See [Room in the request](configuration.md#room-in-the-request).
|
|
130
|
+
- **One whole-file read** of each document for a question. A model that asks again, with the task
|
|
131
|
+
put another way, is told to use the answer it has.
|
|
132
|
+
- **Usage** is summed over every request, the part reads included, for each model.
|
|
133
|
+
- **Evidence** is read from the tool calls: for each, the document and the lines or pages shown.
|
|
134
|
+
- **A call that did not arrive whole** (arguments that are not JSON, or cut off at the output
|
|
135
|
+
limit) is answered with what was wrong, and not run.
|
|
136
|
+
- **The end.** When the turns or the room run out, or the model's last turn has no text, one more
|
|
137
|
+
request must be answered in text. For Gemini it declares no tools; for an OpenAI-compatible
|
|
138
|
+
endpoint and for Claude it keeps them and sets the tool choice to none.
|
|
139
|
+
|
|
140
|
+
What differs between providers is in the adapters:
|
|
141
|
+
|
|
142
|
+
| | Gemini | OpenAI-compatible | Claude |
|
|
143
|
+
|---|---|---|---|
|
|
144
|
+
| The model's turn goes back | unchanged: thought signatures | unchanged: `reasoning_content`, signatures | unchanged: thinking blocks |
|
|
145
|
+
| The request for the answer | no tools declared | `tool_choice: "none"`, tools kept | `tool_choice: none`, tools kept |
|
|
146
|
+
| Pages of `view_pages` | inside the function response | a `file` part after the results, opt-in | a document block in the tool result |
|
|
147
|
+
| Old results shortened for room | yes | yes | no: the conversation may only grow |
|
|
148
|
+
| Prompt cache | the provider's own | the provider's own | `cache_control` on each request |
|
|
149
|
+
|
|
150
|
+
## Gemini (`askGemini`, `gemini()`)
|
|
110
151
|
|
|
111
152
|
- Document text and cards go at the **start of the first user turn** and stay there as the
|
|
112
153
|
conversation grows. Gemini's prompt cache works on a matching prefix, so a follow-up question
|
|
@@ -130,7 +171,8 @@ Jobs needing more than `maxMapChunks` parts are refused, with advice to narrow t
|
|
|
130
171
|
responses, because Vertex AI refuses a turn in which anything follows one. Both forms work with
|
|
131
172
|
Gemini 3.5 on the Gemini API and on Vertex AI.
|
|
132
173
|
- Tool results, pages included, live inside one call of `askGemini`. They are not sent again with
|
|
133
|
-
the next question.
|
|
174
|
+
the next question unless you pass `result.toolTurns` back with the conversation. Pages are not
|
|
175
|
+
in those: a stored round says that they were shown.
|
|
134
176
|
|
|
135
177
|
### With an explorer model
|
|
136
178
|
|
package/docs/security.md
CHANGED
|
@@ -108,6 +108,39 @@ slow pattern. Two things bound the cost:
|
|
|
108
108
|
- Every regex scan runs under a 3-second limit enforced by Node's `vm` timeout, which interrupts a
|
|
109
109
|
match that is still backtracking. The search returns what it found with a note that it stopped
|
|
110
110
|
early.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
- The scan runs in slices of 250 ms, and other requests get a turn between two slices. A line
|
|
112
|
+
that takes two whole slices ends the search: `(a|a)+$` on a line it cannot get past costs
|
|
113
|
+
about 0.8 seconds, not 3.
|
|
114
|
+
- The regex searches of one tool set, which is one question in `askGemini`, share 6 seconds
|
|
115
|
+
(`regexBudgetMs`). Past that, a regex search is refused and the model is told to search
|
|
116
|
+
another way.
|
|
117
|
+
- `askGemini` runs at most 8 tool calls of one model turn (`maxToolCallsPerTurn`).
|
|
118
|
+
|
|
119
|
+
A slice is synchronous, so a slow pattern still holds the event loop for up to a quarter of a
|
|
120
|
+
second at a time, and twice that at the start of a search. If that matters for your latency, run
|
|
121
|
+
the document tools in a worker thread.
|
|
122
|
+
|
|
123
|
+
## What a question can cost
|
|
124
|
+
|
|
125
|
+
A file can ask a model to do expensive things, and a model can decide to on its own. These bound
|
|
126
|
+
one question, whatever the model:
|
|
127
|
+
|
|
128
|
+
- `limits.toolTurns` (12) chat requests, with at most `limits.callsPerTurn` (8) tool calls run in
|
|
129
|
+
each.
|
|
130
|
+
- One whole-file read of each document (`limits.wholeDocumentReads`). A read is up to
|
|
131
|
+
`maxMapChunks` requests of up to `mapChunkTokens` each: 3M input tokens with the defaults. In a
|
|
132
|
+
probe a model asked for the same file to be read whole six times in one question.
|
|
133
|
+
- `limits.inputTokens` and `limits.requests`, unset by default, are ceilings for the whole
|
|
134
|
+
question, part reads included. Set them if a question must not pass a cost.
|
|
135
|
+
- The request is kept inside the model's window ([Room in the request](configuration.md#room-in-the-request)),
|
|
136
|
+
so a turn of many large reads cannot build a request that the model refuses.
|
|
137
|
+
|
|
138
|
+
`result.usage` is what the question used: every request that was answered, for each model. Log it
|
|
139
|
+
per user to see who spends what.
|
|
140
|
+
|
|
141
|
+
## Storage errors
|
|
142
|
+
|
|
143
|
+
A file-system error names the path it failed on, and a database error its host. Neither is shown
|
|
144
|
+
to a model or a user: a read of the store that fails becomes a `DocumentStoreError` whose message
|
|
145
|
+
holds the error code at most (`The document store could not be read (EACCES). Try again.`), and a
|
|
146
|
+
tool call answers with that message. The original error is its `cause`. Log that one.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-large-files",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Let an LLM answer questions about books, logs, and other files larger than its request limit or context window: upload, plan, search and read tools, map-reduce,
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Let an LLM answer questions about books, logs, and other files larger than its request limit or context window: upload, plan, search and read tools, map-reduce, a look at the pages of a PDF, and one tool loop for any model. Adapters for Gemini and Vertex AI, OpenAI-compatible endpoints, and Claude.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llm",
|
|
7
7
|
"gemini",
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
"logs",
|
|
16
16
|
"pdf",
|
|
17
17
|
"rag",
|
|
18
|
-
"chatbot"
|
|
18
|
+
"chatbot",
|
|
19
|
+
"openai",
|
|
20
|
+
"anthropic",
|
|
21
|
+
"claude",
|
|
22
|
+
"deepseek"
|
|
19
23
|
],
|
|
20
24
|
"license": "MIT",
|
|
21
25
|
"author": "renanbazinin",
|
|
@@ -43,6 +47,14 @@
|
|
|
43
47
|
"types": "./dist/gemini/index.d.ts",
|
|
44
48
|
"default": "./dist/gemini/index.js"
|
|
45
49
|
},
|
|
50
|
+
"./openai": {
|
|
51
|
+
"types": "./dist/openai/index.d.ts",
|
|
52
|
+
"default": "./dist/openai/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./anthropic": {
|
|
55
|
+
"types": "./dist/anthropic/index.d.ts",
|
|
56
|
+
"default": "./dist/anthropic/index.js"
|
|
57
|
+
},
|
|
46
58
|
"./node": {
|
|
47
59
|
"types": "./dist/node/index.d.ts",
|
|
48
60
|
"default": "./dist/node/index.js"
|
|
@@ -54,6 +66,12 @@
|
|
|
54
66
|
"gemini": [
|
|
55
67
|
"./dist/gemini/index.d.ts"
|
|
56
68
|
],
|
|
69
|
+
"openai": [
|
|
70
|
+
"./dist/openai/index.d.ts"
|
|
71
|
+
],
|
|
72
|
+
"anthropic": [
|
|
73
|
+
"./dist/anthropic/index.d.ts"
|
|
74
|
+
],
|
|
57
75
|
"node": [
|
|
58
76
|
"./dist/node/index.d.ts"
|
|
59
77
|
]
|