@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.
Files changed (2) hide show
  1. package/README.md +10 -5
  2. 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
- When using the `OpenAiAdapter`, the model is instructed to call callbacks using one of these formats:
365
+ The model is instructed to invoke callbacks using the following syntax (V2 format):
366
366
 
367
367
  ```text
368
- <<functionName/>>
369
- <<functionName>>{"param":"value"}<</functionName>>
368
+ @callback { "name": "callbackName", "options": {} }
370
369
  ```
371
370
 
372
- Only one callback invocation per model response is supported. Callbacks can return either a `string` or an image message shaped like `{ imageBase64, imageDescription }` (see the "Sending images" section below).
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
- Legacy placeholder format (`xxxxx callbackName xxxxx`) is still supported by the response parser for older prompt templates.
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
 
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "eta"
9
9
  ]
10
10
  },
11
- "version": "15.1.5",
11
+ "version": "15.1.6",
12
12
  "files": [
13
13
  "build"
14
14
  ],