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
Copy file name to clipboardExpand all lines: docs/docs/03-hooks/01-natural-language-processing/useLLM.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ To configure model (i.e. change system prompt, load initial conversation history
192
192
193
193
-[`initialMessageHistory`](../../06-api-reference/interfaces/ChatConfig.md#initialmessagehistory) - Object that represent the conversation history. This can be used to provide initial context to the model.
194
194
195
-
-[`contextWindowLength`](../../06-api-reference/interfaces/ChatConfig.md#contextwindowlength) - The number of messages from the current conversation that the model will use to generate a response. Keep in mind that using larger context windows will result in longer inference time and higher memory usage.
195
+
-[`contextStrategy`](../../06-api-reference/interfaces/ChatConfig.md#contextstrategy) - Object implementing [`ContextStrategy`](../../06-api-reference/interfaces/ContextStrategy.md) interface used to manage conversation context, including trimming history if necessary. Custom strategies can be implemented or one of the built-in options can be used (e.g. [`NaiveContextStrategy`](../../06-api-reference/classes/NaiveContextStrategy.md), [`MessageCountContextStrategy`](../../06-api-reference/classes/MessageCountContextStrategy.md) or the default [`SlidingWindowContextStrategy`](../../06-api-reference/classes/SlidingWindowContextStrategy.md)).
196
196
197
197
-[`toolsConfig`](../../06-api-reference/interfaces/LLMConfig.md#toolsconfig) - Object configuring options for enabling and managing tool use. **It will only have effect if your model's chat template support it**. Contains following properties:
198
198
-[`tools`](../../06-api-reference/interfaces/ToolsConfig.md#tools) - List of objects defining tools.
Copy file name to clipboardExpand all lines: docs/docs/04-typescript-api/01-natural-language-processing/LLMModule.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ To configure model (i.e. change system prompt, load initial conversation history
96
96
97
97
-[`initialMessageHistory`](../../06-api-reference/interfaces/ChatConfig.md#initialmessagehistory) - Object that represent the conversation history. This can be used to provide initial context to the model.
98
98
99
-
-[`contextWindowLength`](../../06-api-reference/interfaces/ChatConfig.md#contextwindowlength) - The number of messages from the current conversation that the model will use to generate a response. Keep in mind that using larger context windows will result in longer inference time and higher memory usage.
99
+
-[`contextStrategy`](../../06-api-reference/interfaces/ChatConfig.md#contextstrategy) - Object implementing [`ContextStrategy`](../../06-api-reference/interfaces/ContextStrategy.md) interface used to manage conversation context, including trimming history if necessary. Custom strategies can be implemented or one of the built-in options can be used (e.g. [`NaiveContextStrategy`](../../06-api-reference/classes/NaiveContextStrategy.md), [`MessageCountContextStrategy`](../../06-api-reference/classes/MessageCountContextStrategy.md) or the default [`SlidingWindowContextStrategy`](../../06-api-reference/classes/SlidingWindowContextStrategy.md)).
100
100
101
101
-[`toolsConfig`](../../06-api-reference/interfaces/ToolsConfig.md) - Object configuring options for enabling and managing tool use. **It will only have effect if your model's chat template support it**. Contains following properties:
102
102
-[`tools`](../../06-api-reference/interfaces/ToolsConfig.md#tools) - List of objects defining tools.
Copy file name to clipboardExpand all lines: docs/docs/06-api-reference/classes/ClassificationModule.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Class: ClassificationModule
2
2
3
-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L12)
3
+
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L13)
4
4
5
5
Module for image classification tasks.
6
6
@@ -28,7 +28,7 @@ Module for image classification tasks.
28
28
29
29
> **nativeModule**: `any` = `null`
30
30
31
-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
31
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
32
32
33
33
Native module instance
34
34
@@ -42,7 +42,7 @@ Native module instance
42
42
43
43
> **delete**(): `void`
44
44
45
-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
45
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:43](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L43)
63
+
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L51)
64
64
65
65
Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string.
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
87
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
88
88
89
89
Runs the model's forward method with the given input tensors.
90
90
It returns the output tensors that mimic the structure of output from ExecuTorch.
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
116
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
117
117
118
118
Gets the input shape for a given method and index.
119
119
@@ -147,7 +147,7 @@ The input shape as an array of numbers.
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L20)
150
+
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L21)
151
151
152
152
Loads the model, where `modelSource` is a string that specifies the location of the model binary.
153
153
To track the download progress, supply a callback function `onDownloadProgressCallback`.
Copy file name to clipboardExpand all lines: docs/docs/06-api-reference/classes/ExecutorchModule.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Class: ExecutorchModule
2
2
3
-
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L13)
3
+
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L14)
4
4
5
5
General module for executing custom Executorch models.
6
6
@@ -28,7 +28,7 @@ General module for executing custom Executorch models.
28
28
29
29
> **nativeModule**: `any` = `null`
30
30
31
-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
31
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
32
32
33
33
Native module instance
34
34
@@ -42,7 +42,7 @@ Native module instance
42
42
43
43
> **delete**(): `void`
44
44
45
-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
45
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:45](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L45)
63
+
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L51)
64
64
65
65
Executes the model's forward pass, where input is an array of `TensorPtr` objects.
66
66
If the inference is successful, an array of tensor pointers is returned.
@@ -85,7 +85,7 @@ An array of output tensor pointers.
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
88
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
89
89
90
90
Runs the model's forward method with the given input tensors.
91
91
It returns the output tensors that mimic the structure of output from ExecuTorch.
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
117
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
118
118
119
119
Gets the input shape for a given method and index.
120
120
@@ -148,7 +148,7 @@ The input shape as an array of numbers.
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L21)
151
+
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L22)
152
152
153
153
Loads the model, where `modelSource` is a string, number, or object that specifies the location of the model binary.
Copy file name to clipboardExpand all lines: docs/docs/06-api-reference/classes/ImageEmbeddingsModule.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Class: ImageEmbeddingsModule
2
2
3
-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L12)
3
+
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L13)
4
4
5
5
Module for generating image embeddings from input images.
6
6
@@ -28,7 +28,7 @@ Module for generating image embeddings from input images.
28
28
29
29
> **nativeModule**: `any` = `null`
30
30
31
-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
31
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
32
32
33
33
Native module instance
34
34
@@ -42,7 +42,7 @@ Native module instance
42
42
43
43
> **delete**(): `void`
44
44
45
-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
45
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:42](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L42)
63
+
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:50](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L50)
64
64
65
65
Executes the model's forward pass. Returns an embedding array for a given sentence.
66
66
@@ -84,7 +84,7 @@ A Float32Array containing the image embeddings.
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
87
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
88
88
89
89
Runs the model's forward method with the given input tensors.
90
90
It returns the output tensors that mimic the structure of output from ExecuTorch.
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
116
+
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
117
117
118
118
Gets the input shape for a given method and index.
119
119
@@ -147,7 +147,7 @@ The input shape as an array of numbers.
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:19](https://github.com/software-mansion/react-native-executorch/blob/326d6344894d75625c600d5988666e215a32d466/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L19)
150
+
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/3acba46b6ae095fd7b0f269070ace822138c6f6a/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L20)
151
151
152
152
Loads the model, where `modelSource` is a string that specifies the location of the model binary.
0 commit comments