node-llama-cpp 3.8.0 → 3.9.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.
Files changed (70) hide show
  1. package/dist/bindings/AddonTypes.d.ts +4 -0
  2. package/dist/bindings/getLlama.js +1 -0
  3. package/dist/bindings/getLlama.js.map +1 -1
  4. package/dist/bindings/utils/getLlamaGpuTypes.js +6 -2
  5. package/dist/bindings/utils/getLlamaGpuTypes.js.map +1 -1
  6. package/dist/chatWrappers/generic/utils/extractSegmentSettingsFromTokenizerAndChatTemplate.js +2 -1
  7. package/dist/chatWrappers/generic/utils/extractSegmentSettingsFromTokenizerAndChatTemplate.js.map +1 -1
  8. package/dist/cli/commands/ChatCommand.d.ts +2 -0
  9. package/dist/cli/commands/ChatCommand.js +28 -5
  10. package/dist/cli/commands/ChatCommand.js.map +1 -1
  11. package/dist/cli/commands/CompleteCommand.d.ts +1 -0
  12. package/dist/cli/commands/CompleteCommand.js +13 -3
  13. package/dist/cli/commands/CompleteCommand.js.map +1 -1
  14. package/dist/cli/commands/DebugCommand.js +1 -0
  15. package/dist/cli/commands/DebugCommand.js.map +1 -1
  16. package/dist/cli/commands/InfillCommand.d.ts +1 -0
  17. package/dist/cli/commands/InfillCommand.js +13 -3
  18. package/dist/cli/commands/InfillCommand.js.map +1 -1
  19. package/dist/cli/commands/inspect/commands/InspectEstimateCommand.d.ts +1 -0
  20. package/dist/cli/commands/inspect/commands/InspectEstimateCommand.js +9 -2
  21. package/dist/cli/commands/inspect/commands/InspectEstimateCommand.js.map +1 -1
  22. package/dist/cli/commands/inspect/commands/InspectMeasureCommand.d.ts +1 -0
  23. package/dist/cli/commands/inspect/commands/InspectMeasureCommand.js +19 -6
  24. package/dist/cli/commands/inspect/commands/InspectMeasureCommand.js.map +1 -1
  25. package/dist/cli/recommendedModels.js +79 -0
  26. package/dist/cli/recommendedModels.js.map +1 -1
  27. package/dist/cli/utils/interactivelyAskForModel.d.ts +2 -1
  28. package/dist/cli/utils/interactivelyAskForModel.js +7 -4
  29. package/dist/cli/utils/interactivelyAskForModel.js.map +1 -1
  30. package/dist/cli/utils/resolveCommandGgufPath.d.ts +2 -1
  31. package/dist/cli/utils/resolveCommandGgufPath.js +2 -1
  32. package/dist/cli/utils/resolveCommandGgufPath.js.map +1 -1
  33. package/dist/evaluator/LlamaChat/LlamaChat.d.ts +17 -0
  34. package/dist/evaluator/LlamaChat/LlamaChat.js +85 -20
  35. package/dist/evaluator/LlamaChat/LlamaChat.js.map +1 -1
  36. package/dist/evaluator/LlamaChatSession/LlamaChatSession.d.ts +12 -1
  37. package/dist/evaluator/LlamaChatSession/LlamaChatSession.js +15 -5
  38. package/dist/evaluator/LlamaChatSession/LlamaChatSession.js.map +1 -1
  39. package/dist/evaluator/LlamaContext/LlamaContext.d.ts +22 -4
  40. package/dist/evaluator/LlamaContext/LlamaContext.js +53 -10
  41. package/dist/evaluator/LlamaContext/LlamaContext.js.map +1 -1
  42. package/dist/evaluator/LlamaContext/types.d.ts +15 -0
  43. package/dist/evaluator/LlamaModel/LlamaModel.d.ts +11 -0
  44. package/dist/evaluator/LlamaModel/LlamaModel.js +11 -2
  45. package/dist/evaluator/LlamaModel/LlamaModel.js.map +1 -1
  46. package/dist/gguf/insights/GgufInsights.d.ts +8 -1
  47. package/dist/gguf/insights/GgufInsights.js +118 -77
  48. package/dist/gguf/insights/GgufInsights.js.map +1 -1
  49. package/dist/gguf/insights/GgufInsightsConfigurationResolver.d.ts +8 -4
  50. package/dist/gguf/insights/GgufInsightsConfigurationResolver.js +12 -6
  51. package/dist/gguf/insights/GgufInsightsConfigurationResolver.js.map +1 -1
  52. package/dist/gguf/insights/utils/resolveContextContextSizeOption.d.ts +2 -1
  53. package/dist/gguf/insights/utils/resolveContextContextSizeOption.js +4 -1
  54. package/dist/gguf/insights/utils/resolveContextContextSizeOption.js.map +1 -1
  55. package/dist/gguf/insights/utils/resolveModelGpuLayersOption.d.ts +2 -1
  56. package/dist/gguf/insights/utils/resolveModelGpuLayersOption.js +13 -7
  57. package/dist/gguf/insights/utils/resolveModelGpuLayersOption.js.map +1 -1
  58. package/dist/gguf/types/GgufMetadataTypes.d.ts +2 -1
  59. package/dist/gguf/types/GgufMetadataTypes.js +1 -1
  60. package/dist/gguf/types/GgufMetadataTypes.js.map +1 -1
  61. package/dist/gguf/types/GgufTensorInfoTypes.d.ts +11 -1
  62. package/dist/gguf/types/GgufTensorInfoTypes.js +10 -0
  63. package/dist/gguf/types/GgufTensorInfoTypes.js.map +1 -1
  64. package/llama/addon/AddonContext.cpp +33 -0
  65. package/llama/addon/AddonContext.h +2 -0
  66. package/llama/addon/addon.cpp +14 -0
  67. package/llama/binariesGithubRelease.json +1 -1
  68. package/llama/gitRelease.bundle +0 -0
  69. package/llama/llama.cpp.info.json +1 -1
  70. package/package.json +14 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-llama-cpp",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "Run AI models locally on your machine with node.js bindings for llama.cpp. Enforce a JSON schema on the model output on the generation level",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -149,7 +149,7 @@
149
149
  "@types/bytes": "^3.1.5",
150
150
  "@types/cross-spawn": "^6.0.6",
151
151
  "@types/fs-extra": "^11.0.4",
152
- "@types/node": "^22.15.17",
152
+ "@types/node": "^20.17.50",
153
153
  "@types/proper-lockfile": "^4.1.4",
154
154
  "@types/semver": "^7.7.0",
155
155
  "@types/validate-npm-package-name": "^4.0.2",
@@ -178,6 +178,7 @@
178
178
  "typescript-eslint": "^8.32.0",
179
179
  "vite-node": "^3.1.3",
180
180
  "vitepress": "^1.6.3",
181
+ "vitepress-plugin-llms": "https://pkg.pr.new/vitepress-plugin-llms@51",
181
182
  "vitest": "^3.1.3",
182
183
  "zx": "^8.5.4"
183
184
  },
@@ -222,16 +223,16 @@
222
223
  }
223
224
  },
224
225
  "optionalDependencies": {
225
- "@node-llama-cpp/linux-arm64": "3.8.0",
226
- "@node-llama-cpp/linux-armv7l": "3.8.0",
227
- "@node-llama-cpp/linux-x64": "3.8.0",
228
- "@node-llama-cpp/linux-x64-cuda": "3.8.0",
229
- "@node-llama-cpp/linux-x64-vulkan": "3.8.0",
230
- "@node-llama-cpp/mac-arm64-metal": "3.8.0",
231
- "@node-llama-cpp/mac-x64": "3.8.0",
232
- "@node-llama-cpp/win-arm64": "3.8.0",
233
- "@node-llama-cpp/win-x64": "3.8.0",
234
- "@node-llama-cpp/win-x64-cuda": "3.8.0",
235
- "@node-llama-cpp/win-x64-vulkan": "3.8.0"
226
+ "@node-llama-cpp/linux-arm64": "3.9.0",
227
+ "@node-llama-cpp/linux-armv7l": "3.9.0",
228
+ "@node-llama-cpp/linux-x64": "3.9.0",
229
+ "@node-llama-cpp/linux-x64-cuda": "3.9.0",
230
+ "@node-llama-cpp/linux-x64-vulkan": "3.9.0",
231
+ "@node-llama-cpp/mac-arm64-metal": "3.9.0",
232
+ "@node-llama-cpp/mac-x64": "3.9.0",
233
+ "@node-llama-cpp/win-arm64": "3.9.0",
234
+ "@node-llama-cpp/win-x64": "3.9.0",
235
+ "@node-llama-cpp/win-x64-cuda": "3.9.0",
236
+ "@node-llama-cpp/win-x64-vulkan": "3.9.0"
236
237
  }
237
238
  }