@saltcorn/large-language-model 0.8.1 → 0.8.2

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/generate.js +1 -1
  2. package/package.json +1 -1
package/generate.js CHANGED
@@ -239,7 +239,7 @@ const getCompletionOpenAICompatible = async (
239
239
  ];
240
240
  } else {
241
241
  // not response api
242
- body.tools = body.tools.filter((t) => t.function);
242
+ if (body.tools) body.tools = body.tools.filter((t) => t.function);
243
243
  body.messages = [
244
244
  {
245
245
  role: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/large-language-model",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Large language models and functionality for Saltcorn",
5
5
  "main": "index.js",
6
6
  "dependencies": {