You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You also need to install a resource fetcher for your setup (e.g. `react-native-executorch-expo-resource-fetcher` for Expo projects) and call `initExecutorch` in your app before using any ExecuTorch modules:
@@ -69,7 +66,8 @@ export class ExecuTorchEmbeddings implements Embeddings {
69
66
console.warn(
70
67
'This function will call a synchronous unload on the instance of TextEmbeddingsModule from React Native ExecuTorch. Awaiting this method will not guarantee completion. This may change in future versions to support async unload.'
71
68
);
72
-
this.module.delete();
69
+
this.module?.delete();
70
+
this.module=null;
73
71
this.isLoaded=false;
74
72
}
75
73
@@ -79,6 +77,9 @@ export class ExecuTorchEmbeddings implements Embeddings {
79
77
* @returns Promise that resolves to the embedding vector.
80
78
*/
81
79
asyncembed(text: string): Promise<number[]>{
80
+
if(!this.module){
81
+
thrownewError('TextEmbeddingsModule not loaded. Call load() first.');
@@ -96,7 +90,7 @@ export class ExecuTorchLLM implements LLM {
96
90
console.warn(
97
91
'This function will call a synchronous interrupt on the instance of LLMModule from React Native ExecuTorch. Awaiting this method will not guarantee completion. This may change in future versions to support async interrupt.'
98
92
);
99
-
this.module.interrupt();
93
+
this.module?.interrupt();
100
94
}
101
95
102
96
/**
@@ -108,7 +102,8 @@ export class ExecuTorchLLM implements LLM {
108
102
console.warn(
109
103
'This function will call a synchronous unload on the instance of LLMModule from React Native ExecuTorch. Awaiting this method will not guarantee completion. This may change in future versions to support async unload.'
110
104
);
111
-
this.module.delete();
105
+
this.module?.delete();
106
+
this.module=null;
112
107
this.isLoaded=false;
113
108
}
114
109
@@ -119,6 +114,9 @@ export class ExecuTorchLLM implements LLM {
119
114
* @returns Promise that resolves to the full generated string.
Copy file name to clipboardExpand all lines: packages/op-sqlite/README.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,12 +24,11 @@ To enable the required features for vector search, you must add the following co
24
24
25
25
```json
26
26
"op-sqlite": {
27
-
"libsql": true,
28
-
"sqliteVec": true
27
+
"libsql": true
29
28
}
30
29
```
31
30
32
-
This configuration ensures that the necessary `libsql`and `sqliteVec` extensions are enabled for `op-sqlite`.
31
+
This configuration ensures that the `libsql`extension is enabled for `op-sqlite`. Note that `libsql` already includes vector search capabilities, so `sqliteVec` is not needed.
0 commit comments