@charivo/llm 0.13.0 → 0.13.1
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 +11 -6
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -11,9 +11,7 @@ It wraps an `LLMClient` implementation from another package.
|
|
|
11
11
|
pnpm add @charivo/llm
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Requires Node.js 22 or newer
|
|
15
|
-
whose own `engines` field declares that floor, so it applies wherever
|
|
16
|
-
`@charivo/llm` is installed — not only when you import `@charivo/llm/openai`.
|
|
14
|
+
Requires Node.js 22 or newer, as declared in this package's `engines`.
|
|
17
15
|
|
|
18
16
|
## Usage
|
|
19
17
|
|
|
@@ -102,9 +100,16 @@ Tools are `ToolRegistration` values from `@charivo/core` — the same contract
|
|
|
102
100
|
validated against each definition's schema, and results are timed out
|
|
103
101
|
(`defaultToolTimeoutMs`, 10s default, overridable per tool via
|
|
104
102
|
`timeoutMs`) and asserted to be plain objects before a projector runs. Any
|
|
105
|
-
failure — unknown tool, invalid arguments, handler
|
|
106
|
-
result — becomes a `{ success: false, error }` tool
|
|
107
|
-
|
|
103
|
+
failure in *executing* a tool — unknown tool, invalid arguments, handler
|
|
104
|
+
throw/timeout, non-object result — becomes a `{ success: false, error }` tool
|
|
105
|
+
output so the reply continues instead of throwing.
|
|
106
|
+
|
|
107
|
+
A malformed tool call from the provider is a different matter: it never reaches
|
|
108
|
+
a handler. The shipped OpenAI-format providers raise `CharivoProviderError`
|
|
109
|
+
before the manager sees a tool when a call has no usable `id`, declares a
|
|
110
|
+
`type` other than `"function"` (a call omitting `type` is still accepted),
|
|
111
|
+
carries no `function.name`, or has `function.arguments` that are not a string
|
|
112
|
+
parsing to a JSON object.
|
|
108
113
|
|
|
109
114
|
### Tool Events
|
|
110
115
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charivo/llm",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "LLM manager and browser adapters for Charivo",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -52,6 +52,9 @@
|
|
|
52
52
|
"tsup": "^8.5.0",
|
|
53
53
|
"typescript": "^5.9.2"
|
|
54
54
|
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22.0.0"
|
|
57
|
+
},
|
|
55
58
|
"files": [
|
|
56
59
|
"dist",
|
|
57
60
|
"!dist/metafile-*.json"
|