llmist 2.2.0 → 2.3.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/README.md +54 -9
- package/dist/cli.cjs +11 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +11 -4
- package/dist/cli.js.map +1 -1
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -5,23 +5,68 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/llmist)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
> **
|
|
8
|
+
> **Tools execute while the LLM streams. Any model. Clean API.**
|
|
9
9
|
|
|
10
10
|
> **⚠️ EARLY WORK IN PROGRESS** - This library is under active development. APIs may change without notice. Use in production at your own risk.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Most LLM libraries buffer the entire response before parsing tool calls. **llmist parses incrementally.**
|
|
13
|
+
|
|
14
|
+
Your gadgets (tools) fire the instant they're complete in the stream—giving your users immediate feedback. llmist implements its own function calling mechanism via a simple text-based block format. No JSON mode required. No native tool support needed. Works with OpenAI, Anthropic, and Gemini out of the box—extensible to any provider.
|
|
15
|
+
|
|
16
|
+
A fluent, async-first API lets you plug into any part of the agent loop. Fully typed. Composable. Your code stays clean.
|
|
13
17
|
|
|
14
18
|
---
|
|
15
19
|
|
|
16
20
|
## 🎯 Why llmist?
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
<table>
|
|
23
|
+
<tr>
|
|
24
|
+
<td width="33%" valign="top">
|
|
25
|
+
|
|
26
|
+
### ⚡ Streaming Tool Execution
|
|
27
|
+
Gadgets execute the moment their block is parsed—not after the response completes. Real-time UX without buffering.
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// Tool fires mid-stream
|
|
31
|
+
for await (const event of agent.run()) {
|
|
32
|
+
if (event.type === 'gadget_result')
|
|
33
|
+
updateUI(event.result); // Immediate
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
</td>
|
|
38
|
+
<td width="33%" valign="top">
|
|
39
|
+
|
|
40
|
+
### 🧩 Built-in Function Calling
|
|
41
|
+
llmist implements its own tool calling via a simple block format. No `response_format: json`. No native tool support needed. Works with any model from supported providers.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
!!!GADGET_START[Calculator]
|
|
45
|
+
!!!ARG[operation] add
|
|
46
|
+
!!!ARG[a] 15
|
|
47
|
+
!!!ARG[b] 23
|
|
48
|
+
!!!GADGET_END
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
*Markers are fully [configurable](./docs/BLOCK_FORMAT.md).*
|
|
52
|
+
|
|
53
|
+
</td>
|
|
54
|
+
<td width="33%" valign="top">
|
|
55
|
+
|
|
56
|
+
### 🔌 Composable Agent API
|
|
57
|
+
Fluent builder, async iterators, full TypeScript inference. Hook into any lifecycle point. Your code stays readable.
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
const answer = await LLMist.createAgent()
|
|
61
|
+
.withModel('sonnet')
|
|
62
|
+
.withGadgets(Calculator, Weather)
|
|
63
|
+
.withHooks(HookPresets.monitoring())
|
|
64
|
+
.askAndCollect('What is 15 + 23?');
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</td>
|
|
68
|
+
</tr>
|
|
69
|
+
</table>
|
|
25
70
|
|
|
26
71
|
---
|
|
27
72
|
|
package/dist/cli.cjs
CHANGED
|
@@ -7045,8 +7045,8 @@ var import_commander2 = require("commander");
|
|
|
7045
7045
|
// package.json
|
|
7046
7046
|
var package_default = {
|
|
7047
7047
|
name: "llmist",
|
|
7048
|
-
version: "2.
|
|
7049
|
-
description: "
|
|
7048
|
+
version: "2.2.0",
|
|
7049
|
+
description: "TypeScript LLM client with streaming tool execution. Tools fire mid-stream. Built-in function calling works with any model\u2014no structured outputs or native tool support required.",
|
|
7050
7050
|
type: "module",
|
|
7051
7051
|
main: "dist/index.cjs",
|
|
7052
7052
|
module: "dist/index.js",
|
|
@@ -7120,9 +7120,16 @@ var package_default = {
|
|
|
7120
7120
|
"universal-client",
|
|
7121
7121
|
"multi-provider",
|
|
7122
7122
|
"hooks",
|
|
7123
|
-
"gadgets"
|
|
7123
|
+
"gadgets",
|
|
7124
|
+
"chatbot",
|
|
7125
|
+
"chatgpt",
|
|
7126
|
+
"agentic",
|
|
7127
|
+
"language-model",
|
|
7128
|
+
"generative-ai",
|
|
7129
|
+
"bun",
|
|
7130
|
+
"nodejs"
|
|
7124
7131
|
],
|
|
7125
|
-
author: "",
|
|
7132
|
+
author: "Zbigniew Sobiecki <zbigniew@sobiecki.name>",
|
|
7126
7133
|
license: "MIT",
|
|
7127
7134
|
dependencies: {
|
|
7128
7135
|
"@anthropic-ai/sdk": "^0.69.0",
|