@capgo/capacitor-llm 7.1.3 → 7.1.15
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.
|
@@ -149,7 +149,7 @@ public class LLMPlugin extends Plugin {
|
|
|
149
149
|
java.io.File filesDir = getContext().getFilesDir();
|
|
150
150
|
java.io.File modelFile = new java.io.File(filesDir, finalFilename);
|
|
151
151
|
|
|
152
|
-
downloadFile(url, modelFile, progress -> {
|
|
152
|
+
downloadFile(url, modelFile, (progress) -> {
|
|
153
153
|
JSObject event = new JSObject();
|
|
154
154
|
event.put("progress", progress);
|
|
155
155
|
notifyListeners("downloadProgress", event);
|
|
@@ -163,7 +163,7 @@ public class LLMPlugin extends Plugin {
|
|
|
163
163
|
String companionFilename = companionUrl.substring(companionUrl.lastIndexOf("/") + 1);
|
|
164
164
|
java.io.File companionFile = new java.io.File(filesDir, companionFilename);
|
|
165
165
|
|
|
166
|
-
downloadFile(companionUrl, companionFile, progress -> {
|
|
166
|
+
downloadFile(companionUrl, companionFile, (progress) -> {
|
|
167
167
|
JSObject event = new JSObject();
|
|
168
168
|
event.put("progress", progress);
|
|
169
169
|
notifyListeners("downloadProgress", event);
|
|
@@ -176,7 +176,8 @@ public class LLMPlugin extends Plugin {
|
|
|
176
176
|
} catch (Exception e) {
|
|
177
177
|
call.reject("Failed to download model", e.getMessage());
|
|
178
178
|
}
|
|
179
|
-
})
|
|
179
|
+
})
|
|
180
|
+
.start();
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
private void downloadFile(String urlString, java.io.File outputFile, ProgressCallback callback) throws Exception {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-llm",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.15",
|
|
4
4
|
"description": "Adds support for LLM locally runned for Capacitor",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/Cap-go/llm.git"
|
|
22
|
+
"url": "git+https://github.com/Cap-go/capacitor-llm.git"
|
|
23
23
|
},
|
|
24
24
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/Cap-go/llm/issues"
|
|
25
|
+
"url": "https://github.com/Cap-go/capacitor-llm/issues"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"capacitor",
|