@sprucelabs/sprucebot-llm 15.1.5 → 15.1.6
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 +10 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -362,16 +362,21 @@ const skill = bots.Skill({
|
|
|
362
362
|
```
|
|
363
363
|
|
|
364
364
|
#### Callback invocation format
|
|
365
|
-
|
|
365
|
+
The model is instructed to invoke callbacks using the following syntax (V2 format):
|
|
366
366
|
|
|
367
367
|
```text
|
|
368
|
-
|
|
369
|
-
<<functionName>>{"param":"value"}<</functionName>>
|
|
368
|
+
@callback { "name": "callbackName", "options": {} }
|
|
370
369
|
```
|
|
371
370
|
|
|
372
|
-
|
|
371
|
+
Multiple callbacks can be included in a single response, one per line. JSON must be on a single line — do not use multi-line or formatted JSON.
|
|
373
372
|
|
|
374
|
-
|
|
373
|
+
As a shorthand, you can also invoke a named callback directly:
|
|
374
|
+
|
|
375
|
+
```text
|
|
376
|
+
@myCallback { "param": "value" }
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Callbacks can return either a `string` or an image message shaped like `{ imageBase64, imageDescription }` (see the "Sending images" section below).
|
|
375
380
|
|
|
376
381
|
Callback parameters can include basic types (e.g. `text`, `number`, `boolean`, `dateMs`, `dateTimeMs`) and `select` fields with choices from `@sprucelabs/schema`.
|
|
377
382
|
|