node-llama-cpp 3.4.2 → 3.4.3

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.
@@ -50,6 +50,14 @@ if(APPLE)
50
50
  set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
51
51
  else()
52
52
  set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
53
+
54
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
55
+ set(CMAKE_SKIP_BUILD_RPATH FALSE)
56
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
57
+ set(CMAKE_BUILD_RPATH "$ORIGIN")
58
+ set(CMAKE_INSTALL_RPATH "$ORIGIN")
59
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
60
+ endif()
53
61
  endif()
54
62
 
55
63
  execute_process(COMMAND node -p "require('node-addon-api').include.slice(1,-1)"
@@ -17,7 +17,7 @@ AddonGrammar::AddonGrammar(const Napi::CallbackInfo& info) : Napi::ObjectWrap<Ad
17
17
  }
18
18
  }
19
19
 
20
- auto parsed_grammar = llama_grammar_init_impl(nullptr, grammarCode.c_str(), rootRuleName.c_str());
20
+ auto parsed_grammar = llama_grammar_init_impl(nullptr, grammarCode.c_str(), rootRuleName.c_str(), false, nullptr, 0, nullptr, 0);
21
21
 
22
22
  // will be empty if there are parse errors
23
23
  if (parsed_grammar == nullptr) {
@@ -37,7 +37,7 @@ AddonGrammar::~AddonGrammar() {
37
37
  Napi::Value AddonGrammar::isTextCompatible(const Napi::CallbackInfo& info) {
38
38
  const std::string testText = info[0].As<Napi::String>().Utf8Value();
39
39
 
40
- auto parsed_grammar = llama_grammar_init_impl(nullptr, grammarCode.c_str(), rootRuleName.c_str());
40
+ auto parsed_grammar = llama_grammar_init_impl(nullptr, grammarCode.c_str(), rootRuleName.c_str(), false, nullptr, 0, nullptr, 0);
41
41
 
42
42
  // will be empty if there are parse errors
43
43
  if (parsed_grammar == nullptr) {
@@ -1,3 +1,3 @@
1
1
  {
2
- "release": "b4567"
2
+ "release": "b4599"
3
3
  }
Binary file
@@ -1,4 +1,4 @@
1
1
  {
2
- "tag": "b4567",
2
+ "tag": "b4599",
3
3
  "llamaCppGithubRepo": "ggerganov/llama.cpp"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-llama-cpp",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
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",
@@ -219,16 +219,16 @@
219
219
  }
220
220
  },
221
221
  "optionalDependencies": {
222
- "@node-llama-cpp/linux-arm64": "3.4.2",
223
- "@node-llama-cpp/linux-armv7l": "3.4.2",
224
- "@node-llama-cpp/linux-x64": "3.4.2",
225
- "@node-llama-cpp/linux-x64-cuda": "3.4.2",
226
- "@node-llama-cpp/linux-x64-vulkan": "3.4.2",
227
- "@node-llama-cpp/mac-arm64-metal": "3.4.2",
228
- "@node-llama-cpp/mac-x64": "3.4.2",
229
- "@node-llama-cpp/win-arm64": "3.4.2",
230
- "@node-llama-cpp/win-x64": "3.4.2",
231
- "@node-llama-cpp/win-x64-cuda": "3.4.2",
232
- "@node-llama-cpp/win-x64-vulkan": "3.4.2"
222
+ "@node-llama-cpp/linux-arm64": "3.4.3",
223
+ "@node-llama-cpp/linux-armv7l": "3.4.3",
224
+ "@node-llama-cpp/linux-x64": "3.4.3",
225
+ "@node-llama-cpp/linux-x64-cuda": "3.4.3",
226
+ "@node-llama-cpp/linux-x64-vulkan": "3.4.3",
227
+ "@node-llama-cpp/mac-arm64-metal": "3.4.3",
228
+ "@node-llama-cpp/mac-x64": "3.4.3",
229
+ "@node-llama-cpp/win-arm64": "3.4.3",
230
+ "@node-llama-cpp/win-x64": "3.4.3",
231
+ "@node-llama-cpp/win-x64-cuda": "3.4.3",
232
+ "@node-llama-cpp/win-x64-vulkan": "3.4.3"
233
233
  }
234
234
  }