diff --git a/.eslintrc.js b/.eslintrc.js index a9613d48e..85f4091b1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,30 @@ const path = require('path'); +const VALID_CATEGORIES = [ + 'Hooks', + 'Interfaces', + 'Models - Classification', + 'Models - Image Embeddings', + 'Models - Image Generation', + 'Models - LMM', + 'Models - Object Detection', + 'Models - Semantic Segmentation', + 'Models - Speech To Text', + 'Models - Style Transfer', + 'Models - Text Embeddings', + 'Models - Text to Speech', + 'Models - Voice Activity Detection', + 'OCR Supported Alphabets', + 'TTS Supported Voices', + 'Types', + 'Typescript API', + 'Utils', + 'Utilities - General', + 'Utilities - LLM', +]; + +const CATEGORY_TAG_MATCH = `^(${VALID_CATEGORIES.join('|')})$`; + module.exports = { parserOptions: { requireConfigFile: false, @@ -13,6 +38,7 @@ module.exports = { 'plugin:@cspell/recommended', 'plugin:prettier/recommended', 'plugin:markdown/recommended-legacy', + 'plugin:jsdoc/recommended-typescript', ], rules: { 'react/react-in-jsx-scope': 'off', @@ -33,8 +59,28 @@ module.exports = { }, ], 'camelcase': 'error', + 'jsdoc/require-jsdoc': 'off', + 'jsdoc/require-param': ['error', { checkDestructured: false }], + 'jsdoc/check-param-names': ['error', { checkDestructured: false }], + 'jsdoc/require-yields-type': 'off', + 'jsdoc/require-yields-description': 'warn', + 'jsdoc/check-tag-names': ['error', { definedTags: ['property'] }], + 'jsdoc/match-description': [ + 'error', + { + contexts: ['any'], + mainDescription: false, + tags: { + category: { + message: + '@category must be one of categories defined in .eslintrc.js', + match: CATEGORY_TAG_MATCH, + }, + }, + }, + ], }, - plugins: ['prettier', 'markdown'], + plugins: ['prettier', 'markdown', 'jsdoc'], overrides: [ { files: ['packages/react-native-executorch/src/**/*.{js,jsx,ts,tsx}'], @@ -58,4 +104,11 @@ module.exports = { }, ], ignorePatterns: ['node_modules/', 'lib/'], + settings: { + jsdoc: { + tagNamePreference: { + typeParam: 'typeParam', + }, + }, + }, }; diff --git a/apps/speech/screens/TextToSpeechScreen.tsx b/apps/speech/screens/TextToSpeechScreen.tsx index cd4e3a675..684714ad9 100644 --- a/apps/speech/screens/TextToSpeechScreen.tsx +++ b/apps/speech/screens/TextToSpeechScreen.tsx @@ -26,6 +26,7 @@ import SWMIcon from '../assets/swm_icon.svg'; /** * Converts an audio vector (Float32Array) to an AudioBuffer for playback * @param audioVector - The generated audio samples from the model + * @param audioContext - An optional AudioContext to create the buffer in. If not provided, a new one will be created. * @param sampleRate - The sample rate (default: 24000 Hz for Kokoro) * @returns AudioBuffer ready for playback */ diff --git a/docs/docs/06-api-reference/classes/ClassificationModule.md b/docs/docs/06-api-reference/classes/ClassificationModule.md index dadebddcd..03a71e121 100644 --- a/docs/docs/06-api-reference/classes/ClassificationModule.md +++ b/docs/docs/06-api-reference/classes/ClassificationModule.md @@ -1,6 +1,6 @@ # Class: ClassificationModule -Defined in: [modules/computer_vision/ClassificationModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L13) +Defined in: [modules/computer_vision/ClassificationModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L12) Module for image classification tasks. @@ -42,7 +42,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -60,7 +60,7 @@ Unloads the model from memory. > **forward**(`imageSource`): `Promise`\<\{\[`category`: `string`\]: `number`; \}\> -Defined in: [modules/computer_vision/ClassificationModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L51) +Defined in: [modules/computer_vision/ClassificationModule.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L48) Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. @@ -84,7 +84,7 @@ The classification result. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -113,7 +113,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -147,7 +147,7 @@ The input shape as an array of numbers. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/computer_vision/ClassificationModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L21) +Defined in: [modules/computer_vision/ClassificationModule.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L19) Loads the model, where `modelSource` is a string that specifies the location of the model binary. To track the download progress, supply a callback function `onDownloadProgressCallback`. diff --git a/docs/docs/06-api-reference/classes/ExecutorchModule.md b/docs/docs/06-api-reference/classes/ExecutorchModule.md index 8e45facf4..2e3ea671d 100644 --- a/docs/docs/06-api-reference/classes/ExecutorchModule.md +++ b/docs/docs/06-api-reference/classes/ExecutorchModule.md @@ -1,6 +1,6 @@ # Class: ExecutorchModule -Defined in: [modules/general/ExecutorchModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L14) +Defined in: [modules/general/ExecutorchModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L13) General module for executing custom Executorch models. @@ -42,7 +42,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -60,7 +60,7 @@ Unloads the model from memory. > **forward**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/general/ExecutorchModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L51) +Defined in: [modules/general/ExecutorchModule.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L48) Executes the model's forward pass, where input is an array of `TensorPtr` objects. If the inference is successful, an array of tensor pointers is returned. @@ -85,7 +85,7 @@ An array of output tensor pointers. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -114,7 +114,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -148,7 +148,7 @@ The input shape as an array of numbers. > **load**(`modelSource`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/general/ExecutorchModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L22) +Defined in: [modules/general/ExecutorchModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L20) Loads the model, where `modelSource` is a string, number, or object that specifies the location of the model binary. Optionally accepts a download progress callback. diff --git a/docs/docs/06-api-reference/classes/ImageEmbeddingsModule.md b/docs/docs/06-api-reference/classes/ImageEmbeddingsModule.md index f7787cd87..048dd0a54 100644 --- a/docs/docs/06-api-reference/classes/ImageEmbeddingsModule.md +++ b/docs/docs/06-api-reference/classes/ImageEmbeddingsModule.md @@ -1,6 +1,6 @@ # Class: ImageEmbeddingsModule -Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L13) +Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L12) Module for generating image embeddings from input images. @@ -42,7 +42,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -60,7 +60,7 @@ Unloads the model from memory. > **forward**(`imageSource`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L50) +Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L47) Executes the model's forward pass. Returns an embedding array for a given sentence. @@ -84,7 +84,7 @@ A Float32Array containing the image embeddings. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -113,7 +113,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -147,7 +147,7 @@ The input shape as an array of numbers. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L20) +Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L18) Loads the model, where `modelSource` is a string that specifies the location of the model binary. diff --git a/docs/docs/06-api-reference/classes/LLMModule.md b/docs/docs/06-api-reference/classes/LLMModule.md index 6f31a3db6..b1951b93d 100644 --- a/docs/docs/06-api-reference/classes/LLMModule.md +++ b/docs/docs/06-api-reference/classes/LLMModule.md @@ -1,6 +1,6 @@ # Class: LLMModule -Defined in: [modules/natural_language_processing/LLMModule.ts:10](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L10) +Defined in: [modules/natural_language_processing/LLMModule.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L9) Module for managing a Large Language Model (LLM) instance. @@ -10,7 +10,7 @@ Module for managing a Large Language Model (LLM) instance. > **new LLMModule**(`optionalCallbacks?`): `LLMModule` -Defined in: [modules/natural_language_processing/LLMModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L20) +Defined in: [modules/natural_language_processing/LLMModule.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L18) Creates a new instance of `LLMModule` with optional callbacks. @@ -45,7 +45,7 @@ A new LLMModule instance. > **configure**(`config`): `void` -Defined in: [modules/natural_language_processing/LLMModule.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L87) +Defined in: [modules/natural_language_processing/LLMModule.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L82) Configures chat and tool calling and generation settings. See [Configuring the model](https://docs.swmansion.com/react-native-executorch/docs/hooks/natural-language-processing/useLLM#configuring-the-model) for details. @@ -68,7 +68,7 @@ Configuration object containing `chatConfig`, `toolsConfig`, and `generationConf > **delete**(): `void` -Defined in: [modules/natural_language_processing/LLMModule.ts:184](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L184) +Defined in: [modules/natural_language_processing/LLMModule.ts:172](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L172) Method to delete the model from memory. Note you cannot delete model while it's generating. @@ -84,7 +84,7 @@ You need to interrupt it first and make sure model stopped generation. > **deleteMessage**(`index`): [`Message`](../interfaces/Message.md)[] -Defined in: [modules/natural_language_processing/LLMModule.ts:140](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L140) +Defined in: [modules/natural_language_processing/LLMModule.ts:131](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L131) Deletes all messages starting with message on `index` position. After deletion it will call `messageHistoryCallback()` containing new history. @@ -110,7 +110,7 @@ The index of the message to delete from history. > **forward**(`input`): `Promise`\<`string`\> -Defined in: [modules/natural_language_processing/LLMModule.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L104) +Defined in: [modules/natural_language_processing/LLMModule.ts:98](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L98) Runs model inference with raw input string. You need to provide entire conversation and prompt (in correct format and with special tokens!) in input string to this method. @@ -137,7 +137,7 @@ The generated response as a string. > **generate**(`messages`, `tools?`): `Promise`\<`string`\> -Defined in: [modules/natural_language_processing/LLMModule.ts:115](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L115) +Defined in: [modules/natural_language_processing/LLMModule.ts:108](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L108) Runs model to complete chat passed in `messages` argument. It doesn't manage conversation context. @@ -167,7 +167,7 @@ The generated response as a string. > **getGeneratedTokenCount**(): `number` -Defined in: [modules/natural_language_processing/LLMModule.ts:157](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L157) +Defined in: [modules/natural_language_processing/LLMModule.ts:147](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L147) Returns the number of tokens generated in the last response. @@ -183,7 +183,7 @@ The count of generated tokens. > **getPromptTokensCount**(): `number` -Defined in: [modules/natural_language_processing/LLMModule.ts:166](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L166) +Defined in: [modules/natural_language_processing/LLMModule.ts:155](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L155) Returns the number of prompt tokens in the last message. @@ -199,7 +199,7 @@ The count of prompt token. > **getTotalTokensCount**(): `number` -Defined in: [modules/natural_language_processing/LLMModule.ts:175](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L175) +Defined in: [modules/natural_language_processing/LLMModule.ts:163](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L163) Returns the number of total tokens from the previous generation. This is a sum of prompt tokens and generated tokens. @@ -215,7 +215,7 @@ The count of prompt and generated tokens. > **interrupt**(): `void` -Defined in: [modules/natural_language_processing/LLMModule.ts:148](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L148) +Defined in: [modules/natural_language_processing/LLMModule.ts:139](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L139) Interrupts model generation. It may return one more token after interrupt. @@ -229,7 +229,7 @@ Interrupts model generation. It may return one more token after interrupt. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/natural_language_processing/LLMModule.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L49) +Defined in: [modules/natural_language_processing/LLMModule.ts:46](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L46) Loads the LLM model and tokenizer. @@ -273,7 +273,7 @@ Optional callback to track download progress (value between 0 and 1). > **sendMessage**(`message`): `Promise`\<[`Message`](../interfaces/Message.md)[]\> -Defined in: [modules/natural_language_processing/LLMModule.ts:127](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L127) +Defined in: [modules/natural_language_processing/LLMModule.ts:119](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L119) Method to add user message to conversation. After model responds it will call `messageHistoryCallback()` containing both user message and model response. @@ -299,7 +299,7 @@ The message string to send. > **setTokenCallback**(`tokenCallback`): `void` -Defined in: [modules/natural_language_processing/LLMModule.ts:73](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L73) +Defined in: [modules/natural_language_processing/LLMModule.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts#L69) Sets new token callback invoked on every token batch. diff --git a/docs/docs/06-api-reference/classes/MessageCountContextStrategy.md b/docs/docs/06-api-reference/classes/MessageCountContextStrategy.md index 2fe677c5f..c424d1ee9 100644 --- a/docs/docs/06-api-reference/classes/MessageCountContextStrategy.md +++ b/docs/docs/06-api-reference/classes/MessageCountContextStrategy.md @@ -1,6 +1,6 @@ # Class: MessageCountContextStrategy -Defined in: [utils/llms/context_strategy/MessageCountContextStrategy.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts#L9) +Defined in: [utils/llms/context_strategy/MessageCountContextStrategy.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts#L8) A simple context strategy that retains a fixed number of the most recent messages. This strategy trims the conversation history based purely on the message count. @@ -15,12 +15,10 @@ This strategy trims the conversation history based purely on the message count. > **new MessageCountContextStrategy**(`windowLength?`): `MessageCountContextStrategy` -Defined in: [utils/llms/context_strategy/MessageCountContextStrategy.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts#L14) +Defined in: [utils/llms/context_strategy/MessageCountContextStrategy.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts#L13) Initializes the MessageCountContextStrategy. -- - #### Parameters ##### windowLength? @@ -39,7 +37,7 @@ The maximum number of recent messages to retain in the context. Defaults to 5. > **buildContext**(`systemPrompt`, `history`, `_maxContextLength`, `_getTokenCount`): [`Message`](../interfaces/Message.md)[] -Defined in: [utils/llms/context_strategy/MessageCountContextStrategy.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts#L25) +Defined in: [utils/llms/context_strategy/MessageCountContextStrategy.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts#L23) Builds the context by slicing the history to retain only the most recent `windowLength` messages. diff --git a/docs/docs/06-api-reference/classes/NoopContextStrategy.md b/docs/docs/06-api-reference/classes/NoopContextStrategy.md index 10183ecbc..4e793f266 100644 --- a/docs/docs/06-api-reference/classes/NoopContextStrategy.md +++ b/docs/docs/06-api-reference/classes/NoopContextStrategy.md @@ -1,11 +1,10 @@ # Class: NoopContextStrategy -Defined in: [utils/llms/context_strategy/NoopContextStrategy.ts:10](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts#L10) +Defined in: [utils/llms/context_strategy/NoopContextStrategy.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts#L9) A context strategy that performs no filtering or trimming of the message history. - -- This strategy is ideal when the developer wants to manually manage the conversation - context. +This strategy is ideal when the developer wants to manually manage the conversation +context. ## Implements @@ -27,7 +26,7 @@ A context strategy that performs no filtering or trimming of the message history > **buildContext**(`systemPrompt`, `history`, `_maxContextLength`, `_getTokenCount`): [`Message`](../interfaces/Message.md)[] -Defined in: [utils/llms/context_strategy/NoopContextStrategy.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts#L20) +Defined in: [utils/llms/context_strategy/NoopContextStrategy.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts#L18) Builds the context by prepending the system prompt to the entire unfiltered history. diff --git a/docs/docs/06-api-reference/classes/OCRModule.md b/docs/docs/06-api-reference/classes/OCRModule.md index a940f11f1..438d8c0e4 100644 --- a/docs/docs/06-api-reference/classes/OCRModule.md +++ b/docs/docs/06-api-reference/classes/OCRModule.md @@ -1,6 +1,6 @@ # Class: OCRModule -Defined in: [modules/computer_vision/OCRModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L12) +Defined in: [modules/computer_vision/OCRModule.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L11) Module for Optical Character Recognition (OCR) tasks. @@ -10,7 +10,7 @@ Module for Optical Character Recognition (OCR) tasks. > **new OCRModule**(): `OCRModule` -Defined in: [modules/computer_vision/OCRModule.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L15) +Defined in: [modules/computer_vision/OCRModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L14) #### Returns @@ -22,7 +22,7 @@ Defined in: [modules/computer_vision/OCRModule.ts:15](https://github.com/softwar > **delete**(): `void` -Defined in: [modules/computer_vision/OCRModule.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L62) +Defined in: [modules/computer_vision/OCRModule.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L59) Release the memory held by the module. Calling `forward` afterwards is invalid. Note that you cannot delete model while it's generating. @@ -37,7 +37,7 @@ Note that you cannot delete model while it's generating. > **forward**(`imageSource`): `Promise`\<[`OCRDetection`](../interfaces/OCRDetection.md)[]\> -Defined in: [modules/computer_vision/OCRModule.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L54) +Defined in: [modules/computer_vision/OCRModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L51) Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. @@ -61,7 +61,7 @@ The OCR result as a `OCRDetection[]`. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/computer_vision/OCRModule.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L27) +Defined in: [modules/computer_vision/OCRModule.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts#L25) Loads the model, where `detectorSource` is a string that specifies the location of the detector binary, `recognizerSource` is a string that specifies the location of the recognizer binary, diff --git a/docs/docs/06-api-reference/classes/ObjectDetectionModule.md b/docs/docs/06-api-reference/classes/ObjectDetectionModule.md index 662bad8ad..077a31a81 100644 --- a/docs/docs/06-api-reference/classes/ObjectDetectionModule.md +++ b/docs/docs/06-api-reference/classes/ObjectDetectionModule.md @@ -1,6 +1,6 @@ # Class: ObjectDetectionModule -Defined in: [modules/computer_vision/ObjectDetectionModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts#L14) +Defined in: [modules/computer_vision/ObjectDetectionModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts#L13) Module for object detection tasks. @@ -42,7 +42,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -60,7 +60,7 @@ Unloads the model from memory. > **forward**(`imageSource`, `detectionThreshold?`): `Promise`\<[`Detection`](../interfaces/Detection.md)[]\> -Defined in: [modules/computer_vision/ObjectDetectionModule.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts#L54) +Defined in: [modules/computer_vision/ObjectDetectionModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts#L51) Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. `detectionThreshold` can be supplied to alter the sensitivity of the detection. @@ -91,7 +91,7 @@ An array of Detection objects representing detected items in the image. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -120,7 +120,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -154,7 +154,7 @@ The input shape as an array of numbers. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/computer_vision/ObjectDetectionModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts#L22) +Defined in: [modules/computer_vision/ObjectDetectionModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts#L20) Loads the model, where `modelSource` is a string that specifies the location of the model binary. To track the download progress, supply a callback function `onDownloadProgressCallback`. diff --git a/docs/docs/06-api-reference/classes/ResourceFetcher.md b/docs/docs/06-api-reference/classes/ResourceFetcher.md index c0b896a29..c8fb0cfbf 100644 --- a/docs/docs/06-api-reference/classes/ResourceFetcher.md +++ b/docs/docs/06-api-reference/classes/ResourceFetcher.md @@ -1,6 +1,6 @@ # Class: ResourceFetcher -Defined in: [utils/ResourceFetcher.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L53) +Defined in: [utils/ResourceFetcher.ts:46](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L46) This module provides functions to download and work with downloaded files stored in the application's document directory inside the `react-native-executorch/` directory. These utilities can help you manage your storage and clean up the downloaded files when they are no longer needed. @@ -21,7 +21,7 @@ These utilities can help you manage your storage and clean up the downloaded fil > `static` **fs**: `object` -Defined in: [utils/ResourceFetcher.ts:128](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L128) +Defined in: [utils/ResourceFetcher.ts:114](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L114) Filesystem utilities for reading downloaded resources. @@ -60,7 +60,7 @@ Currently supports reading file contents as strings for configuration files. > `static` **fetch**(`callback?`, ...`sources`): `Promise`\<`string`[] \| `null`\> -Defined in: [utils/ResourceFetcher.ts:105](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L105) +Defined in: [utils/ResourceFetcher.ts:92](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L92) Fetches resources (remote URLs, local files or embedded assets), downloads or stores them locally for use by React Native ExecuTorch. @@ -91,7 +91,7 @@ If the fetch was interrupted, it returns a promise which resolves to `null`. > `static` **getAdapter**(): [`ResourceFetcherAdapter`](../interfaces/ResourceFetcherAdapter.md) -Defined in: [utils/ResourceFetcher.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L87) +Defined in: [utils/ResourceFetcher.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L75) Gets the current resource fetcher adapter instance. @@ -115,7 +115,7 @@ If no adapter has been set via [setAdapter](#setadapter). > `static` **resetAdapter**(): `void` -Defined in: [utils/ResourceFetcher.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L74) +Defined in: [utils/ResourceFetcher.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L64) Resets the resource fetcher adapter to null. @@ -133,7 +133,7 @@ Resets the resource fetcher adapter to null. > `static` **setAdapter**(`adapter`): `void` -Defined in: [utils/ResourceFetcher.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L64) +Defined in: [utils/ResourceFetcher.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L55) Sets a custom resource fetcher adapter for resource operations. diff --git a/docs/docs/06-api-reference/classes/SemanticSegmentationModule.md b/docs/docs/06-api-reference/classes/SemanticSegmentationModule.md index 861d86e08..2bb93a497 100644 --- a/docs/docs/06-api-reference/classes/SemanticSegmentationModule.md +++ b/docs/docs/06-api-reference/classes/SemanticSegmentationModule.md @@ -1,6 +1,6 @@ # Class: SemanticSegmentationModule\ -Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L81) +Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L77) Generic semantic segmentation module with type-safe label maps. Use a model name (e.g. `'deeplab-v3-resnet50'`) as the generic parameter for built-in models, @@ -44,7 +44,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -62,7 +62,7 @@ Unloads the model from memory. > **forward**\<`K`\>(`imageSource`, `classesOfInterest?`, `resizeToInput?`): `Promise`\<`Record`\<`"ARGMAX"`, `Int32Array`\<`ArrayBufferLike`\>\> & `Record`\<`K`, `Float32Array`\<`ArrayBufferLike`\>\>\> -Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:197](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L197) +Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:188](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L188) Executes the model's forward pass to perform semantic segmentation on the provided image. @@ -108,7 +108,7 @@ If the model is not loaded. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -137,7 +137,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -171,7 +171,7 @@ The input shape as an array of numbers. > **load**(): `Promise`\<`void`\> -Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:97](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L97) +Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L93) #### Returns @@ -187,7 +187,7 @@ Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:97](https://g > `static` **fromCustomConfig**\<`L`\>(`modelSource`, `config`, `onDownloadProgress?`): `Promise`\<`SemanticSegmentationModule`\<`L`\>\> -Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:163](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L163) +Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:155](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L155) Creates a segmentation instance with a user-provided label map and custom config. Use this when working with a custom-exported segmentation model that is not one of the built-in models. @@ -240,7 +240,7 @@ const segmentation = await SemanticSegmentationModule.fromCustomConfig( > `static` **fromModelName**\<`C`\>(`config`, `onDownloadProgress?`): `Promise`\<`SemanticSegmentationModule`\<[`ModelNameOf`](../type-aliases/ModelNameOf.md)\<`C`\>\>\> -Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:116](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L116) +Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:110](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L110) Creates a segmentation instance for a built-in model. The config object is discriminated by `modelName` — each model can require different fields. diff --git a/docs/docs/06-api-reference/classes/SlidingWindowContextStrategy.md b/docs/docs/06-api-reference/classes/SlidingWindowContextStrategy.md index 0614593f7..c92dbf338 100644 --- a/docs/docs/06-api-reference/classes/SlidingWindowContextStrategy.md +++ b/docs/docs/06-api-reference/classes/SlidingWindowContextStrategy.md @@ -1,13 +1,12 @@ # Class: SlidingWindowContextStrategy -Defined in: [utils/llms/context_strategy/SlidingWindowContextStrategy.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts#L12) +Defined in: [utils/llms/context_strategy/SlidingWindowContextStrategy.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts#L11) An advanced, token-aware context strategy that dynamically trims the message history to ensure it fits within the model's physical context limits. - -- This strategy calculates the exact token count of the formatted prompt. If the prompt - exceeds the allowed token budget (`maxContextLength` - `bufferTokens`), it recursively - removes the oldest messages. +This strategy calculates the exact token count of the formatted prompt. If the prompt +exceeds the allowed token budget (`maxContextLength` - `bufferTokens`), it recursively +removes the oldest messages. ## Implements @@ -19,7 +18,7 @@ to ensure it fits within the model's physical context limits. > **new SlidingWindowContextStrategy**(`bufferTokens`, `allowOrphanedAssistantMessages?`): `SlidingWindowContextStrategy` -Defined in: [utils/llms/context_strategy/SlidingWindowContextStrategy.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts#L19) +Defined in: [utils/llms/context_strategy/SlidingWindowContextStrategy.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts#L18) Initializes the SlidingWindowContextStrategy. @@ -48,7 +47,7 @@ If false, the strategy will ensure that an assistant message is not left without > **buildContext**(`systemPrompt`, `history`, `maxContextLength`, `getTokenCount`): [`Message`](../interfaces/Message.md)[] -Defined in: [utils/llms/context_strategy/SlidingWindowContextStrategy.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts#L34) +Defined in: [utils/llms/context_strategy/SlidingWindowContextStrategy.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts#L32) Builds the context by recursively evicting the oldest messages until the total token count is safely within the defined budget. diff --git a/docs/docs/06-api-reference/classes/SpeechToTextModule.md b/docs/docs/06-api-reference/classes/SpeechToTextModule.md index a54d795e4..0352ac703 100644 --- a/docs/docs/06-api-reference/classes/SpeechToTextModule.md +++ b/docs/docs/06-api-reference/classes/SpeechToTextModule.md @@ -1,6 +1,6 @@ # Class: SpeechToTextModule -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L16) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L15) Module for Speech to Text (STT) functionalities. @@ -20,7 +20,7 @@ Module for Speech to Text (STT) functionalities. > **decode**(`tokens`, `encoderOutput`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:91](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L91) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L87) Runs the decoder of the model. @@ -50,7 +50,7 @@ Decoded output. > **delete**(): `void` -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L69) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:67](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L67) Unloads the model from memory. @@ -64,7 +64,7 @@ Unloads the model from memory. > **encode**(`waveform`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L80) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L77) Runs the encoding part of the model on the provided waveform. Returns the encoded waveform as a Float32Array. @@ -89,7 +89,7 @@ The encoded output. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L27) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L25) Loads the model specified by the config object. `onDownloadProgressCallback` allows you to monitor the current progress of the model download. @@ -118,7 +118,7 @@ Optional callback to monitor download progress. > **stream**(`options?`): `AsyncGenerator`\<\{ `committed`: [`TranscriptionResult`](../interfaces/TranscriptionResult.md); `nonCommitted`: [`TranscriptionResult`](../interfaces/TranscriptionResult.md); \}\> -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:133](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L133) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:128](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L128) Starts a streaming transcription session. Yields objects with `committed` and `nonCommitted` transcriptions. @@ -142,13 +142,17 @@ Decoding options including language. An async generator yielding transcription updates. +#### Yields + +An object containing `committed` and `nonCommitted` transcription results. + --- ### streamInsert() > **streamInsert**(`waveform`): `void` -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:206](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L206) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:200](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L200) Inserts a new audio chunk into the streaming transcription session. @@ -170,7 +174,7 @@ The audio chunk to insert. > **streamStop**(): `void` -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:213](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L213) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:207](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L207) Stops the current streaming transcription session. @@ -184,7 +188,7 @@ Stops the current streaming transcription session. > **transcribe**(`waveform`, `options?`): `Promise`\<[`TranscriptionResult`](../interfaces/TranscriptionResult.md)\> -Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:109](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L109) +Defined in: [modules/natural_language_processing/SpeechToTextModule.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts#L104) Starts a transcription process for a given input array (16kHz waveform). For multilingual models, specify the language in `options`. diff --git a/docs/docs/06-api-reference/classes/StyleTransferModule.md b/docs/docs/06-api-reference/classes/StyleTransferModule.md index f65ba4802..ed73ca9a2 100644 --- a/docs/docs/06-api-reference/classes/StyleTransferModule.md +++ b/docs/docs/06-api-reference/classes/StyleTransferModule.md @@ -1,6 +1,6 @@ # Class: StyleTransferModule -Defined in: [modules/computer_vision/StyleTransferModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts#L13) +Defined in: [modules/computer_vision/StyleTransferModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts#L12) Module for style transfer tasks. @@ -42,7 +42,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -60,7 +60,7 @@ Unloads the model from memory. > **forward**(`imageSource`): `Promise`\<`string`\> -Defined in: [modules/computer_vision/StyleTransferModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts#L51) +Defined in: [modules/computer_vision/StyleTransferModule.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts#L48) Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. @@ -84,7 +84,7 @@ The stylized image as a Base64-encoded string. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -113,7 +113,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -147,7 +147,7 @@ The input shape as an array of numbers. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/computer_vision/StyleTransferModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts#L21) +Defined in: [modules/computer_vision/StyleTransferModule.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts#L19) Loads the model, where `modelSource` is a string that specifies the location of the model binary. To track the download progress, supply a callback function `onDownloadProgressCallback`. diff --git a/docs/docs/06-api-reference/classes/TextEmbeddingsModule.md b/docs/docs/06-api-reference/classes/TextEmbeddingsModule.md index 025c6c8e1..ee8d2be22 100644 --- a/docs/docs/06-api-reference/classes/TextEmbeddingsModule.md +++ b/docs/docs/06-api-reference/classes/TextEmbeddingsModule.md @@ -1,6 +1,6 @@ # Class: TextEmbeddingsModule -Defined in: [modules/natural_language_processing/TextEmbeddingsModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts#L13) +Defined in: [modules/natural_language_processing/TextEmbeddingsModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts#L12) Module for generating text embeddings from input text. @@ -42,7 +42,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -60,7 +60,7 @@ Unloads the model from memory. > **forward**(`input`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [modules/natural_language_processing/TextEmbeddingsModule.ts:60](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts#L60) +Defined in: [modules/natural_language_processing/TextEmbeddingsModule.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts#L57) Executes the model's forward pass, where `input` is a text that will be embedded. @@ -84,7 +84,7 @@ A Float32Array containing the vector embeddings. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -113,7 +113,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -147,7 +147,7 @@ The input shape as an array of numbers. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/natural_language_processing/TextEmbeddingsModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts#L22) +Defined in: [modules/natural_language_processing/TextEmbeddingsModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts#L20) Loads the model and tokenizer specified by the config object. diff --git a/docs/docs/06-api-reference/classes/TextToImageModule.md b/docs/docs/06-api-reference/classes/TextToImageModule.md index e2b057a73..d57b6ba2d 100644 --- a/docs/docs/06-api-reference/classes/TextToImageModule.md +++ b/docs/docs/06-api-reference/classes/TextToImageModule.md @@ -1,6 +1,6 @@ # Class: TextToImageModule -Defined in: [modules/computer_vision/TextToImageModule.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L15) +Defined in: [modules/computer_vision/TextToImageModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L14) Module for text-to-image generation tasks. @@ -14,7 +14,7 @@ Module for text-to-image generation tasks. > **new TextToImageModule**(`inferenceCallback?`): `TextToImageModule` -Defined in: [modules/computer_vision/TextToImageModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L23) +Defined in: [modules/computer_vision/TextToImageModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L21) Creates a new instance of `TextToImageModule` with optional callback on inference step. @@ -54,7 +54,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -72,7 +72,7 @@ Unloads the model from memory. > **forward**(`input`, `imageSize?`, `numSteps?`, `seed?`): `Promise`\<`string`\> -Defined in: [modules/computer_vision/TextToImageModule.ts:106](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L106) +Defined in: [modules/computer_vision/TextToImageModule.ts:102](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L102) Runs the model to generate an image described by `input`, and conditioned by `seed`, performing `numSteps` inference steps. The resulting image, with dimensions `imageSize`×`imageSize` pixels, is returned as a base64-encoded string. @@ -115,7 +115,7 @@ A Base64-encoded string representing the generated PNG image. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -144,7 +144,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -178,7 +178,7 @@ The input shape as an array of numbers. > **interrupt**(): `void` -Defined in: [modules/computer_vision/TextToImageModule.ts:133](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L133) +Defined in: [modules/computer_vision/TextToImageModule.ts:129](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L129) Interrupts model generation. The model is stopped in the nearest step. @@ -192,7 +192,7 @@ Interrupts model generation. The model is stopped in the nearest step. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/computer_vision/TextToImageModule.ts:36](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L36) +Defined in: [modules/computer_vision/TextToImageModule.ts:33](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts#L33) Loads the model from specified resources. diff --git a/docs/docs/06-api-reference/classes/TextToSpeechModule.md b/docs/docs/06-api-reference/classes/TextToSpeechModule.md index fcc6de752..4911710fa 100644 --- a/docs/docs/06-api-reference/classes/TextToSpeechModule.md +++ b/docs/docs/06-api-reference/classes/TextToSpeechModule.md @@ -1,6 +1,6 @@ # Class: TextToSpeechModule -Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:17](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L17) +Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L16) Module for Text to Speech (TTS) functionalities. @@ -20,7 +20,7 @@ Module for Text to Speech (TTS) functionalities. > **nativeModule**: `any` = `null` -Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L21) +Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L20) Native module instance @@ -30,7 +30,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:182](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L182) +Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:179](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L179) Unloads the model from memory. @@ -44,7 +44,7 @@ Unloads the model from memory. > **forward**(`text`, `speed?`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:109](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L109) +Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:106](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L106) Synthesizes the provided text into speech. Returns a promise that resolves to the full audio waveform as a `Float32Array`. @@ -75,7 +75,7 @@ A promise resolving to the synthesized audio waveform. > **load**(`config`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L30) +Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L28) Loads the model and voice assets specified by the config object. `onDownloadProgressCallback` allows you to monitor the current progress. @@ -104,7 +104,7 @@ Optional callback to monitor download progress. > **stream**(`input`): `AsyncGenerator`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:127](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L127) +Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:124](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L124) Starts a streaming synthesis session. Yields audio chunks as they are generated. @@ -122,13 +122,17 @@ Input object containing text and optional speed. An async generator yielding Float32Array audio chunks. +#### Yields + +An audio chunk generated during synthesis. + --- ### streamStop() > **streamStop**(): `void` -Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:175](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L175) +Defined in: [modules/natural_language_processing/TextToSpeechModule.ts:172](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts#L172) Stops the streaming process if there is any ongoing. diff --git a/docs/docs/06-api-reference/classes/TokenizerModule.md b/docs/docs/06-api-reference/classes/TokenizerModule.md index b64dde8fe..d1ad41b29 100644 --- a/docs/docs/06-api-reference/classes/TokenizerModule.md +++ b/docs/docs/06-api-reference/classes/TokenizerModule.md @@ -1,6 +1,6 @@ # Class: TokenizerModule -Defined in: [modules/natural_language_processing/TokenizerModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L12) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L11) Module for Tokenizer functionalities. @@ -20,7 +20,7 @@ Module for Tokenizer functionalities. > **nativeModule**: `any` -Defined in: [modules/natural_language_processing/TokenizerModule.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L16) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L15) Native module instance @@ -30,7 +30,7 @@ Native module instance > **decode**(`tokens`, `skipSpecialTokens?`): `Promise`\<`string`\> -Defined in: [modules/natural_language_processing/TokenizerModule.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L65) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:61](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L61) Converts an array of token IDs into a string. @@ -60,7 +60,7 @@ The decoded string. > **encode**(`input`): `Promise`\<`number`[]\> -Defined in: [modules/natural_language_processing/TokenizerModule.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L54) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L51) Converts a string into an array of token IDs. @@ -84,7 +84,7 @@ An array of token IDs. > **getVocabSize**(): `Promise`\<`number`\> -Defined in: [modules/natural_language_processing/TokenizerModule.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L80) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L75) Returns the size of the tokenizer's vocabulary. @@ -100,7 +100,7 @@ The vocabulary size. > **idToToken**(`tokenId`): `Promise`\<`string`\> -Defined in: [modules/natural_language_processing/TokenizerModule.ts:90](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L90) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L84) Returns the token associated to the ID. @@ -124,7 +124,7 @@ The token string associated to ID. > **load**(`tokenizer`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/natural_language_processing/TokenizerModule.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L25) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L23) Loads the tokenizer from the specified source. `tokenizerSource` is a string that points to the location of the tokenizer JSON file. @@ -155,7 +155,7 @@ Optional callback to monitor download progress. > **tokenToId**(`token`): `Promise`\<`number`\> -Defined in: [modules/natural_language_processing/TokenizerModule.ts:100](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L100) +Defined in: [modules/natural_language_processing/TokenizerModule.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts#L93) Returns the ID associated to the token. diff --git a/docs/docs/06-api-reference/classes/VADModule.md b/docs/docs/06-api-reference/classes/VADModule.md index c7d1cc136..de8640044 100644 --- a/docs/docs/06-api-reference/classes/VADModule.md +++ b/docs/docs/06-api-reference/classes/VADModule.md @@ -1,6 +1,6 @@ # Class: VADModule -Defined in: [modules/natural_language_processing/VADModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts#L14) +Defined in: [modules/natural_language_processing/VADModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts#L13) Module for Voice Activity Detection (VAD) functionalities. @@ -42,7 +42,7 @@ Native module instance > **delete**(): `void` -Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41) +Defined in: [modules/BaseModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L39) Unloads the model from memory. @@ -60,7 +60,7 @@ Unloads the model from memory. > **forward**(`waveform`): `Promise`\<[`Segment`](../interfaces/Segment.md)[]\> -Defined in: [modules/natural_language_processing/VADModule.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts#L50) +Defined in: [modules/natural_language_processing/VADModule.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts#L47) Executes the model's forward pass, where `waveform` is a Float32Array representing the audio signal (16kHz). @@ -84,7 +84,7 @@ A promise resolving to an array of detected speech segments. > `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\> -Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23) +Defined in: [modules/BaseModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L22) Runs the model's forward method with the given input tensors. It returns the output tensors that mimic the structure of output from ExecuTorch. @@ -113,7 +113,7 @@ Array of output tensors. > **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\> -Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34) +Defined in: [modules/BaseModule.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L32) Gets the input shape for a given method and index. @@ -147,7 +147,7 @@ The input shape as an array of numbers. > **load**(`model`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/natural_language_processing/VADModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts#L22) +Defined in: [modules/natural_language_processing/VADModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts#L20) Loads the model, where `modelSource` is a string that specifies the location of the model binary. To track the download progress, supply a callback function `onDownloadProgressCallback`. diff --git a/docs/docs/06-api-reference/classes/VerticalOCRModule.md b/docs/docs/06-api-reference/classes/VerticalOCRModule.md index a01418a08..af9933e31 100644 --- a/docs/docs/06-api-reference/classes/VerticalOCRModule.md +++ b/docs/docs/06-api-reference/classes/VerticalOCRModule.md @@ -1,6 +1,6 @@ # Class: VerticalOCRModule -Defined in: [modules/computer_vision/VerticalOCRModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L12) +Defined in: [modules/computer_vision/VerticalOCRModule.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L11) Module for Vertical Optical Character Recognition (Vertical OCR) tasks. @@ -10,7 +10,7 @@ Module for Vertical Optical Character Recognition (Vertical OCR) tasks. > **new VerticalOCRModule**(): `VerticalOCRModule` -Defined in: [modules/computer_vision/VerticalOCRModule.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L15) +Defined in: [modules/computer_vision/VerticalOCRModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L14) #### Returns @@ -22,7 +22,7 @@ Defined in: [modules/computer_vision/VerticalOCRModule.ts:15](https://github.com > **delete**(): `void` -Defined in: [modules/computer_vision/VerticalOCRModule.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L65) +Defined in: [modules/computer_vision/VerticalOCRModule.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L62) Release the memory held by the module. Calling `forward` afterwards is invalid. Note that you cannot delete model while it's generating. @@ -37,7 +37,7 @@ Note that you cannot delete model while it's generating. > **forward**(`imageSource`): `Promise`\<[`OCRDetection`](../interfaces/OCRDetection.md)[]\> -Defined in: [modules/computer_vision/VerticalOCRModule.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L57) +Defined in: [modules/computer_vision/VerticalOCRModule.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L54) Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. @@ -61,7 +61,7 @@ The OCR result as a `OCRDetection[]`. > **load**(`model`, `independentCharacters`, `onDownloadProgressCallback?`): `Promise`\<`void`\> -Defined in: [modules/computer_vision/VerticalOCRModule.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L28) +Defined in: [modules/computer_vision/VerticalOCRModule.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts#L26) Loads the model, where `detectorSource` is a string that specifies the location of the detector binary, `recognizerSource` is a string that specifies the location of the recognizer binary, diff --git a/docs/docs/06-api-reference/enumerations/CocoLabel.md b/docs/docs/06-api-reference/enumerations/CocoLabel.md index b94e3e9c6..dd7673b26 100644 --- a/docs/docs/06-api-reference/enumerations/CocoLabel.md +++ b/docs/docs/06-api-reference/enumerations/CocoLabel.md @@ -1,6 +1,6 @@ # Enumeration: CocoLabel -Defined in: [types/objectDetection.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L39) +Defined in: [types/objectDetection.ts:36](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L36) COCO dataset class labels used for object detection. @@ -10,7 +10,7 @@ COCO dataset class labels used for object detection. > **AIRPLANE**: `5` -Defined in: [types/objectDetection.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L44) +Defined in: [types/objectDetection.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L41) --- @@ -18,7 +18,7 @@ Defined in: [types/objectDetection.ts:44](https://github.com/software-mansion/re > **APPLE**: `53` -Defined in: [types/objectDetection.ts:91](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L91) +Defined in: [types/objectDetection.ts:88](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L88) --- @@ -26,7 +26,7 @@ Defined in: [types/objectDetection.ts:91](https://github.com/software-mansion/re > **BACKPACK**: `27` -Defined in: [types/objectDetection.ts:66](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L66) +Defined in: [types/objectDetection.ts:63](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L63) --- @@ -34,7 +34,7 @@ Defined in: [types/objectDetection.ts:66](https://github.com/software-mansion/re > **BANANA**: `52` -Defined in: [types/objectDetection.ts:90](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L90) +Defined in: [types/objectDetection.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L87) --- @@ -42,7 +42,7 @@ Defined in: [types/objectDetection.ts:90](https://github.com/software-mansion/re > **BASEBALL**: `39` -Defined in: [types/objectDetection.ts:78](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L78) +Defined in: [types/objectDetection.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L75) --- @@ -50,7 +50,7 @@ Defined in: [types/objectDetection.ts:78](https://github.com/software-mansion/re > **BEAR**: `23` -Defined in: [types/objectDetection.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L62) +Defined in: [types/objectDetection.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L59) --- @@ -58,7 +58,7 @@ Defined in: [types/objectDetection.ts:62](https://github.com/software-mansion/re > **BED**: `65` -Defined in: [types/objectDetection.ts:103](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L103) +Defined in: [types/objectDetection.ts:100](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L100) --- @@ -66,7 +66,7 @@ Defined in: [types/objectDetection.ts:103](https://github.com/software-mansion/r > **BENCH**: `15` -Defined in: [types/objectDetection.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L54) +Defined in: [types/objectDetection.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L51) --- @@ -74,7 +74,7 @@ Defined in: [types/objectDetection.ts:54](https://github.com/software-mansion/re > **BICYCLE**: `2` -Defined in: [types/objectDetection.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L41) +Defined in: [types/objectDetection.ts:38](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L38) --- @@ -82,7 +82,7 @@ Defined in: [types/objectDetection.ts:41](https://github.com/software-mansion/re > **BIRD**: `16` -Defined in: [types/objectDetection.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L55) +Defined in: [types/objectDetection.ts:52](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L52) --- @@ -90,7 +90,7 @@ Defined in: [types/objectDetection.ts:55](https://github.com/software-mansion/re > **BLENDER**: `83` -Defined in: [types/objectDetection.ts:121](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L121) +Defined in: [types/objectDetection.ts:118](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L118) --- @@ -98,7 +98,7 @@ Defined in: [types/objectDetection.ts:121](https://github.com/software-mansion/r > **BOAT**: `9` -Defined in: [types/objectDetection.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L48) +Defined in: [types/objectDetection.ts:45](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L45) --- @@ -106,7 +106,7 @@ Defined in: [types/objectDetection.ts:48](https://github.com/software-mansion/re > **BOOK**: `84` -Defined in: [types/objectDetection.ts:122](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L122) +Defined in: [types/objectDetection.ts:119](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L119) --- @@ -114,7 +114,7 @@ Defined in: [types/objectDetection.ts:122](https://github.com/software-mansion/r > **BOTTLE**: `44` -Defined in: [types/objectDetection.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L82) +Defined in: [types/objectDetection.ts:79](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L79) --- @@ -122,7 +122,7 @@ Defined in: [types/objectDetection.ts:82](https://github.com/software-mansion/re > **BOWL**: `51` -Defined in: [types/objectDetection.ts:89](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L89) +Defined in: [types/objectDetection.ts:86](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L86) --- @@ -130,7 +130,7 @@ Defined in: [types/objectDetection.ts:89](https://github.com/software-mansion/re > **BROCCOLI**: `56` -Defined in: [types/objectDetection.ts:94](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L94) +Defined in: [types/objectDetection.ts:91](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L91) --- @@ -138,7 +138,7 @@ Defined in: [types/objectDetection.ts:94](https://github.com/software-mansion/re > **BUS**: `6` -Defined in: [types/objectDetection.ts:45](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L45) +Defined in: [types/objectDetection.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L42) --- @@ -146,7 +146,7 @@ Defined in: [types/objectDetection.ts:45](https://github.com/software-mansion/re > **CAKE**: `61` -Defined in: [types/objectDetection.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L99) +Defined in: [types/objectDetection.ts:96](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L96) --- @@ -154,7 +154,7 @@ Defined in: [types/objectDetection.ts:99](https://github.com/software-mansion/re > **CAR**: `3` -Defined in: [types/objectDetection.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L42) +Defined in: [types/objectDetection.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L39) --- @@ -162,7 +162,7 @@ Defined in: [types/objectDetection.ts:42](https://github.com/software-mansion/re > **CARROT**: `57` -Defined in: [types/objectDetection.ts:95](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L95) +Defined in: [types/objectDetection.ts:92](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L92) --- @@ -170,7 +170,7 @@ Defined in: [types/objectDetection.ts:95](https://github.com/software-mansion/re > **CAT**: `17` -Defined in: [types/objectDetection.ts:56](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L56) +Defined in: [types/objectDetection.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L53) --- @@ -178,7 +178,7 @@ Defined in: [types/objectDetection.ts:56](https://github.com/software-mansion/re > **CELL_PHONE**: `77` -Defined in: [types/objectDetection.ts:115](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L115) +Defined in: [types/objectDetection.ts:112](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L112) --- @@ -186,7 +186,7 @@ Defined in: [types/objectDetection.ts:115](https://github.com/software-mansion/r > **CHAIR**: `62` -Defined in: [types/objectDetection.ts:100](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L100) +Defined in: [types/objectDetection.ts:97](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L97) --- @@ -194,7 +194,7 @@ Defined in: [types/objectDetection.ts:100](https://github.com/software-mansion/r > **CLOCK**: `85` -Defined in: [types/objectDetection.ts:123](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L123) +Defined in: [types/objectDetection.ts:120](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L120) --- @@ -202,7 +202,7 @@ Defined in: [types/objectDetection.ts:123](https://github.com/software-mansion/r > **COUCH**: `63` -Defined in: [types/objectDetection.ts:101](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L101) +Defined in: [types/objectDetection.ts:98](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L98) --- @@ -210,7 +210,7 @@ Defined in: [types/objectDetection.ts:101](https://github.com/software-mansion/r > **COW**: `21` -Defined in: [types/objectDetection.ts:60](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L60) +Defined in: [types/objectDetection.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L57) --- @@ -218,7 +218,7 @@ Defined in: [types/objectDetection.ts:60](https://github.com/software-mansion/re > **CUP**: `47` -Defined in: [types/objectDetection.ts:85](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L85) +Defined in: [types/objectDetection.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L82) --- @@ -226,7 +226,7 @@ Defined in: [types/objectDetection.ts:85](https://github.com/software-mansion/re > **DESK**: `69` -Defined in: [types/objectDetection.ts:107](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L107) +Defined in: [types/objectDetection.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L104) --- @@ -234,7 +234,7 @@ Defined in: [types/objectDetection.ts:107](https://github.com/software-mansion/r > **DINING_TABLE**: `67` -Defined in: [types/objectDetection.ts:105](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L105) +Defined in: [types/objectDetection.ts:102](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L102) --- @@ -242,7 +242,7 @@ Defined in: [types/objectDetection.ts:105](https://github.com/software-mansion/r > **DOG**: `18` -Defined in: [types/objectDetection.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L57) +Defined in: [types/objectDetection.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L54) --- @@ -250,7 +250,7 @@ Defined in: [types/objectDetection.ts:57](https://github.com/software-mansion/re > **DONUT**: `60` -Defined in: [types/objectDetection.ts:98](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L98) +Defined in: [types/objectDetection.ts:95](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L95) --- @@ -258,7 +258,7 @@ Defined in: [types/objectDetection.ts:98](https://github.com/software-mansion/re > **DOOR**: `71` -Defined in: [types/objectDetection.ts:109](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L109) +Defined in: [types/objectDetection.ts:106](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L106) --- @@ -266,7 +266,7 @@ Defined in: [types/objectDetection.ts:109](https://github.com/software-mansion/r > **ELEPHANT**: `22` -Defined in: [types/objectDetection.ts:61](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L61) +Defined in: [types/objectDetection.ts:58](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L58) --- @@ -274,7 +274,7 @@ Defined in: [types/objectDetection.ts:61](https://github.com/software-mansion/re > **EYE**: `30` -Defined in: [types/objectDetection.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L69) +Defined in: [types/objectDetection.ts:66](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L66) --- @@ -282,7 +282,7 @@ Defined in: [types/objectDetection.ts:69](https://github.com/software-mansion/re > **FIRE_HYDRANT**: `11` -Defined in: [types/objectDetection.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L50) +Defined in: [types/objectDetection.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L47) --- @@ -290,7 +290,7 @@ Defined in: [types/objectDetection.ts:50](https://github.com/software-mansion/re > **FORK**: `48` -Defined in: [types/objectDetection.ts:86](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L86) +Defined in: [types/objectDetection.ts:83](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L83) --- @@ -298,7 +298,7 @@ Defined in: [types/objectDetection.ts:86](https://github.com/software-mansion/re > **FRISBEE**: `34` -Defined in: [types/objectDetection.ts:73](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L73) +Defined in: [types/objectDetection.ts:70](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L70) --- @@ -306,7 +306,7 @@ Defined in: [types/objectDetection.ts:73](https://github.com/software-mansion/re > **GIRAFFE**: `25` -Defined in: [types/objectDetection.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L64) +Defined in: [types/objectDetection.ts:61](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L61) --- @@ -314,7 +314,7 @@ Defined in: [types/objectDetection.ts:64](https://github.com/software-mansion/re > **HAIR_BRUSH**: `91` -Defined in: [types/objectDetection.ts:129](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L129) +Defined in: [types/objectDetection.ts:126](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L126) --- @@ -322,7 +322,7 @@ Defined in: [types/objectDetection.ts:129](https://github.com/software-mansion/r > **HAIR_DRIER**: `89` -Defined in: [types/objectDetection.ts:127](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L127) +Defined in: [types/objectDetection.ts:124](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L124) --- @@ -330,7 +330,7 @@ Defined in: [types/objectDetection.ts:127](https://github.com/software-mansion/r > **HANDBAG**: `31` -Defined in: [types/objectDetection.ts:70](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L70) +Defined in: [types/objectDetection.ts:67](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L67) --- @@ -338,7 +338,7 @@ Defined in: [types/objectDetection.ts:70](https://github.com/software-mansion/re > **HAT**: `26` -Defined in: [types/objectDetection.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L65) +Defined in: [types/objectDetection.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L62) --- @@ -346,7 +346,7 @@ Defined in: [types/objectDetection.ts:65](https://github.com/software-mansion/re > **HORSE**: `19` -Defined in: [types/objectDetection.ts:58](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L58) +Defined in: [types/objectDetection.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L55) --- @@ -354,7 +354,7 @@ Defined in: [types/objectDetection.ts:58](https://github.com/software-mansion/re > **HOT_DOG**: `58` -Defined in: [types/objectDetection.ts:96](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L96) +Defined in: [types/objectDetection.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L93) --- @@ -362,7 +362,7 @@ Defined in: [types/objectDetection.ts:96](https://github.com/software-mansion/re > **KEYBOARD**: `76` -Defined in: [types/objectDetection.ts:114](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L114) +Defined in: [types/objectDetection.ts:111](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L111) --- @@ -370,7 +370,7 @@ Defined in: [types/objectDetection.ts:114](https://github.com/software-mansion/r > **KITE**: `38` -Defined in: [types/objectDetection.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L77) +Defined in: [types/objectDetection.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L74) --- @@ -378,7 +378,7 @@ Defined in: [types/objectDetection.ts:77](https://github.com/software-mansion/re > **KNIFE**: `49` -Defined in: [types/objectDetection.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L87) +Defined in: [types/objectDetection.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L84) --- @@ -386,7 +386,7 @@ Defined in: [types/objectDetection.ts:87](https://github.com/software-mansion/re > **LAPTOP**: `73` -Defined in: [types/objectDetection.ts:111](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L111) +Defined in: [types/objectDetection.ts:108](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L108) --- @@ -394,7 +394,7 @@ Defined in: [types/objectDetection.ts:111](https://github.com/software-mansion/r > **MICROWAVE**: `78` -Defined in: [types/objectDetection.ts:116](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L116) +Defined in: [types/objectDetection.ts:113](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L113) --- @@ -402,7 +402,7 @@ Defined in: [types/objectDetection.ts:116](https://github.com/software-mansion/r > **MIRROR**: `66` -Defined in: [types/objectDetection.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L104) +Defined in: [types/objectDetection.ts:101](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L101) --- @@ -410,7 +410,7 @@ Defined in: [types/objectDetection.ts:104](https://github.com/software-mansion/r > **MOTORCYCLE**: `4` -Defined in: [types/objectDetection.ts:43](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L43) +Defined in: [types/objectDetection.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L40) --- @@ -418,7 +418,7 @@ Defined in: [types/objectDetection.ts:43](https://github.com/software-mansion/re > **MOUSE**: `74` -Defined in: [types/objectDetection.ts:112](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L112) +Defined in: [types/objectDetection.ts:109](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L109) --- @@ -426,7 +426,7 @@ Defined in: [types/objectDetection.ts:112](https://github.com/software-mansion/r > **ORANGE**: `55` -Defined in: [types/objectDetection.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L93) +Defined in: [types/objectDetection.ts:90](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L90) --- @@ -434,7 +434,7 @@ Defined in: [types/objectDetection.ts:93](https://github.com/software-mansion/re > **OVEN**: `79` -Defined in: [types/objectDetection.ts:117](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L117) +Defined in: [types/objectDetection.ts:114](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L114) --- @@ -442,7 +442,7 @@ Defined in: [types/objectDetection.ts:117](https://github.com/software-mansion/r > **PARKING**: `14` -Defined in: [types/objectDetection.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L53) +Defined in: [types/objectDetection.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L50) --- @@ -450,7 +450,7 @@ Defined in: [types/objectDetection.ts:53](https://github.com/software-mansion/re > **PERSON**: `1` -Defined in: [types/objectDetection.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L40) +Defined in: [types/objectDetection.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L37) --- @@ -458,7 +458,7 @@ Defined in: [types/objectDetection.ts:40](https://github.com/software-mansion/re > **PIZZA**: `59` -Defined in: [types/objectDetection.ts:97](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L97) +Defined in: [types/objectDetection.ts:94](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L94) --- @@ -466,7 +466,7 @@ Defined in: [types/objectDetection.ts:97](https://github.com/software-mansion/re > **PLATE**: `45` -Defined in: [types/objectDetection.ts:83](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L83) +Defined in: [types/objectDetection.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L80) --- @@ -474,7 +474,7 @@ Defined in: [types/objectDetection.ts:83](https://github.com/software-mansion/re > **POTTED_PLANT**: `64` -Defined in: [types/objectDetection.ts:102](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L102) +Defined in: [types/objectDetection.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L99) --- @@ -482,7 +482,7 @@ Defined in: [types/objectDetection.ts:102](https://github.com/software-mansion/r > **REFRIGERATOR**: `82` -Defined in: [types/objectDetection.ts:120](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L120) +Defined in: [types/objectDetection.ts:117](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L117) --- @@ -490,7 +490,7 @@ Defined in: [types/objectDetection.ts:120](https://github.com/software-mansion/r > **REMOTE**: `75` -Defined in: [types/objectDetection.ts:113](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L113) +Defined in: [types/objectDetection.ts:110](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L110) --- @@ -498,7 +498,7 @@ Defined in: [types/objectDetection.ts:113](https://github.com/software-mansion/r > **SANDWICH**: `54` -Defined in: [types/objectDetection.ts:92](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L92) +Defined in: [types/objectDetection.ts:89](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L89) --- @@ -506,7 +506,7 @@ Defined in: [types/objectDetection.ts:92](https://github.com/software-mansion/re > **SCISSORS**: `87` -Defined in: [types/objectDetection.ts:125](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L125) +Defined in: [types/objectDetection.ts:122](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L122) --- @@ -514,7 +514,7 @@ Defined in: [types/objectDetection.ts:125](https://github.com/software-mansion/r > **SHEEP**: `20` -Defined in: [types/objectDetection.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L59) +Defined in: [types/objectDetection.ts:56](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L56) --- @@ -522,7 +522,7 @@ Defined in: [types/objectDetection.ts:59](https://github.com/software-mansion/re > **SHOE**: `29` -Defined in: [types/objectDetection.ts:68](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L68) +Defined in: [types/objectDetection.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L65) --- @@ -530,7 +530,7 @@ Defined in: [types/objectDetection.ts:68](https://github.com/software-mansion/re > **SINK**: `81` -Defined in: [types/objectDetection.ts:119](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L119) +Defined in: [types/objectDetection.ts:116](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L116) --- @@ -538,7 +538,7 @@ Defined in: [types/objectDetection.ts:119](https://github.com/software-mansion/r > **SKATEBOARD**: `41` -Defined in: [types/objectDetection.ts:79](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L79) +Defined in: [types/objectDetection.ts:76](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L76) --- @@ -546,7 +546,7 @@ Defined in: [types/objectDetection.ts:79](https://github.com/software-mansion/re > **SKIS**: `35` -Defined in: [types/objectDetection.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L74) +Defined in: [types/objectDetection.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L71) --- @@ -554,7 +554,7 @@ Defined in: [types/objectDetection.ts:74](https://github.com/software-mansion/re > **SNOWBOARD**: `36` -Defined in: [types/objectDetection.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L75) +Defined in: [types/objectDetection.ts:72](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L72) --- @@ -562,7 +562,7 @@ Defined in: [types/objectDetection.ts:75](https://github.com/software-mansion/re > **SPOON**: `50` -Defined in: [types/objectDetection.ts:88](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L88) +Defined in: [types/objectDetection.ts:85](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L85) --- @@ -570,7 +570,7 @@ Defined in: [types/objectDetection.ts:88](https://github.com/software-mansion/re > **SPORTS**: `37` -Defined in: [types/objectDetection.ts:76](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L76) +Defined in: [types/objectDetection.ts:73](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L73) --- @@ -578,7 +578,7 @@ Defined in: [types/objectDetection.ts:76](https://github.com/software-mansion/re > **STOP_SIGN**: `13` -Defined in: [types/objectDetection.ts:52](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L52) +Defined in: [types/objectDetection.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L49) --- @@ -586,7 +586,7 @@ Defined in: [types/objectDetection.ts:52](https://github.com/software-mansion/re > **STREET_SIGN**: `12` -Defined in: [types/objectDetection.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L51) +Defined in: [types/objectDetection.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L48) --- @@ -594,7 +594,7 @@ Defined in: [types/objectDetection.ts:51](https://github.com/software-mansion/re > **SUITCASE**: `33` -Defined in: [types/objectDetection.ts:72](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L72) +Defined in: [types/objectDetection.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L69) --- @@ -602,7 +602,7 @@ Defined in: [types/objectDetection.ts:72](https://github.com/software-mansion/re > **SURFBOARD**: `42` -Defined in: [types/objectDetection.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L80) +Defined in: [types/objectDetection.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L77) --- @@ -610,7 +610,7 @@ Defined in: [types/objectDetection.ts:80](https://github.com/software-mansion/re > **TEDDY_BEAR**: `88` -Defined in: [types/objectDetection.ts:126](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L126) +Defined in: [types/objectDetection.ts:123](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L123) --- @@ -618,7 +618,7 @@ Defined in: [types/objectDetection.ts:126](https://github.com/software-mansion/r > **TENNIS_RACKET**: `43` -Defined in: [types/objectDetection.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L81) +Defined in: [types/objectDetection.ts:78](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L78) --- @@ -626,7 +626,7 @@ Defined in: [types/objectDetection.ts:81](https://github.com/software-mansion/re > **TIE**: `32` -Defined in: [types/objectDetection.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L71) +Defined in: [types/objectDetection.ts:68](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L68) --- @@ -634,7 +634,7 @@ Defined in: [types/objectDetection.ts:71](https://github.com/software-mansion/re > **TOASTER**: `80` -Defined in: [types/objectDetection.ts:118](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L118) +Defined in: [types/objectDetection.ts:115](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L115) --- @@ -642,7 +642,7 @@ Defined in: [types/objectDetection.ts:118](https://github.com/software-mansion/r > **TOILET**: `70` -Defined in: [types/objectDetection.ts:108](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L108) +Defined in: [types/objectDetection.ts:105](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L105) --- @@ -650,7 +650,7 @@ Defined in: [types/objectDetection.ts:108](https://github.com/software-mansion/r > **TOOTHBRUSH**: `90` -Defined in: [types/objectDetection.ts:128](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L128) +Defined in: [types/objectDetection.ts:125](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L125) --- @@ -658,7 +658,7 @@ Defined in: [types/objectDetection.ts:128](https://github.com/software-mansion/r > **TRAFFIC_LIGHT**: `10` -Defined in: [types/objectDetection.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L49) +Defined in: [types/objectDetection.ts:46](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L46) --- @@ -666,7 +666,7 @@ Defined in: [types/objectDetection.ts:49](https://github.com/software-mansion/re > **TRAIN**: `7` -Defined in: [types/objectDetection.ts:46](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L46) +Defined in: [types/objectDetection.ts:43](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L43) --- @@ -674,7 +674,7 @@ Defined in: [types/objectDetection.ts:46](https://github.com/software-mansion/re > **TRUCK**: `8` -Defined in: [types/objectDetection.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L47) +Defined in: [types/objectDetection.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L44) --- @@ -682,7 +682,7 @@ Defined in: [types/objectDetection.ts:47](https://github.com/software-mansion/re > **TV**: `72` -Defined in: [types/objectDetection.ts:110](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L110) +Defined in: [types/objectDetection.ts:107](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L107) --- @@ -690,7 +690,7 @@ Defined in: [types/objectDetection.ts:110](https://github.com/software-mansion/r > **UMBRELLA**: `28` -Defined in: [types/objectDetection.ts:67](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L67) +Defined in: [types/objectDetection.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L64) --- @@ -698,7 +698,7 @@ Defined in: [types/objectDetection.ts:67](https://github.com/software-mansion/re > **VASE**: `86` -Defined in: [types/objectDetection.ts:124](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L124) +Defined in: [types/objectDetection.ts:121](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L121) --- @@ -706,7 +706,7 @@ Defined in: [types/objectDetection.ts:124](https://github.com/software-mansion/r > **WINDOW**: `68` -Defined in: [types/objectDetection.ts:106](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L106) +Defined in: [types/objectDetection.ts:103](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L103) --- @@ -714,7 +714,7 @@ Defined in: [types/objectDetection.ts:106](https://github.com/software-mansion/r > **WINE_GLASS**: `46` -Defined in: [types/objectDetection.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L84) +Defined in: [types/objectDetection.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L81) --- @@ -722,4 +722,4 @@ Defined in: [types/objectDetection.ts:84](https://github.com/software-mansion/re > **ZEBRA**: `24` -Defined in: [types/objectDetection.ts:63](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L63) +Defined in: [types/objectDetection.ts:60](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L60) diff --git a/docs/docs/06-api-reference/enumerations/DeeplabLabel.md b/docs/docs/06-api-reference/enumerations/DeeplabLabel.md index 7fc8ec2c2..1761e4b92 100644 --- a/docs/docs/06-api-reference/enumerations/DeeplabLabel.md +++ b/docs/docs/06-api-reference/enumerations/DeeplabLabel.md @@ -1,6 +1,6 @@ # Enumeration: DeeplabLabel -Defined in: [types/semanticSegmentation.ts:70](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L70) +Defined in: [types/semanticSegmentation.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L64) Labels used in the DeepLab semantic segmentation model. @@ -10,7 +10,7 @@ Labels used in the DeepLab semantic segmentation model. > **AEROPLANE**: `1` -Defined in: [types/semanticSegmentation.ts:72](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L72) +Defined in: [types/semanticSegmentation.ts:66](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L66) --- @@ -18,7 +18,7 @@ Defined in: [types/semanticSegmentation.ts:72](https://github.com/software-mansi > **BACKGROUND**: `0` -Defined in: [types/semanticSegmentation.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L71) +Defined in: [types/semanticSegmentation.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L65) --- @@ -26,7 +26,7 @@ Defined in: [types/semanticSegmentation.ts:71](https://github.com/software-mansi > **BICYCLE**: `2` -Defined in: [types/semanticSegmentation.ts:73](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L73) +Defined in: [types/semanticSegmentation.ts:67](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L67) --- @@ -34,7 +34,7 @@ Defined in: [types/semanticSegmentation.ts:73](https://github.com/software-mansi > **BIRD**: `3` -Defined in: [types/semanticSegmentation.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L74) +Defined in: [types/semanticSegmentation.ts:68](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L68) --- @@ -42,7 +42,7 @@ Defined in: [types/semanticSegmentation.ts:74](https://github.com/software-mansi > **BOAT**: `4` -Defined in: [types/semanticSegmentation.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L75) +Defined in: [types/semanticSegmentation.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L69) --- @@ -50,7 +50,7 @@ Defined in: [types/semanticSegmentation.ts:75](https://github.com/software-mansi > **BOTTLE**: `5` -Defined in: [types/semanticSegmentation.ts:76](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L76) +Defined in: [types/semanticSegmentation.ts:70](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L70) --- @@ -58,7 +58,7 @@ Defined in: [types/semanticSegmentation.ts:76](https://github.com/software-mansi > **BUS**: `6` -Defined in: [types/semanticSegmentation.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L77) +Defined in: [types/semanticSegmentation.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L71) --- @@ -66,7 +66,7 @@ Defined in: [types/semanticSegmentation.ts:77](https://github.com/software-mansi > **CAR**: `7` -Defined in: [types/semanticSegmentation.ts:78](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L78) +Defined in: [types/semanticSegmentation.ts:72](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L72) --- @@ -74,7 +74,7 @@ Defined in: [types/semanticSegmentation.ts:78](https://github.com/software-mansi > **CAT**: `8` -Defined in: [types/semanticSegmentation.ts:79](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L79) +Defined in: [types/semanticSegmentation.ts:73](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L73) --- @@ -82,7 +82,7 @@ Defined in: [types/semanticSegmentation.ts:79](https://github.com/software-mansi > **CHAIR**: `9` -Defined in: [types/semanticSegmentation.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L80) +Defined in: [types/semanticSegmentation.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L74) --- @@ -90,7 +90,7 @@ Defined in: [types/semanticSegmentation.ts:80](https://github.com/software-mansi > **COW**: `10` -Defined in: [types/semanticSegmentation.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L81) +Defined in: [types/semanticSegmentation.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L75) --- @@ -98,7 +98,7 @@ Defined in: [types/semanticSegmentation.ts:81](https://github.com/software-mansi > **DININGTABLE**: `11` -Defined in: [types/semanticSegmentation.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L82) +Defined in: [types/semanticSegmentation.ts:76](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L76) --- @@ -106,7 +106,7 @@ Defined in: [types/semanticSegmentation.ts:82](https://github.com/software-mansi > **DOG**: `12` -Defined in: [types/semanticSegmentation.ts:83](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L83) +Defined in: [types/semanticSegmentation.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L77) --- @@ -114,7 +114,7 @@ Defined in: [types/semanticSegmentation.ts:83](https://github.com/software-mansi > **HORSE**: `13` -Defined in: [types/semanticSegmentation.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L84) +Defined in: [types/semanticSegmentation.ts:78](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L78) --- @@ -122,7 +122,7 @@ Defined in: [types/semanticSegmentation.ts:84](https://github.com/software-mansi > **MOTORBIKE**: `14` -Defined in: [types/semanticSegmentation.ts:85](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L85) +Defined in: [types/semanticSegmentation.ts:79](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L79) --- @@ -130,7 +130,7 @@ Defined in: [types/semanticSegmentation.ts:85](https://github.com/software-mansi > **PERSON**: `15` -Defined in: [types/semanticSegmentation.ts:86](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L86) +Defined in: [types/semanticSegmentation.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L80) --- @@ -138,7 +138,7 @@ Defined in: [types/semanticSegmentation.ts:86](https://github.com/software-mansi > **POTTEDPLANT**: `16` -Defined in: [types/semanticSegmentation.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L87) +Defined in: [types/semanticSegmentation.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L81) --- @@ -146,7 +146,7 @@ Defined in: [types/semanticSegmentation.ts:87](https://github.com/software-mansi > **SHEEP**: `17` -Defined in: [types/semanticSegmentation.ts:88](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L88) +Defined in: [types/semanticSegmentation.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L82) --- @@ -154,7 +154,7 @@ Defined in: [types/semanticSegmentation.ts:88](https://github.com/software-mansi > **SOFA**: `18` -Defined in: [types/semanticSegmentation.ts:89](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L89) +Defined in: [types/semanticSegmentation.ts:83](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L83) --- @@ -162,7 +162,7 @@ Defined in: [types/semanticSegmentation.ts:89](https://github.com/software-mansi > **TRAIN**: `19` -Defined in: [types/semanticSegmentation.ts:90](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L90) +Defined in: [types/semanticSegmentation.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L84) --- @@ -170,4 +170,4 @@ Defined in: [types/semanticSegmentation.ts:90](https://github.com/software-mansi > **TVMONITOR**: `20` -Defined in: [types/semanticSegmentation.ts:91](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L91) +Defined in: [types/semanticSegmentation.ts:85](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L85) diff --git a/docs/docs/06-api-reference/enumerations/HTTP_CODE.md b/docs/docs/06-api-reference/enumerations/HTTP_CODE.md index 213a2ba89..1f960c4a7 100644 --- a/docs/docs/06-api-reference/enumerations/HTTP_CODE.md +++ b/docs/docs/06-api-reference/enumerations/HTTP_CODE.md @@ -1,6 +1,6 @@ # Enumeration: HTTP_CODE -Defined in: [utils/ResourceFetcherUtils.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L8) +Defined in: [utils/ResourceFetcherUtils.ts:7](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L7) Http status codes @@ -12,7 +12,7 @@ Http status codes Defined in: [utils/ResourceFetcherUtils.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L11) -- Everything is ok. +Everything is ok. --- @@ -20,6 +20,6 @@ Defined in: [utils/ResourceFetcherUtils.ts:11](https://github.com/software-mansi > **PARTIAL_CONTENT**: `206` -Defined in: [utils/ResourceFetcherUtils.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L15) +Defined in: [utils/ResourceFetcherUtils.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L16) -- Server has fulfilled a client request for a specific part of a resource, instead of sending the entire file. +Server has fulfilled a client request for a specific part of a resource, instead of sending the entire file. diff --git a/docs/docs/06-api-reference/enumerations/ScalarType.md b/docs/docs/06-api-reference/enumerations/ScalarType.md index bcd1869e0..d740c7cde 100644 --- a/docs/docs/06-api-reference/enumerations/ScalarType.md +++ b/docs/docs/06-api-reference/enumerations/ScalarType.md @@ -1,6 +1,6 @@ # Enumeration: ScalarType -Defined in: [types/common.ts:17](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L17) +Defined in: [types/common.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L15) Enum representing the scalar types of tensors. @@ -10,7 +10,7 @@ Enum representing the scalar types of tensors. > **BITS16**: `22` -Defined in: [types/common.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L77) +Defined in: [types/common.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L75) Raw Bits type. @@ -20,7 +20,7 @@ Raw Bits type. > **BOOL**: `11` -Defined in: [types/common.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L53) +Defined in: [types/common.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L51) Boolean type. @@ -30,7 +30,7 @@ Boolean type. > **BYTE**: `0` -Defined in: [types/common.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L21) +Defined in: [types/common.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L19) Byte type (8-bit unsigned integer). @@ -40,7 +40,7 @@ Byte type (8-bit unsigned integer). > **CHAR**: `1` -Defined in: [types/common.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L25) +Defined in: [types/common.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L23) Character type (8-bit signed integer). @@ -50,7 +50,7 @@ Character type (8-bit signed integer). > **DOUBLE**: `7` -Defined in: [types/common.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L49) +Defined in: [types/common.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L47) Double-precision floating point type (64-bit). @@ -60,7 +60,7 @@ Double-precision floating point type (64-bit). > **FLOAT**: `6` -Defined in: [types/common.ts:45](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L45) +Defined in: [types/common.ts:43](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L43) Single-precision floating point type (32-bit). @@ -70,7 +70,7 @@ Single-precision floating point type (32-bit). > **FLOAT8E4M3FN**: `24` -Defined in: [types/common.ts:85](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L85) +Defined in: [types/common.ts:83](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L83) Quantized 8-bit floating point type: Sign bit, 4 Exponent bits, 3 Mantissa bits. @@ -80,7 +80,7 @@ Quantized 8-bit floating point type: Sign bit, 4 Exponent bits, 3 Mantissa bits. > **FLOAT8E4M3FNUZ**: `26` -Defined in: [types/common.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L93) +Defined in: [types/common.ts:91](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L91) Quantized 8-bit floating point type with No Unsigned Zero (NUZ): Sign bit, 4 Exponent bits, 3 Mantissa bits. @@ -90,7 +90,7 @@ Quantized 8-bit floating point type with No Unsigned Zero (NUZ): Sign bit, 4 Exp > **FLOAT8E5M2**: `23` -Defined in: [types/common.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L81) +Defined in: [types/common.ts:79](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L79) Quantized 8-bit floating point type: Sign bit, 5 Exponent bits, 2 Mantissa bits. @@ -100,7 +100,7 @@ Quantized 8-bit floating point type: Sign bit, 5 Exponent bits, 2 Mantissa bits. > **FLOAT8E5M2FNUZ**: `25` -Defined in: [types/common.ts:89](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L89) +Defined in: [types/common.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L87) Quantized 8-bit floating point type with No Unsigned Zero (NUZ): Sign bit, 5 Exponent bits, 2 Mantissa bits. @@ -110,7 +110,7 @@ Quantized 8-bit floating point type with No Unsigned Zero (NUZ): Sign bit, 5 Exp > **HALF**: `5` -Defined in: [types/common.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L41) +Defined in: [types/common.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L39) Half-precision floating point type (16-bit). @@ -120,7 +120,7 @@ Half-precision floating point type (16-bit). > **INT**: `3` -Defined in: [types/common.ts:33](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L33) +Defined in: [types/common.ts:31](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L31) Integer type (32-bit signed integer). @@ -130,7 +130,7 @@ Integer type (32-bit signed integer). > **LONG**: `4` -Defined in: [types/common.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L37) +Defined in: [types/common.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L35) Long integer type (64-bit signed integer). @@ -140,7 +140,7 @@ Long integer type (64-bit signed integer). > **QINT32**: `14` -Defined in: [types/common.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L65) +Defined in: [types/common.ts:63](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L63) Quantized 32-bit signed integer type. @@ -150,7 +150,7 @@ Quantized 32-bit signed integer type. > **QINT8**: `12` -Defined in: [types/common.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L57) +Defined in: [types/common.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L55) Quantized 8-bit signed integer type. @@ -160,7 +160,7 @@ Quantized 8-bit signed integer type. > **QUINT2X4**: `17` -Defined in: [types/common.ts:73](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L73) +Defined in: [types/common.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L71) Packed Quantized Unsigned 2-bit Integer type (4 numbers in 1 byte). @@ -170,7 +170,7 @@ Packed Quantized Unsigned 2-bit Integer type (4 numbers in 1 byte). > **QUINT4X2**: `16` -Defined in: [types/common.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L69) +Defined in: [types/common.ts:67](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L67) Packed Quantized Unsigned 4-bit Integers type (2 number in 1 byte). @@ -180,7 +180,7 @@ Packed Quantized Unsigned 4-bit Integers type (2 number in 1 byte). > **QUINT8**: `13` -Defined in: [types/common.ts:61](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L61) +Defined in: [types/common.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L59) Quantized 8-bit unsigned integer type. @@ -190,7 +190,7 @@ Quantized 8-bit unsigned integer type. > **SHORT**: `2` -Defined in: [types/common.ts:29](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L29) +Defined in: [types/common.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L27) Short integer type (16-bit signed integer). @@ -200,7 +200,7 @@ Short integer type (16-bit signed integer). > **UINT16**: `27` -Defined in: [types/common.ts:97](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L97) +Defined in: [types/common.ts:95](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L95) Unsigned 16-bit integer type. @@ -210,7 +210,7 @@ Unsigned 16-bit integer type. > **UINT32**: `28` -Defined in: [types/common.ts:101](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L101) +Defined in: [types/common.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L99) Unsigned 32-bit integer type. @@ -220,6 +220,6 @@ Unsigned 32-bit integer type. > **UINT64**: `29` -Defined in: [types/common.ts:105](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L105) +Defined in: [types/common.ts:103](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L103) Unsigned 64-bit integer type. diff --git a/docs/docs/06-api-reference/enumerations/SelfieSegmentationLabel.md b/docs/docs/06-api-reference/enumerations/SelfieSegmentationLabel.md index fc0434512..bcb0139db 100644 --- a/docs/docs/06-api-reference/enumerations/SelfieSegmentationLabel.md +++ b/docs/docs/06-api-reference/enumerations/SelfieSegmentationLabel.md @@ -1,6 +1,6 @@ # Enumeration: SelfieSegmentationLabel -Defined in: [types/semanticSegmentation.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L99) +Defined in: [types/semanticSegmentation.ts:92](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L92) Labels used in the selfie semantic segmentation model. @@ -10,7 +10,7 @@ Labels used in the selfie semantic segmentation model. > **BACKGROUND**: `1` -Defined in: [types/semanticSegmentation.ts:101](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L101) +Defined in: [types/semanticSegmentation.ts:94](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L94) --- @@ -18,4 +18,4 @@ Defined in: [types/semanticSegmentation.ts:101](https://github.com/software-mans > **SELFIE**: `0` -Defined in: [types/semanticSegmentation.ts:100](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L100) +Defined in: [types/semanticSegmentation.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L93) diff --git a/docs/docs/06-api-reference/enumerations/SourceType.md b/docs/docs/06-api-reference/enumerations/SourceType.md index 97308c82c..786f82b5d 100644 --- a/docs/docs/06-api-reference/enumerations/SourceType.md +++ b/docs/docs/06-api-reference/enumerations/SourceType.md @@ -1,6 +1,6 @@ # Enumeration: SourceType -Defined in: [utils/ResourceFetcherUtils.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L40) +Defined in: [utils/ResourceFetcherUtils.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L39) Types of sources that can be downloaded @@ -10,7 +10,7 @@ Types of sources that can be downloaded > **DEV_MODE_FILE**: `3` -Defined in: [utils/ResourceFetcherUtils.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L59) +Defined in: [utils/ResourceFetcherUtils.ts:58](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L58) Represents a file served via the metro bundler during development. @@ -20,7 +20,7 @@ Represents a file served via the metro bundler during development. > **LOCAL_FILE**: `1` -Defined in: [utils/ResourceFetcherUtils.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L49) +Defined in: [utils/ResourceFetcherUtils.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L48) Represents a file stored locally on the filesystem. @@ -30,7 +30,7 @@ Represents a file stored locally on the filesystem. > **OBJECT**: `0` -Defined in: [utils/ResourceFetcherUtils.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L44) +Defined in: [utils/ResourceFetcherUtils.ts:43](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L43) Represents a raw object or data structure. @@ -40,7 +40,7 @@ Represents a raw object or data structure. > **RELEASE_MODE_FILE**: `2` -Defined in: [utils/ResourceFetcherUtils.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L54) +Defined in: [utils/ResourceFetcherUtils.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L53) Represents a file bundled with the application in release mode. @@ -50,6 +50,6 @@ Represents a file bundled with the application in release mode. > **REMOTE_FILE**: `4` -Defined in: [utils/ResourceFetcherUtils.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L64) +Defined in: [utils/ResourceFetcherUtils.ts:63](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L63) Represents a file located at a remote URL. diff --git a/docs/docs/06-api-reference/functions/DEFAULT_STRUCTURED_OUTPUT_PROMPT.md b/docs/docs/06-api-reference/functions/DEFAULT_STRUCTURED_OUTPUT_PROMPT.md index 33c0ddb96..622c55477 100644 --- a/docs/docs/06-api-reference/functions/DEFAULT_STRUCTURED_OUTPUT_PROMPT.md +++ b/docs/docs/06-api-reference/functions/DEFAULT_STRUCTURED_OUTPUT_PROMPT.md @@ -2,7 +2,7 @@ > **DEFAULT_STRUCTURED_OUTPUT_PROMPT**(`structuredOutputSchema`): `string` -Defined in: [constants/llmDefaults.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L19) +Defined in: [constants/llmDefaults.ts:17](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L17) Generates a default structured output prompt based on the provided JSON schema. diff --git a/docs/docs/06-api-reference/functions/cleanupExecutorch.md b/docs/docs/06-api-reference/functions/cleanupExecutorch.md index 6a971e98a..c0c9c8de2 100644 --- a/docs/docs/06-api-reference/functions/cleanupExecutorch.md +++ b/docs/docs/06-api-reference/functions/cleanupExecutorch.md @@ -2,7 +2,7 @@ > **cleanupExecutorch**(): `void` -Defined in: [index.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L32) +Defined in: [index.ts:29](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L29) Function that cleans current setup of fetching resources. diff --git a/docs/docs/06-api-reference/functions/fixAndValidateStructuredOutput.md b/docs/docs/06-api-reference/functions/fixAndValidateStructuredOutput.md index 10ffeda0c..3c720fe7a 100644 --- a/docs/docs/06-api-reference/functions/fixAndValidateStructuredOutput.md +++ b/docs/docs/06-api-reference/functions/fixAndValidateStructuredOutput.md @@ -2,7 +2,7 @@ > **fixAndValidateStructuredOutput**\<`T`\>(`output`, `responseSchema`): `output`\<`T`\> -Defined in: [utils/llm.ts:102](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llm.ts#L102) +Defined in: [utils/llm.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llm.ts#L99) Fixes and validates structured output from LLMs against a provided schema. diff --git a/docs/docs/06-api-reference/functions/getStructuredOutputPrompt.md b/docs/docs/06-api-reference/functions/getStructuredOutputPrompt.md index 6d8b0fba6..46d8ff621 100644 --- a/docs/docs/06-api-reference/functions/getStructuredOutputPrompt.md +++ b/docs/docs/06-api-reference/functions/getStructuredOutputPrompt.md @@ -2,7 +2,7 @@ > **getStructuredOutputPrompt**\<`T`\>(`responseSchema`): `string` -Defined in: [utils/llm.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llm.ts#L64) +Defined in: [utils/llm.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llm.ts#L62) Generates a structured output prompt based on the provided schema. diff --git a/docs/docs/06-api-reference/functions/initExecutorch.md b/docs/docs/06-api-reference/functions/initExecutorch.md index 3dec5e8c2..d4bfb4070 100644 --- a/docs/docs/06-api-reference/functions/initExecutorch.md +++ b/docs/docs/06-api-reference/functions/initExecutorch.md @@ -2,7 +2,7 @@ > **initExecutorch**(`config`): `void` -Defined in: [index.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L23) +Defined in: [index.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L21) Function that setups the provided resource fetcher. diff --git a/docs/docs/06-api-reference/functions/useClassification.md b/docs/docs/06-api-reference/functions/useClassification.md index 20f882cc2..fe0093ca8 100644 --- a/docs/docs/06-api-reference/functions/useClassification.md +++ b/docs/docs/06-api-reference/functions/useClassification.md @@ -2,7 +2,7 @@ > **useClassification**(`ClassificationProps`): [`ClassificationType`](../interfaces/ClassificationType.md) -Defined in: [hooks/computer_vision/useClassification.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useClassification.ts#L15) +Defined in: [hooks/computer_vision/useClassification.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useClassification.ts#L14) React hook for managing a Classification model instance. diff --git a/docs/docs/06-api-reference/functions/useExecutorchModule.md b/docs/docs/06-api-reference/functions/useExecutorchModule.md index 5e6b54ffe..b45e974db 100644 --- a/docs/docs/06-api-reference/functions/useExecutorchModule.md +++ b/docs/docs/06-api-reference/functions/useExecutorchModule.md @@ -2,7 +2,7 @@ > **useExecutorchModule**(`executorchModuleProps`): [`ExecutorchModuleType`](../interfaces/ExecutorchModuleType.md) -Defined in: [hooks/general/useExecutorchModule.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/general/useExecutorchModule.ts#L15) +Defined in: [hooks/general/useExecutorchModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/general/useExecutorchModule.ts#L14) React hook for managing an arbitrary Executorch module instance. diff --git a/docs/docs/06-api-reference/functions/useImageEmbeddings.md b/docs/docs/06-api-reference/functions/useImageEmbeddings.md index e0dcea739..77db5aa83 100644 --- a/docs/docs/06-api-reference/functions/useImageEmbeddings.md +++ b/docs/docs/06-api-reference/functions/useImageEmbeddings.md @@ -2,7 +2,7 @@ > **useImageEmbeddings**(`ImageEmbeddingsProps`): [`ImageEmbeddingsType`](../interfaces/ImageEmbeddingsType.md) -Defined in: [hooks/computer_vision/useImageEmbeddings.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useImageEmbeddings.ts#L15) +Defined in: [hooks/computer_vision/useImageEmbeddings.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useImageEmbeddings.ts#L14) React hook for managing an Image Embeddings model instance. diff --git a/docs/docs/06-api-reference/functions/useLLM.md b/docs/docs/06-api-reference/functions/useLLM.md index f62640d90..e2a262b9a 100644 --- a/docs/docs/06-api-reference/functions/useLLM.md +++ b/docs/docs/06-api-reference/functions/useLLM.md @@ -2,7 +2,7 @@ > **useLLM**(`model`): [`LLMType`](../interfaces/LLMType.md) -Defined in: [hooks/natural_language_processing/useLLM.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts#L19) +Defined in: [hooks/natural_language_processing/useLLM.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts#L18) React hook for managing a Large Language Model (LLM) instance. diff --git a/docs/docs/06-api-reference/functions/useOCR.md b/docs/docs/06-api-reference/functions/useOCR.md index 3ebe2e2c9..132717ed3 100644 --- a/docs/docs/06-api-reference/functions/useOCR.md +++ b/docs/docs/06-api-reference/functions/useOCR.md @@ -2,7 +2,7 @@ > **useOCR**(`OCRProps`): [`OCRType`](../interfaces/OCRType.md) -Defined in: [hooks/computer_vision/useOCR.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useOCR.ts#L13) +Defined in: [hooks/computer_vision/useOCR.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useOCR.ts#L12) React hook for managing an OCR instance. diff --git a/docs/docs/06-api-reference/functions/useObjectDetection.md b/docs/docs/06-api-reference/functions/useObjectDetection.md index 8cc0ba419..da017cbed 100644 --- a/docs/docs/06-api-reference/functions/useObjectDetection.md +++ b/docs/docs/06-api-reference/functions/useObjectDetection.md @@ -2,7 +2,7 @@ > **useObjectDetection**(`ObjectDetectionProps`): [`ObjectDetectionType`](../interfaces/ObjectDetectionType.md) -Defined in: [hooks/computer_vision/useObjectDetection.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useObjectDetection.ts#L15) +Defined in: [hooks/computer_vision/useObjectDetection.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useObjectDetection.ts#L14) React hook for managing an Object Detection model instance. diff --git a/docs/docs/06-api-reference/functions/useSemanticSegmentation.md b/docs/docs/06-api-reference/functions/useSemanticSegmentation.md index ebd154086..1f9a4d306 100644 --- a/docs/docs/06-api-reference/functions/useSemanticSegmentation.md +++ b/docs/docs/06-api-reference/functions/useSemanticSegmentation.md @@ -2,7 +2,7 @@ > **useSemanticSegmentation**\<`C`\>(`props`): [`SemanticSegmentationType`](../interfaces/SemanticSegmentationType.md)\<[`SegmentationLabels`](../type-aliases/SegmentationLabels.md)\<[`ModelNameOf`](../type-aliases/ModelNameOf.md)\<`C`\>\>\> -Defined in: [hooks/computer_vision/useSemanticSegmentation.ts:31](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useSemanticSegmentation.ts#L31) +Defined in: [hooks/computer_vision/useSemanticSegmentation.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useSemanticSegmentation.ts#L28) React hook for managing a Semantic Segmentation model instance. diff --git a/docs/docs/06-api-reference/functions/useSpeechToText.md b/docs/docs/06-api-reference/functions/useSpeechToText.md index 3eff9a1c3..dcc298bd4 100644 --- a/docs/docs/06-api-reference/functions/useSpeechToText.md +++ b/docs/docs/06-api-reference/functions/useSpeechToText.md @@ -2,7 +2,7 @@ > **useSpeechToText**(`speechToTextProps`): [`SpeechToTextType`](../interfaces/SpeechToTextType.md) -Defined in: [hooks/natural_language_processing/useSpeechToText.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useSpeechToText.ts#L19) +Defined in: [hooks/natural_language_processing/useSpeechToText.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useSpeechToText.ts#L18) React hook for managing a Speech to Text (STT) instance. diff --git a/docs/docs/06-api-reference/functions/useStyleTransfer.md b/docs/docs/06-api-reference/functions/useStyleTransfer.md index c312d8310..f8087a7b0 100644 --- a/docs/docs/06-api-reference/functions/useStyleTransfer.md +++ b/docs/docs/06-api-reference/functions/useStyleTransfer.md @@ -2,7 +2,7 @@ > **useStyleTransfer**(`StyleTransferProps`): [`StyleTransferType`](../interfaces/StyleTransferType.md) -Defined in: [hooks/computer_vision/useStyleTransfer.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useStyleTransfer.ts#L15) +Defined in: [hooks/computer_vision/useStyleTransfer.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useStyleTransfer.ts#L14) React hook for managing a Style Transfer model instance. diff --git a/docs/docs/06-api-reference/functions/useTextEmbeddings.md b/docs/docs/06-api-reference/functions/useTextEmbeddings.md index d693af677..d2d71fcef 100644 --- a/docs/docs/06-api-reference/functions/useTextEmbeddings.md +++ b/docs/docs/06-api-reference/functions/useTextEmbeddings.md @@ -2,7 +2,7 @@ > **useTextEmbeddings**(`TextEmbeddingsProps`): [`TextEmbeddingsType`](../interfaces/TextEmbeddingsType.md) -Defined in: [hooks/natural_language_processing/useTextEmbeddings.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useTextEmbeddings.ts#L15) +Defined in: [hooks/natural_language_processing/useTextEmbeddings.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useTextEmbeddings.ts#L14) React hook for managing a Text Embeddings model instance. diff --git a/docs/docs/06-api-reference/functions/useTextToImage.md b/docs/docs/06-api-reference/functions/useTextToImage.md index 1faf63005..58fd4ce17 100644 --- a/docs/docs/06-api-reference/functions/useTextToImage.md +++ b/docs/docs/06-api-reference/functions/useTextToImage.md @@ -2,7 +2,7 @@ > **useTextToImage**(`TextToImageProps`): [`TextToImageType`](../interfaces/TextToImageType.md) -Defined in: [hooks/computer_vision/useTextToImage.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useTextToImage.ts#L14) +Defined in: [hooks/computer_vision/useTextToImage.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useTextToImage.ts#L13) React hook for managing a Text to Image instance. diff --git a/docs/docs/06-api-reference/functions/useTextToSpeech.md b/docs/docs/06-api-reference/functions/useTextToSpeech.md index 61a1c4e64..077710bff 100644 --- a/docs/docs/06-api-reference/functions/useTextToSpeech.md +++ b/docs/docs/06-api-reference/functions/useTextToSpeech.md @@ -2,7 +2,7 @@ > **useTextToSpeech**(`TextToSpeechProps`): [`TextToSpeechType`](../interfaces/TextToSpeechType.md) -Defined in: [hooks/natural_language_processing/useTextToSpeech.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useTextToSpeech.ts#L19) +Defined in: [hooks/natural_language_processing/useTextToSpeech.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useTextToSpeech.ts#L18) React hook for managing Text to Speech instance. diff --git a/docs/docs/06-api-reference/functions/useTokenizer.md b/docs/docs/06-api-reference/functions/useTokenizer.md index cf8dc784e..bf1e5f96b 100644 --- a/docs/docs/06-api-reference/functions/useTokenizer.md +++ b/docs/docs/06-api-reference/functions/useTokenizer.md @@ -2,7 +2,7 @@ > **useTokenizer**(`tokenizerProps`): [`TokenizerType`](../interfaces/TokenizerType.md) -Defined in: [hooks/natural_language_processing/useTokenizer.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts#L14) +Defined in: [hooks/natural_language_processing/useTokenizer.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts#L13) React hook for managing a Tokenizer instance. diff --git a/docs/docs/06-api-reference/functions/useVAD.md b/docs/docs/06-api-reference/functions/useVAD.md index eda7a330a..c77ef5583 100644 --- a/docs/docs/06-api-reference/functions/useVAD.md +++ b/docs/docs/06-api-reference/functions/useVAD.md @@ -2,7 +2,7 @@ > **useVAD**(`VADProps`): [`VADType`](../interfaces/VADType.md) -Defined in: [hooks/natural_language_processing/useVAD.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useVAD.ts#L12) +Defined in: [hooks/natural_language_processing/useVAD.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/natural_language_processing/useVAD.ts#L11) React hook for managing a VAD model instance. diff --git a/docs/docs/06-api-reference/functions/useVerticalOCR.md b/docs/docs/06-api-reference/functions/useVerticalOCR.md index 36c765214..5fbf6344c 100644 --- a/docs/docs/06-api-reference/functions/useVerticalOCR.md +++ b/docs/docs/06-api-reference/functions/useVerticalOCR.md @@ -2,7 +2,7 @@ > **useVerticalOCR**(`VerticalOCRProps`): [`OCRType`](../interfaces/OCRType.md) -Defined in: [hooks/computer_vision/useVerticalOCR.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useVerticalOCR.ts#L13) +Defined in: [hooks/computer_vision/useVerticalOCR.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/hooks/computer_vision/useVerticalOCR.ts#L12) React hook for managing a Vertical OCR instance. diff --git a/docs/docs/06-api-reference/interfaces/Bbox.md b/docs/docs/06-api-reference/interfaces/Bbox.md index 98fec21a8..959109ae8 100644 --- a/docs/docs/06-api-reference/interfaces/Bbox.md +++ b/docs/docs/06-api-reference/interfaces/Bbox.md @@ -1,6 +1,6 @@ # Interface: Bbox -Defined in: [types/objectDetection.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L13) +Defined in: [types/objectDetection.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L12) Represents a bounding box for a detected object in an image. @@ -10,7 +10,7 @@ Represents a bounding box for a detected object in an image. > **x1**: `number` -Defined in: [types/objectDetection.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L14) +Defined in: [types/objectDetection.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L13) The x-coordinate of the bottom-left corner of the bounding box. @@ -20,7 +20,7 @@ The x-coordinate of the bottom-left corner of the bounding box. > **x2**: `number` -Defined in: [types/objectDetection.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L15) +Defined in: [types/objectDetection.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L14) The x-coordinate of the top-right corner of the bounding box. @@ -30,7 +30,7 @@ The x-coordinate of the top-right corner of the bounding box. > **y1**: `number` -Defined in: [types/objectDetection.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L16) +Defined in: [types/objectDetection.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L15) The y-coordinate of the bottom-left corner of the bounding box. @@ -40,6 +40,6 @@ The y-coordinate of the bottom-left corner of the bounding box. > **y2**: `number` -Defined in: [types/objectDetection.ts:17](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L17) +Defined in: [types/objectDetection.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L16) The y-coordinate of the top-right corner of the bounding box. diff --git a/docs/docs/06-api-reference/interfaces/ChatConfig.md b/docs/docs/06-api-reference/interfaces/ChatConfig.md index 1c4f07504..173f604a9 100644 --- a/docs/docs/06-api-reference/interfaces/ChatConfig.md +++ b/docs/docs/06-api-reference/interfaces/ChatConfig.md @@ -1,6 +1,6 @@ # Interface: ChatConfig -Defined in: [types/llm.ts:218](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L218) +Defined in: [types/llm.ts:203](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L203) Object configuring chat management. @@ -10,7 +10,7 @@ Object configuring chat management. > **contextStrategy**: [`ContextStrategy`](ContextStrategy.md) -Defined in: [types/llm.ts:221](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L221) +Defined in: [types/llm.ts:206](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L206) Defines a strategy for managing the conversation context window and message history. @@ -20,7 +20,7 @@ Defines a strategy for managing the conversation context window and message hist > **initialMessageHistory**: [`Message`](Message.md)[] -Defined in: [types/llm.ts:219](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L219) +Defined in: [types/llm.ts:204](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L204) An array of `Message` objects that represent the conversation history. This can be used to provide initial context to the model. @@ -30,6 +30,6 @@ An array of `Message` objects that represent the conversation history. This can > **systemPrompt**: `string` -Defined in: [types/llm.ts:220](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L220) +Defined in: [types/llm.ts:205](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L205) Often used to tell the model what is its purpose, for example - "Be a helpful translator". diff --git a/docs/docs/06-api-reference/interfaces/ClassificationProps.md b/docs/docs/06-api-reference/interfaces/ClassificationProps.md index 899c70f06..b741ad0bf 100644 --- a/docs/docs/06-api-reference/interfaces/ClassificationProps.md +++ b/docs/docs/06-api-reference/interfaces/ClassificationProps.md @@ -1,6 +1,6 @@ # Interface: ClassificationProps -Defined in: [types/classification.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L12) +Defined in: [types/classification.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L11) Props for the `useClassification` hook. @@ -10,7 +10,7 @@ Props for the `useClassification` hook. > **model**: `object` -Defined in: [types/classification.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L13) +Defined in: [types/classification.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L12) An object containing the model source. @@ -24,6 +24,6 @@ An object containing the model source. > `optional` **preventLoad**: `boolean` -Defined in: [types/classification.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L14) +Defined in: [types/classification.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L13) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/ClassificationType.md b/docs/docs/06-api-reference/interfaces/ClassificationType.md index 01fc48dd1..6e5967af1 100644 --- a/docs/docs/06-api-reference/interfaces/ClassificationType.md +++ b/docs/docs/06-api-reference/interfaces/ClassificationType.md @@ -1,6 +1,6 @@ # Interface: ClassificationType -Defined in: [types/classification.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L23) +Defined in: [types/classification.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L21) Return type for the `useClassification` hook. Manages the state and operations for Computer Vision image classification. @@ -11,7 +11,7 @@ Manages the state and operations for Computer Vision image classification. > **downloadProgress**: `number` -Defined in: [types/classification.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L42) +Defined in: [types/classification.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L40) Represents the download progress of the model binary as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the download progress of the model binary as a value between 0 and 1. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/classification.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L27) +Defined in: [types/classification.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L25) Contains the error object if the model failed to load, download, or encountered a runtime error during classification. @@ -31,7 +31,7 @@ Contains the error object if the model failed to load, download, or encountered > **forward**: (`imageSource`) => `Promise`\<\{\[`category`: `string`\]: `number`; \}\> -Defined in: [types/classification.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L50) +Defined in: [types/classification.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L48) Executes the model's forward pass to classify the provided image. @@ -59,7 +59,7 @@ If the model is not loaded or is currently processing another image. > **isGenerating**: `boolean` -Defined in: [types/classification.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L37) +Defined in: [types/classification.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L35) Indicates whether the model is currently processing an image. @@ -69,6 +69,6 @@ Indicates whether the model is currently processing an image. > **isReady**: `boolean` -Defined in: [types/classification.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L32) +Defined in: [types/classification.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/classification.ts#L30) Indicates whether the classification model is loaded and ready to process images. diff --git a/docs/docs/06-api-reference/interfaces/ContextStrategy.md b/docs/docs/06-api-reference/interfaces/ContextStrategy.md index 2e4d7d9b0..bb41f5978 100644 --- a/docs/docs/06-api-reference/interfaces/ContextStrategy.md +++ b/docs/docs/06-api-reference/interfaces/ContextStrategy.md @@ -1,6 +1,6 @@ # Interface: ContextStrategy -Defined in: [types/llm.ts:259](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L259) +Defined in: [types/llm.ts:241](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L241) Defines a strategy for managing the conversation context window and message history. @@ -10,12 +10,10 @@ Defines a strategy for managing the conversation context window and message hist > **buildContext**(`systemPrompt`, `history`, `maxContextLength`, `getTokenCount`): [`Message`](Message.md)[] -Defined in: [types/llm.ts:268](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L268) +Defined in: [types/llm.ts:250](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L250) Constructs the final array of messages to be sent to the model for the current inference step. -- - #### Parameters ##### systemPrompt diff --git a/docs/docs/06-api-reference/interfaces/DecodingOptions.md b/docs/docs/06-api-reference/interfaces/DecodingOptions.md index d0e041471..8702b7429 100644 --- a/docs/docs/06-api-reference/interfaces/DecodingOptions.md +++ b/docs/docs/06-api-reference/interfaces/DecodingOptions.md @@ -1,6 +1,6 @@ # Interface: DecodingOptions -Defined in: [types/stt.ts:195](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L195) +Defined in: [types/stt.ts:191](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L191) Options for decoding speech to text. @@ -10,7 +10,7 @@ Options for decoding speech to text. > `optional` **language**: [`SpeechToTextLanguage`](../type-aliases/SpeechToTextLanguage.md) -Defined in: [types/stt.ts:196](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L196) +Defined in: [types/stt.ts:192](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L192) Optional language code to guide the transcription. @@ -20,7 +20,7 @@ Optional language code to guide the transcription. > `optional` **verbose**: `boolean` -Defined in: [types/stt.ts:197](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L197) +Defined in: [types/stt.ts:193](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L193) Optional flag. If set, transcription result is presented with timestamps and with additional parameters. For more details please refer to `TranscriptionResult`. diff --git a/docs/docs/06-api-reference/interfaces/Detection.md b/docs/docs/06-api-reference/interfaces/Detection.md index 55bfa2a2c..f3238e6e0 100644 --- a/docs/docs/06-api-reference/interfaces/Detection.md +++ b/docs/docs/06-api-reference/interfaces/Detection.md @@ -1,6 +1,6 @@ # Interface: Detection -Defined in: [types/objectDetection.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L28) +Defined in: [types/objectDetection.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L26) Represents a detected object within an image, including its bounding box, label, and confidence score. @@ -10,7 +10,7 @@ Represents a detected object within an image, including its bounding box, label, > **bbox**: [`Bbox`](Bbox.md) -Defined in: [types/objectDetection.ts:29](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L29) +Defined in: [types/objectDetection.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L27) The bounding box of the detected object, defined by its top-left (x1, y1) and bottom-right (x2, y2) coordinates. @@ -20,7 +20,7 @@ The bounding box of the detected object, defined by its top-left (x1, y1) and bo > **label**: `"BICYCLE"` \| `"BIRD"` \| `"BOAT"` \| `"BOTTLE"` \| `"BUS"` \| `"CAR"` \| `"CAT"` \| `"CHAIR"` \| `"COW"` \| `"DOG"` \| `"HORSE"` \| `"PERSON"` \| `"SHEEP"` \| `"TRAIN"` \| `"MOTORCYCLE"` \| `"AIRPLANE"` \| `"TRUCK"` \| `"TRAFFIC_LIGHT"` \| `"FIRE_HYDRANT"` \| `"STREET_SIGN"` \| `"STOP_SIGN"` \| `"PARKING"` \| `"BENCH"` \| `"ELEPHANT"` \| `"BEAR"` \| `"ZEBRA"` \| `"GIRAFFE"` \| `"HAT"` \| `"BACKPACK"` \| `"UMBRELLA"` \| `"SHOE"` \| `"EYE"` \| `"HANDBAG"` \| `"TIE"` \| `"SUITCASE"` \| `"FRISBEE"` \| `"SKIS"` \| `"SNOWBOARD"` \| `"SPORTS"` \| `"KITE"` \| `"BASEBALL"` \| `"SKATEBOARD"` \| `"SURFBOARD"` \| `"TENNIS_RACKET"` \| `"PLATE"` \| `"WINE_GLASS"` \| `"CUP"` \| `"FORK"` \| `"KNIFE"` \| `"SPOON"` \| `"BOWL"` \| `"BANANA"` \| `"APPLE"` \| `"SANDWICH"` \| `"ORANGE"` \| `"BROCCOLI"` \| `"CARROT"` \| `"HOT_DOG"` \| `"PIZZA"` \| `"DONUT"` \| `"CAKE"` \| `"COUCH"` \| `"POTTED_PLANT"` \| `"BED"` \| `"MIRROR"` \| `"DINING_TABLE"` \| `"WINDOW"` \| `"DESK"` \| `"TOILET"` \| `"DOOR"` \| `"TV"` \| `"LAPTOP"` \| `"MOUSE"` \| `"REMOTE"` \| `"KEYBOARD"` \| `"CELL_PHONE"` \| `"MICROWAVE"` \| `"OVEN"` \| `"TOASTER"` \| `"SINK"` \| `"REFRIGERATOR"` \| `"BLENDER"` \| `"BOOK"` \| `"CLOCK"` \| `"VASE"` \| `"SCISSORS"` \| `"TEDDY_BEAR"` \| `"HAIR_DRIER"` \| `"TOOTHBRUSH"` \| `"HAIR_BRUSH"` -Defined in: [types/objectDetection.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L30) +Defined in: [types/objectDetection.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L28) The class label of the detected object, represented as a key from the `CocoLabel` enum. @@ -30,6 +30,6 @@ The class label of the detected object, represented as a key from the `CocoLabel > **score**: `number` -Defined in: [types/objectDetection.ts:31](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L31) +Defined in: [types/objectDetection.ts:29](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L29) The confidence score of the detection, typically ranging from 0 to 1. diff --git a/docs/docs/06-api-reference/interfaces/ExecutorchConfig.md b/docs/docs/06-api-reference/interfaces/ExecutorchConfig.md index a3c18901c..7a4594980 100644 --- a/docs/docs/06-api-reference/interfaces/ExecutorchConfig.md +++ b/docs/docs/06-api-reference/interfaces/ExecutorchConfig.md @@ -1,6 +1,6 @@ # Interface: ExecutorchConfig -Defined in: [index.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L13) +Defined in: [index.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L12) Configuration that goes to the `initExecutorch`. You can pass either bare React Native or Expo configuration. @@ -11,4 +11,4 @@ You can pass either bare React Native or Expo configuration. > **resourceFetcher**: [`ResourceFetcherAdapter`](ResourceFetcherAdapter.md) -Defined in: [index.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L14) +Defined in: [index.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/index.ts#L13) diff --git a/docs/docs/06-api-reference/interfaces/ExecutorchModuleProps.md b/docs/docs/06-api-reference/interfaces/ExecutorchModuleProps.md index 7f649d985..183d10a9f 100644 --- a/docs/docs/06-api-reference/interfaces/ExecutorchModuleProps.md +++ b/docs/docs/06-api-reference/interfaces/ExecutorchModuleProps.md @@ -1,6 +1,6 @@ # Interface: ExecutorchModuleProps -Defined in: [types/executorchModule.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L11) +Defined in: [types/executorchModule.ts:10](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L10) Props for the `useExecutorchModule` hook. @@ -10,7 +10,7 @@ Props for the `useExecutorchModule` hook. > **modelSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/executorchModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L12) +Defined in: [types/executorchModule.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L11) The source of the ExecuTorch model binary. @@ -20,6 +20,6 @@ The source of the ExecuTorch model binary. > `optional` **preventLoad**: `boolean` -Defined in: [types/executorchModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L13) +Defined in: [types/executorchModule.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L12) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/ExecutorchModuleType.md b/docs/docs/06-api-reference/interfaces/ExecutorchModuleType.md index 675cd1cb8..b979c065e 100644 --- a/docs/docs/06-api-reference/interfaces/ExecutorchModuleType.md +++ b/docs/docs/06-api-reference/interfaces/ExecutorchModuleType.md @@ -1,6 +1,6 @@ # Interface: ExecutorchModuleType -Defined in: [types/executorchModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L22) +Defined in: [types/executorchModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L20) Return type for the `useExecutorchModule` hook. Manages the state and core execution methods for a general ExecuTorch model. @@ -11,7 +11,7 @@ Manages the state and core execution methods for a general ExecuTorch model. > **downloadProgress**: `number` -Defined in: [types/executorchModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L41) +Defined in: [types/executorchModule.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L39) Represents the download progress of the model binary as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the download progress of the model binary as a value between 0 and 1. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/executorchModule.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L26) +Defined in: [types/executorchModule.ts:24](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L24) Contains the error object if the model failed to load, download, or encountered a runtime error. @@ -31,7 +31,7 @@ Contains the error object if the model failed to load, download, or encountered > **forward**: (`inputTensor`) => `Promise`\<[`TensorPtr`](TensorPtr.md)[]\> -Defined in: [types/executorchModule.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L49) +Defined in: [types/executorchModule.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L47) Executes the model's forward pass with the provided input tensors. @@ -59,7 +59,7 @@ If the model is not loaded or is currently processing another request. > **isGenerating**: `boolean` -Defined in: [types/executorchModule.ts:36](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L36) +Defined in: [types/executorchModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L34) Indicates whether the model is currently processing a forward pass. @@ -69,6 +69,6 @@ Indicates whether the model is currently processing a forward pass. > **isReady**: `boolean` -Defined in: [types/executorchModule.ts:31](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L31) +Defined in: [types/executorchModule.ts:29](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/executorchModule.ts#L29) Indicates whether the ExecuTorch model binary has successfully loaded into memory and is ready for inference. diff --git a/docs/docs/06-api-reference/interfaces/GenerationConfig.md b/docs/docs/06-api-reference/interfaces/GenerationConfig.md index c1b06fbd9..e6805bda2 100644 --- a/docs/docs/06-api-reference/interfaces/GenerationConfig.md +++ b/docs/docs/06-api-reference/interfaces/GenerationConfig.md @@ -1,6 +1,6 @@ # Interface: GenerationConfig -Defined in: [types/llm.ts:247](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L247) +Defined in: [types/llm.ts:230](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L230) Object configuring generation settings. @@ -10,7 +10,7 @@ Object configuring generation settings. > `optional` **batchTimeInterval**: `number` -Defined in: [types/llm.ts:251](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L251) +Defined in: [types/llm.ts:234](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L234) Upper limit on the time interval between consecutive token batches. @@ -20,7 +20,7 @@ Upper limit on the time interval between consecutive token batches. > `optional` **outputTokenBatchSize**: `number` -Defined in: [types/llm.ts:250](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L250) +Defined in: [types/llm.ts:233](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L233) Soft upper limit on the number of tokens in each token batch (in certain cases there can be more tokens in given batch, i.e. when the batch would end with special emoji join character). @@ -30,7 +30,7 @@ Soft upper limit on the number of tokens in each token batch (in certain cases t > `optional` **temperature**: `number` -Defined in: [types/llm.ts:248](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L248) +Defined in: [types/llm.ts:231](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L231) Scales output logits by the inverse of temperature. Controls the randomness / creativity of text generation. @@ -40,6 +40,6 @@ Scales output logits by the inverse of temperature. Controls the randomness / cr > `optional` **topp**: `number` -Defined in: [types/llm.ts:249](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L249) +Defined in: [types/llm.ts:232](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L232) Only samples from the smallest set of tokens whose cumulative probability exceeds topp. diff --git a/docs/docs/06-api-reference/interfaces/ImageEmbeddingsProps.md b/docs/docs/06-api-reference/interfaces/ImageEmbeddingsProps.md index ddb620e36..849f84a5c 100644 --- a/docs/docs/06-api-reference/interfaces/ImageEmbeddingsProps.md +++ b/docs/docs/06-api-reference/interfaces/ImageEmbeddingsProps.md @@ -1,6 +1,6 @@ # Interface: ImageEmbeddingsProps -Defined in: [types/imageEmbeddings.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L12) +Defined in: [types/imageEmbeddings.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L11) Props for the `useImageEmbeddings` hook. @@ -10,7 +10,7 @@ Props for the `useImageEmbeddings` hook. > **model**: `object` -Defined in: [types/imageEmbeddings.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L13) +Defined in: [types/imageEmbeddings.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L12) An object containing the model source. @@ -24,6 +24,6 @@ An object containing the model source. > `optional` **preventLoad**: `boolean` -Defined in: [types/imageEmbeddings.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L14) +Defined in: [types/imageEmbeddings.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L13) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/ImageEmbeddingsType.md b/docs/docs/06-api-reference/interfaces/ImageEmbeddingsType.md index e52068d91..814b1086d 100644 --- a/docs/docs/06-api-reference/interfaces/ImageEmbeddingsType.md +++ b/docs/docs/06-api-reference/interfaces/ImageEmbeddingsType.md @@ -1,6 +1,6 @@ # Interface: ImageEmbeddingsType -Defined in: [types/imageEmbeddings.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L23) +Defined in: [types/imageEmbeddings.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L21) Return type for the `useImageEmbeddings` hook. Manages the state and operations for generating image embeddings (feature vectors) used in Computer Vision tasks. @@ -11,7 +11,7 @@ Manages the state and operations for generating image embeddings (feature vector > **downloadProgress**: `number` -Defined in: [types/imageEmbeddings.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L42) +Defined in: [types/imageEmbeddings.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L40) Represents the download progress of the model binary as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the download progress of the model binary as a value between 0 and 1. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/imageEmbeddings.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L27) +Defined in: [types/imageEmbeddings.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L25) Contains the error object if the model failed to load, download, or encountered a runtime error during embedding generation. @@ -31,7 +31,7 @@ Contains the error object if the model failed to load, download, or encountered > **forward**: (`imageSource`) => `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [types/imageEmbeddings.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L50) +Defined in: [types/imageEmbeddings.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L48) Executes the model's forward pass to generate embeddings (a feature vector) for the provided image. @@ -59,7 +59,7 @@ If the model is not loaded or is currently processing another image. > **isGenerating**: `boolean` -Defined in: [types/imageEmbeddings.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L37) +Defined in: [types/imageEmbeddings.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L35) Indicates whether the model is currently generating embeddings for an image. @@ -69,6 +69,6 @@ Indicates whether the model is currently generating embeddings for an image. > **isReady**: `boolean` -Defined in: [types/imageEmbeddings.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L32) +Defined in: [types/imageEmbeddings.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/imageEmbeddings.ts#L30) Indicates whether the image embeddings model is loaded and ready to process images. diff --git a/docs/docs/06-api-reference/interfaces/KokoroConfig.md b/docs/docs/06-api-reference/interfaces/KokoroConfig.md index 11ec077cf..b49e9385d 100644 --- a/docs/docs/06-api-reference/interfaces/KokoroConfig.md +++ b/docs/docs/06-api-reference/interfaces/KokoroConfig.md @@ -1,6 +1,6 @@ # Interface: KokoroConfig -Defined in: [types/tts.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L50) +Defined in: [types/tts.ts:46](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L46) Kokoro model configuration. Only the core Kokoro model sources, as phonemizer sources are included in voice configuration. @@ -11,7 +11,7 @@ Only the core Kokoro model sources, as phonemizer sources are included in voice > **durationPredictorSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/tts.ts:52](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L52) +Defined in: [types/tts.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L48) source to Kokoro's duration predictor model binary @@ -21,7 +21,7 @@ source to Kokoro's duration predictor model binary > **synthesizerSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/tts.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L53) +Defined in: [types/tts.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L49) source to Kokoro's synthesizer model binary @@ -31,6 +31,6 @@ source to Kokoro's synthesizer model binary > **type**: `"kokoro"` -Defined in: [types/tts.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L51) +Defined in: [types/tts.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L47) model type identifier diff --git a/docs/docs/06-api-reference/interfaces/KokoroVoiceExtras.md b/docs/docs/06-api-reference/interfaces/KokoroVoiceExtras.md index 52c50e189..783e9c89e 100644 --- a/docs/docs/06-api-reference/interfaces/KokoroVoiceExtras.md +++ b/docs/docs/06-api-reference/interfaces/KokoroVoiceExtras.md @@ -1,6 +1,6 @@ # Interface: KokoroVoiceExtras -Defined in: [types/tts.ts:36](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L36) +Defined in: [types/tts.ts:33](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L33) Kokoro-specific voice extra props @@ -10,7 +10,7 @@ Kokoro-specific voice extra props > **lexiconSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/tts.ts:38](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L38) +Defined in: [types/tts.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L35) source to Kokoro's lexicon binary @@ -20,6 +20,6 @@ source to Kokoro's lexicon binary > **taggerSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/tts.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L37) +Defined in: [types/tts.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L34) source to Kokoro's tagger model binary diff --git a/docs/docs/06-api-reference/interfaces/LLMConfig.md b/docs/docs/06-api-reference/interfaces/LLMConfig.md index b3cf6c625..769f64f4a 100644 --- a/docs/docs/06-api-reference/interfaces/LLMConfig.md +++ b/docs/docs/06-api-reference/interfaces/LLMConfig.md @@ -1,6 +1,6 @@ # Interface: LLMConfig -Defined in: [types/llm.ts:133](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L133) +Defined in: [types/llm.ts:123](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L123) Configuration object for initializing and customizing a Large Language Model (LLM) instance. @@ -10,7 +10,7 @@ Configuration object for initializing and customizing a Large Language Model (LL > `optional` **chatConfig**: `Partial`\<[`ChatConfig`](ChatConfig.md)\> -Defined in: [types/llm.ts:143](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L143) +Defined in: [types/llm.ts:133](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L133) Object configuring chat management, contains following properties: @@ -26,7 +26,7 @@ Object configuring chat management, contains following properties: > `optional` **generationConfig**: [`GenerationConfig`](GenerationConfig.md) -Defined in: [types/llm.ts:167](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L167) +Defined in: [types/llm.ts:157](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L157) Object configuring generation settings. @@ -44,7 +44,7 @@ Object configuring generation settings. > `optional` **toolsConfig**: [`ToolsConfig`](ToolsConfig.md) -Defined in: [types/llm.ts:154](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L154) +Defined in: [types/llm.ts:144](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L144) 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: diff --git a/docs/docs/06-api-reference/interfaces/LLMProps.md b/docs/docs/06-api-reference/interfaces/LLMProps.md index 74ee2c101..597204226 100644 --- a/docs/docs/06-api-reference/interfaces/LLMProps.md +++ b/docs/docs/06-api-reference/interfaces/LLMProps.md @@ -1,6 +1,6 @@ # Interface: LLMProps -Defined in: [types/llm.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L9) +Defined in: [types/llm.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L8) Properties for initializing and configuring a Large Language Model (LLM) instance. @@ -10,7 +10,7 @@ Properties for initializing and configuring a Large Language Model (LLM) instanc > **model**: `object` -Defined in: [types/llm.ts:10](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L10) +Defined in: [types/llm.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L9) #### modelSource @@ -36,6 +36,6 @@ Defined in: [types/llm.ts:10](https://github.com/software-mansion/react-native-e > `optional` **preventLoad**: `boolean` -Defined in: [types/llm.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L27) +Defined in: [types/llm.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L26) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/LLMType.md b/docs/docs/06-api-reference/interfaces/LLMType.md index 16f5cbf88..f61e74e51 100644 --- a/docs/docs/06-api-reference/interfaces/LLMType.md +++ b/docs/docs/06-api-reference/interfaces/LLMType.md @@ -1,6 +1,6 @@ # Interface: LLMType -Defined in: [types/llm.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L35) +Defined in: [types/llm.ts:33](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L33) React hook for managing a Large Language Model (LLM) instance. @@ -10,7 +10,7 @@ React hook for managing a Large Language Model (LLM) instance. > **configure**: (`configuration`) => `void` -Defined in: [types/llm.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L77) +Defined in: [types/llm.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L74) Configures chat and tool calling. See [Configuring the model](https://docs.swmansion.com/react-native-executorch/docs/hooks/natural-language-processing/useLLM#configuring-the-model) for details. @@ -33,7 +33,7 @@ Configuration object containing `chatConfig`, `toolsConfig`, and `generationConf > **deleteMessage**: (`index`) => `void` -Defined in: [types/llm.ts:120](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L120) +Defined in: [types/llm.ts:111](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L111) Deletes all messages starting with message on `index` position. After deletion `messageHistory` will be updated. @@ -55,7 +55,7 @@ The index of the message to delete from history. > **downloadProgress**: `number` -Defined in: [types/llm.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L64) +Defined in: [types/llm.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L62) Represents the download progress as a value between 0 and 1, indicating the extent of the model file retrieval. @@ -65,7 +65,7 @@ Represents the download progress as a value between 0 and 1, indicating the exte > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/llm.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L69) +Defined in: [types/llm.ts:67](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L67) Contains the error message if the model failed to load. @@ -75,7 +75,7 @@ Contains the error message if the model failed to load. > **generate**: (`messages`, `tools?`) => `Promise`\<`string`\> -Defined in: [types/llm.ts:92](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L92) +Defined in: [types/llm.ts:87](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L87) Runs model to complete chat passed in `messages` argument. It doesn't manage conversation context. @@ -105,7 +105,7 @@ The generated tokens as `string`. > **getGeneratedTokenCount**: () => `number` -Defined in: [types/llm.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L84) +Defined in: [types/llm.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L80) Returns the number of tokens generated so far in the current generation. @@ -121,7 +121,7 @@ The count of generated tokens. > **getPromptTokenCount**: () => `number` -Defined in: [types/llm.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L104) +Defined in: [types/llm.ts:97](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L97) Returns the number of prompt tokens in the last message. @@ -137,7 +137,7 @@ The count of prompt token. > **getTotalTokenCount**: () => `number` -Defined in: [types/llm.ts:98](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L98) +Defined in: [types/llm.ts:92](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L92) Returns the number of total tokens from the previous generation.This is a sum of prompt tokens and generated tokens. @@ -153,7 +153,7 @@ The count of prompt and generated tokens. > **interrupt**: () => `void` -Defined in: [types/llm.ts:125](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L125) +Defined in: [types/llm.ts:116](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L116) Function to interrupt the current inference. @@ -167,7 +167,7 @@ Function to interrupt the current inference. > **isGenerating**: `boolean` -Defined in: [types/llm.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L59) +Defined in: [types/llm.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L57) Indicates whether the model is currently generating a response. @@ -177,7 +177,7 @@ Indicates whether the model is currently generating a response. > **isReady**: `boolean` -Defined in: [types/llm.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L54) +Defined in: [types/llm.ts:52](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L52) Indicates whether the model is ready. @@ -187,7 +187,7 @@ Indicates whether the model is ready. > **messageHistory**: [`Message`](Message.md)[] -Defined in: [types/llm.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L39) +Defined in: [types/llm.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L37) History containing all messages in conversation. This field is updated after model responds to sendMessage. @@ -197,7 +197,7 @@ History containing all messages in conversation. This field is updated after mod > **response**: `string` -Defined in: [types/llm.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L44) +Defined in: [types/llm.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L42) State of the generated response. This field is updated with each token generated by the model. @@ -207,7 +207,7 @@ State of the generated response. This field is updated with each token generated > **sendMessage**: (`message`) => `Promise`\<`string`\> -Defined in: [types/llm.ts:113](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L113) +Defined in: [types/llm.ts:105](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L105) Function to add user message to conversation. After model responds, `messageHistory` will be updated with both user message and model response. @@ -232,6 +232,6 @@ The model's response as a `string`. > **token**: `string` -Defined in: [types/llm.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L49) +Defined in: [types/llm.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L47) The most recently generated token. diff --git a/docs/docs/06-api-reference/interfaces/Message.md b/docs/docs/06-api-reference/interfaces/Message.md index 85821e43e..365435055 100644 --- a/docs/docs/06-api-reference/interfaces/Message.md +++ b/docs/docs/06-api-reference/interfaces/Message.md @@ -1,6 +1,6 @@ # Interface: Message -Defined in: [types/llm.ts:184](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L184) +Defined in: [types/llm.ts:172](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L172) Represents a message in the conversation. @@ -10,7 +10,7 @@ Represents a message in the conversation. > **content**: `string` -Defined in: [types/llm.ts:186](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L186) +Defined in: [types/llm.ts:174](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L174) Content of the message. @@ -20,6 +20,6 @@ Content of the message. > **role**: [`MessageRole`](../type-aliases/MessageRole.md) -Defined in: [types/llm.ts:185](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L185) +Defined in: [types/llm.ts:173](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L173) Role of the message sender of type `MessageRole`. diff --git a/docs/docs/06-api-reference/interfaces/OCRDetection.md b/docs/docs/06-api-reference/interfaces/OCRDetection.md index 65b7d5ede..e49f61b46 100644 --- a/docs/docs/06-api-reference/interfaces/OCRDetection.md +++ b/docs/docs/06-api-reference/interfaces/OCRDetection.md @@ -1,6 +1,6 @@ # Interface: OCRDetection -Defined in: [types/ocr.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L14) +Defined in: [types/ocr.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L13) OCRDetection represents a single detected text instance in an image, including its bounding box, recognized text, and confidence score. @@ -11,7 +11,7 @@ including its bounding box, recognized text, and confidence score. > **bbox**: [`Point`](Point.md)[] -Defined in: [types/ocr.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L15) +Defined in: [types/ocr.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L14) An array of points defining the bounding box around the detected text. @@ -21,7 +21,7 @@ An array of points defining the bounding box around the detected text. > **score**: `number` -Defined in: [types/ocr.ts:17](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L17) +Defined in: [types/ocr.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L16) The confidence score of the OCR detection, ranging from 0 to 1. @@ -31,6 +31,6 @@ The confidence score of the OCR detection, ranging from 0 to 1. > **text**: `string` -Defined in: [types/ocr.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L16) +Defined in: [types/ocr.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L15) The recognized text within the bounding box. diff --git a/docs/docs/06-api-reference/interfaces/OCRProps.md b/docs/docs/06-api-reference/interfaces/OCRProps.md index f894705a5..66a21e94f 100644 --- a/docs/docs/06-api-reference/interfaces/OCRProps.md +++ b/docs/docs/06-api-reference/interfaces/OCRProps.md @@ -1,6 +1,6 @@ # Interface: OCRProps -Defined in: [types/ocr.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L37) +Defined in: [types/ocr.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L34) Configuration properties for the `useOCR` hook. @@ -14,7 +14,7 @@ Configuration properties for the `useOCR` hook. > **model**: `object` -Defined in: [types/ocr.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L41) +Defined in: [types/ocr.ts:38](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L38) Object containing the necessary model sources and configuration for the OCR pipeline. @@ -42,7 +42,7 @@ The language configuration enum for the OCR model (e.g., English, Polish, etc.). > `optional` **preventLoad**: `boolean` -Defined in: [types/ocr.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L62) +Defined in: [types/ocr.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L59) Boolean that can prevent automatic model loading (and downloading the data if loaded for the first time) after running the hook. Defaults to `false`. diff --git a/docs/docs/06-api-reference/interfaces/OCRType.md b/docs/docs/06-api-reference/interfaces/OCRType.md index 4a32da953..735cac4bb 100644 --- a/docs/docs/06-api-reference/interfaces/OCRType.md +++ b/docs/docs/06-api-reference/interfaces/OCRType.md @@ -1,6 +1,6 @@ # Interface: OCRType -Defined in: [types/ocr.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L84) +Defined in: [types/ocr.ts:79](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L79) Return type for the `useOCR` hook. Manages the state and operations for Optical Character Recognition (OCR). @@ -11,7 +11,7 @@ Manages the state and operations for Optical Character Recognition (OCR). > **downloadProgress**: `number` -Defined in: [types/ocr.ts:103](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L103) +Defined in: [types/ocr.ts:98](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L98) Represents the total download progress of the model binaries as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the total download progress of the model binaries as a value between > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/ocr.ts:88](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L88) +Defined in: [types/ocr.ts:83](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L83) Contains the error object if the models failed to load, download, or encountered a runtime error during recognition. @@ -31,7 +31,7 @@ Contains the error object if the models failed to load, download, or encountered > **forward**: (`imageSource`) => `Promise`\<[`OCRDetection`](OCRDetection.md)[]\> -Defined in: [types/ocr.ts:111](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L111) +Defined in: [types/ocr.ts:106](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L106) Executes the OCR pipeline (detection and recognition) on the provided image. @@ -59,7 +59,7 @@ If the models are not loaded or are currently processing another image. > **isGenerating**: `boolean` -Defined in: [types/ocr.ts:98](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L98) +Defined in: [types/ocr.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L93) Indicates whether the model is currently processing an image. @@ -69,6 +69,6 @@ Indicates whether the model is currently processing an image. > **isReady**: `boolean` -Defined in: [types/ocr.ts:93](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L93) +Defined in: [types/ocr.ts:88](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L88) Indicates whether both detector and recognizer models are loaded and ready to process images. diff --git a/docs/docs/06-api-reference/interfaces/ObjectDetectionProps.md b/docs/docs/06-api-reference/interfaces/ObjectDetectionProps.md index 069c4d3e1..f3c159e86 100644 --- a/docs/docs/06-api-reference/interfaces/ObjectDetectionProps.md +++ b/docs/docs/06-api-reference/interfaces/ObjectDetectionProps.md @@ -1,6 +1,6 @@ # Interface: ObjectDetectionProps -Defined in: [types/objectDetection.ts:140](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L140) +Defined in: [types/objectDetection.ts:136](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L136) Props for the `useObjectDetection` hook. @@ -10,7 +10,7 @@ Props for the `useObjectDetection` hook. > **model**: `object` -Defined in: [types/objectDetection.ts:141](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L141) +Defined in: [types/objectDetection.ts:137](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L137) An object containing the model source. @@ -24,6 +24,6 @@ An object containing the model source. > `optional` **preventLoad**: `boolean` -Defined in: [types/objectDetection.ts:142](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L142) +Defined in: [types/objectDetection.ts:138](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L138) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/ObjectDetectionType.md b/docs/docs/06-api-reference/interfaces/ObjectDetectionType.md index a9f28e5cf..4423063bc 100644 --- a/docs/docs/06-api-reference/interfaces/ObjectDetectionType.md +++ b/docs/docs/06-api-reference/interfaces/ObjectDetectionType.md @@ -1,6 +1,6 @@ # Interface: ObjectDetectionType -Defined in: [types/objectDetection.ts:151](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L151) +Defined in: [types/objectDetection.ts:146](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L146) Return type for the `useObjectDetection` hook. Manages the state and operations for Computer Vision object detection tasks. @@ -11,7 +11,7 @@ Manages the state and operations for Computer Vision object detection tasks. > **downloadProgress**: `number` -Defined in: [types/objectDetection.ts:170](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L170) +Defined in: [types/objectDetection.ts:165](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L165) Represents the download progress of the model binary as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the download progress of the model binary as a value between 0 and 1. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/objectDetection.ts:155](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L155) +Defined in: [types/objectDetection.ts:150](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L150) Contains the error object if the model failed to load, download, or encountered a runtime error during detection. @@ -31,7 +31,7 @@ Contains the error object if the model failed to load, download, or encountered > **forward**: (`imageSource`, `detectionThreshold?`) => `Promise`\<[`Detection`](Detection.md)[]\> -Defined in: [types/objectDetection.ts:179](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L179) +Defined in: [types/objectDetection.ts:174](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L174) Executes the model's forward pass to detect objects within the provided image. @@ -65,7 +65,7 @@ If the model is not loaded or is currently processing another image. > **isGenerating**: `boolean` -Defined in: [types/objectDetection.ts:165](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L165) +Defined in: [types/objectDetection.ts:160](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L160) Indicates whether the model is currently processing an image. @@ -75,6 +75,6 @@ Indicates whether the model is currently processing an image. > **isReady**: `boolean` -Defined in: [types/objectDetection.ts:160](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L160) +Defined in: [types/objectDetection.ts:155](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/objectDetection.ts#L155) Indicates whether the object detection model is loaded and ready to process images. diff --git a/docs/docs/06-api-reference/interfaces/Point.md b/docs/docs/06-api-reference/interfaces/Point.md index 528835a88..b0028d9d5 100644 --- a/docs/docs/06-api-reference/interfaces/Point.md +++ b/docs/docs/06-api-reference/interfaces/Point.md @@ -1,6 +1,6 @@ # Interface: Point -Defined in: [types/ocr.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L27) +Defined in: [types/ocr.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L25) Point represents a coordinate in 2D space. @@ -10,7 +10,7 @@ Point represents a coordinate in 2D space. > **x**: `number` -Defined in: [types/ocr.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L28) +Defined in: [types/ocr.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L26) The x-coordinate of the point. @@ -20,6 +20,6 @@ The x-coordinate of the point. > **y**: `number` -Defined in: [types/ocr.ts:29](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L29) +Defined in: [types/ocr.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L27) The y-coordinate of the point. diff --git a/docs/docs/06-api-reference/interfaces/ResourceFetcherAdapter.md b/docs/docs/06-api-reference/interfaces/ResourceFetcherAdapter.md index d98b5015d..abbe8b5fa 100644 --- a/docs/docs/06-api-reference/interfaces/ResourceFetcherAdapter.md +++ b/docs/docs/06-api-reference/interfaces/ResourceFetcherAdapter.md @@ -1,6 +1,6 @@ # Interface: ResourceFetcherAdapter -Defined in: [utils/ResourceFetcher.ts:18](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L18) +Defined in: [utils/ResourceFetcher.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L16) Adapter interface for resource fetching operations. **Required Methods:** @@ -19,7 +19,7 @@ these two methods for the library to function correctly. > **fetch**(`callback`, ...`sources`): `Promise`\<`string`[] \| `null`\> -Defined in: [utils/ResourceFetcher.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L30) +Defined in: [utils/ResourceFetcher.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L26) Fetches resources (remote URLs, local files or embedded assets), downloads or stores them locally for use by React Native ExecuTorch. @@ -54,7 +54,7 @@ If the fetch was interrupted, it returns a promise which resolves to `null`. > **readAsString**(`path`): `Promise`\<`string`\> -Defined in: [utils/ResourceFetcher.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L44) +Defined in: [utils/ResourceFetcher.ts:38](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcher.ts#L38) Read file contents as a string. diff --git a/docs/docs/06-api-reference/interfaces/ResourceSourceExtended.md b/docs/docs/06-api-reference/interfaces/ResourceSourceExtended.md index 0789456b5..837e08e49 100644 --- a/docs/docs/06-api-reference/interfaces/ResourceSourceExtended.md +++ b/docs/docs/06-api-reference/interfaces/ResourceSourceExtended.md @@ -1,6 +1,6 @@ # Interface: ResourceSourceExtended -Defined in: [utils/ResourceFetcherUtils.ts:72](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L72) +Defined in: [utils/ResourceFetcherUtils.ts:70](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L70) Extended interface for resource sources, tracking download state and file locations. @@ -10,7 +10,7 @@ Extended interface for resource sources, tracking download state and file locati > `optional` **cacheFileUri**: `string` -Defined in: [utils/ResourceFetcherUtils.ts:106](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L106) +Defined in: [utils/ResourceFetcherUtils.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L104) The URI where the file is cached. @@ -20,7 +20,7 @@ The URI where the file is cached. > `optional` **callback**: (`downloadProgress`) => `void` -Defined in: [utils/ResourceFetcherUtils.ts:86](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L86) +Defined in: [utils/ResourceFetcherUtils.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L84) Optional callback to report download progress (0 to 1). @@ -40,7 +40,7 @@ Optional callback to report download progress (0 to 1). > `optional` **fileUri**: `string` -Defined in: [utils/ResourceFetcherUtils.ts:101](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L101) +Defined in: [utils/ResourceFetcherUtils.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L99) The local file URI where the resource is stored. @@ -50,7 +50,7 @@ The local file URI where the resource is stored. > `optional` **next**: `ResourceSourceExtended` -Defined in: [utils/ResourceFetcherUtils.ts:111](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L111) +Defined in: [utils/ResourceFetcherUtils.ts:109](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L109) Reference to the next resource in a linked chain of resources. @@ -60,7 +60,7 @@ Reference to the next resource in a linked chain of resources. > **results**: `string`[] -Defined in: [utils/ResourceFetcherUtils.ts:91](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L91) +Defined in: [utils/ResourceFetcherUtils.ts:89](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L89) Array of paths or identifiers for the resulting files. @@ -70,7 +70,7 @@ Array of paths or identifiers for the resulting files. > **source**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [utils/ResourceFetcherUtils.ts:76](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L76) +Defined in: [utils/ResourceFetcherUtils.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L74) The original source definition. @@ -80,7 +80,7 @@ The original source definition. > **sourceType**: [`SourceType`](../enumerations/SourceType.md) -Defined in: [utils/ResourceFetcherUtils.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L81) +Defined in: [utils/ResourceFetcherUtils.ts:79](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L79) The type of the source (local, remote, etc.). @@ -90,6 +90,6 @@ The type of the source (local, remote, etc.). > `optional` **uri**: `string` -Defined in: [utils/ResourceFetcherUtils.ts:96](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L96) +Defined in: [utils/ResourceFetcherUtils.ts:94](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L94) The URI of the resource. diff --git a/docs/docs/06-api-reference/interfaces/Segment.md b/docs/docs/06-api-reference/interfaces/Segment.md index 19916521d..188217e2c 100644 --- a/docs/docs/06-api-reference/interfaces/Segment.md +++ b/docs/docs/06-api-reference/interfaces/Segment.md @@ -1,6 +1,6 @@ # Interface: Segment -Defined in: [types/vad.ts:24](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L24) +Defined in: [types/vad.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L22) Represents a detected audio segment with start and end timestamps. @@ -10,7 +10,7 @@ Represents a detected audio segment with start and end timestamps. > **end**: `number` -Defined in: [types/vad.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L26) +Defined in: [types/vad.ts:24](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L24) End time of the segment in seconds. @@ -20,6 +20,6 @@ End time of the segment in seconds. > **start**: `number` -Defined in: [types/vad.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L25) +Defined in: [types/vad.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L23) Start time of the segment in seconds. diff --git a/docs/docs/06-api-reference/interfaces/SemanticSegmentationProps.md b/docs/docs/06-api-reference/interfaces/SemanticSegmentationProps.md index 9d7f20437..edb50cdd4 100644 --- a/docs/docs/06-api-reference/interfaces/SemanticSegmentationProps.md +++ b/docs/docs/06-api-reference/interfaces/SemanticSegmentationProps.md @@ -1,6 +1,6 @@ # Interface: SemanticSegmentationProps\ -Defined in: [types/semanticSegmentation.ts:113](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L113) +Defined in: [types/semanticSegmentation.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L104) Props for the `useSemanticSegmentation` hook. @@ -18,7 +18,7 @@ A [SemanticSegmentationModelSources](../type-aliases/SemanticSegmentationModelSo > **model**: `C` -Defined in: [types/semanticSegmentation.ts:116](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L116) +Defined in: [types/semanticSegmentation.ts:107](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L107) The model config containing `modelName` and `modelSource`. @@ -28,6 +28,6 @@ The model config containing `modelName` and `modelSource`. > `optional` **preventLoad**: `boolean` -Defined in: [types/semanticSegmentation.ts:117](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L117) +Defined in: [types/semanticSegmentation.ts:108](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L108) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/SemanticSegmentationType.md b/docs/docs/06-api-reference/interfaces/SemanticSegmentationType.md index e5628b1e3..cbf7eaf63 100644 --- a/docs/docs/06-api-reference/interfaces/SemanticSegmentationType.md +++ b/docs/docs/06-api-reference/interfaces/SemanticSegmentationType.md @@ -1,6 +1,6 @@ # Interface: SemanticSegmentationType\ -Defined in: [types/semanticSegmentation.ts:128](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L128) +Defined in: [types/semanticSegmentation.ts:117](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L117) Return type for the `useSemanticSegmentation` hook. Manages the state and operations for semantic segmentation models. @@ -19,7 +19,7 @@ The [LabelEnum](../type-aliases/LabelEnum.md) representing the model's class lab > **downloadProgress**: `number` -Defined in: [types/semanticSegmentation.ts:147](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L147) +Defined in: [types/semanticSegmentation.ts:136](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L136) Represents the download progress of the model binary as a value between 0 and 1. @@ -29,7 +29,7 @@ Represents the download progress of the model binary as a value between 0 and 1. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/semanticSegmentation.ts:132](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L132) +Defined in: [types/semanticSegmentation.ts:121](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L121) Contains the error object if the model failed to load, download, or encountered a runtime error during segmentation. @@ -39,7 +39,7 @@ Contains the error object if the model failed to load, download, or encountered > **forward**: \<`K`\>(`imageSource`, `classesOfInterest?`, `resizeToInput?`) => `Promise`\<`Record`\<`"ARGMAX"`, `Int32Array`\<`ArrayBufferLike`\>\> & `Record`\<`K`, `Float32Array`\<`ArrayBufferLike`\>\>\> -Defined in: [types/semanticSegmentation.ts:157](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L157) +Defined in: [types/semanticSegmentation.ts:146](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L146) Executes the model's forward pass to perform semantic segmentation on the provided image. @@ -85,7 +85,7 @@ If the model is not loaded or is currently processing another image. > **isGenerating**: `boolean` -Defined in: [types/semanticSegmentation.ts:142](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L142) +Defined in: [types/semanticSegmentation.ts:131](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L131) Indicates whether the model is currently processing an image. @@ -95,6 +95,6 @@ Indicates whether the model is currently processing an image. > **isReady**: `boolean` -Defined in: [types/semanticSegmentation.ts:137](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L137) +Defined in: [types/semanticSegmentation.ts:126](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L126) Indicates whether the segmentation model is loaded and ready to process images. diff --git a/docs/docs/06-api-reference/interfaces/SpeechToTextModelConfig.md b/docs/docs/06-api-reference/interfaces/SpeechToTextModelConfig.md index f919d07e3..3dd044e6b 100644 --- a/docs/docs/06-api-reference/interfaces/SpeechToTextModelConfig.md +++ b/docs/docs/06-api-reference/interfaces/SpeechToTextModelConfig.md @@ -1,6 +1,6 @@ # Interface: SpeechToTextModelConfig -Defined in: [types/stt.ts:263](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L263) +Defined in: [types/stt.ts:255](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L255) Configuration for Speech to Text model. @@ -10,7 +10,7 @@ Configuration for Speech to Text model. > **decoderSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/stt.ts:277](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L277) +Defined in: [types/stt.ts:269](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L269) A string that specifies the location of a `.pte` file for the decoder. @@ -20,7 +20,7 @@ A string that specifies the location of a `.pte` file for the decoder. > **encoderSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/stt.ts:272](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L272) +Defined in: [types/stt.ts:264](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L264) A string that specifies the location of a `.pte` file for the encoder. @@ -30,7 +30,7 @@ A string that specifies the location of a `.pte` file for the encoder. > **isMultilingual**: `boolean` -Defined in: [types/stt.ts:267](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L267) +Defined in: [types/stt.ts:259](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L259) A boolean flag indicating whether the model supports multiple languages. @@ -40,6 +40,6 @@ A boolean flag indicating whether the model supports multiple languages. > **tokenizerSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/stt.ts:282](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L282) +Defined in: [types/stt.ts:274](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L274) A string that specifies the location to the tokenizer for the model. diff --git a/docs/docs/06-api-reference/interfaces/SpeechToTextProps.md b/docs/docs/06-api-reference/interfaces/SpeechToTextProps.md index 735e8c5d1..355bf1d4b 100644 --- a/docs/docs/06-api-reference/interfaces/SpeechToTextProps.md +++ b/docs/docs/06-api-reference/interfaces/SpeechToTextProps.md @@ -1,6 +1,6 @@ # Interface: SpeechToTextProps -Defined in: [types/stt.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L9) +Defined in: [types/stt.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L8) Configuration for Speech to Text model. @@ -10,7 +10,7 @@ Configuration for Speech to Text model. > **model**: [`SpeechToTextModelConfig`](SpeechToTextModelConfig.md) -Defined in: [types/stt.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L13) +Defined in: [types/stt.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L12) Configuration object containing model sources. @@ -20,6 +20,6 @@ Configuration object containing model sources. > `optional` **preventLoad**: `boolean` -Defined in: [types/stt.ts:17](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L17) +Defined in: [types/stt.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L16) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/SpeechToTextType.md b/docs/docs/06-api-reference/interfaces/SpeechToTextType.md index ef4ec766d..2639ffcad 100644 --- a/docs/docs/06-api-reference/interfaces/SpeechToTextType.md +++ b/docs/docs/06-api-reference/interfaces/SpeechToTextType.md @@ -1,6 +1,6 @@ # Interface: SpeechToTextType -Defined in: [types/stt.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L25) +Defined in: [types/stt.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L23) React hook for managing Speech to Text (STT) instance. @@ -10,7 +10,7 @@ React hook for managing Speech to Text (STT) instance. > **downloadProgress**: `number` -Defined in: [types/stt.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L44) +Defined in: [types/stt.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L42) Tracks the progress of the model download process. @@ -20,7 +20,7 @@ Tracks the progress of the model download process. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/stt.ts:29](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L29) +Defined in: [types/stt.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L27) Contains the error message if the model failed to load. @@ -30,7 +30,7 @@ Contains the error message if the model failed to load. > **isGenerating**: `boolean` -Defined in: [types/stt.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L39) +Defined in: [types/stt.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L37) Indicates whether the model is currently processing an inference. @@ -40,7 +40,7 @@ Indicates whether the model is currently processing an inference. > **isReady**: `boolean` -Defined in: [types/stt.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L34) +Defined in: [types/stt.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L32) Indicates whether the model has successfully loaded and is ready for inference. @@ -50,7 +50,7 @@ Indicates whether the model has successfully loaded and is ready for inference. > **decode**(`tokens`, `encoderOutput`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [types/stt.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L59) +Defined in: [types/stt.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L57) Runs the decoder of the model. @@ -80,7 +80,7 @@ A promise resolving to the decoded text. > **encode**(`waveform`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [types/stt.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L51) +Defined in: [types/stt.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L49) Runs the encoding part of the model on the provided waveform. @@ -104,7 +104,7 @@ A promise resolving to the encoded data. > **stream**(`options?`): `AsyncGenerator`\<\{ `committed`: [`TranscriptionResult`](TranscriptionResult.md); `nonCommitted`: [`TranscriptionResult`](TranscriptionResult.md); \}, `void`, `unknown`\> -Defined in: [types/stt.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L84) +Defined in: [types/stt.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L82) Starts a streaming transcription process. Use in combination with `streamInsert` to feed audio chunks and `streamStop` to end the stream. @@ -131,7 +131,7 @@ Both `committed` and `nonCommitted` are of type `TranscriptionResult` > **streamInsert**(`waveform`): `void` -Defined in: [types/stt.ts:97](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L97) +Defined in: [types/stt.ts:95](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L95) Inserts a chunk of audio data (sampled at 16kHz) into the ongoing streaming transcription. @@ -153,7 +153,7 @@ The audio chunk to insert. > **streamStop**(): `void` -Defined in: [types/stt.ts:102](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L102) +Defined in: [types/stt.ts:100](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L100) Stops the ongoing streaming transcription process. @@ -167,7 +167,7 @@ Stops the ongoing streaming transcription process. > **transcribe**(`waveform`, `options?`): `Promise`\<[`TranscriptionResult`](TranscriptionResult.md)\> -Defined in: [types/stt.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L71) +Defined in: [types/stt.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L69) Starts a transcription process for a given input array, which should be a waveform at 16kHz. diff --git a/docs/docs/06-api-reference/interfaces/StyleTransferProps.md b/docs/docs/06-api-reference/interfaces/StyleTransferProps.md index 97655a44b..8bd83ea21 100644 --- a/docs/docs/06-api-reference/interfaces/StyleTransferProps.md +++ b/docs/docs/06-api-reference/interfaces/StyleTransferProps.md @@ -1,6 +1,6 @@ # Interface: StyleTransferProps -Defined in: [types/styleTransfer.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L12) +Defined in: [types/styleTransfer.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L11) Configuration properties for the `useStyleTransfer` hook. @@ -10,7 +10,7 @@ Configuration properties for the `useStyleTransfer` hook. > **model**: `object` -Defined in: [types/styleTransfer.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L13) +Defined in: [types/styleTransfer.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L12) Object containing the `modelSource` for the style transfer model. @@ -24,6 +24,6 @@ Object containing the `modelSource` for the style transfer model. > `optional` **preventLoad**: `boolean` -Defined in: [types/styleTransfer.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L14) +Defined in: [types/styleTransfer.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L13) Boolean that can prevent automatic model loading (and downloading the data if loaded for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/StyleTransferType.md b/docs/docs/06-api-reference/interfaces/StyleTransferType.md index 4b50a43f7..4a168dceb 100644 --- a/docs/docs/06-api-reference/interfaces/StyleTransferType.md +++ b/docs/docs/06-api-reference/interfaces/StyleTransferType.md @@ -1,6 +1,6 @@ # Interface: StyleTransferType -Defined in: [types/styleTransfer.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L23) +Defined in: [types/styleTransfer.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L21) Return type for the `useStyleTransfer` hook. Manages the state and operations for applying artistic style transfer to images. @@ -11,7 +11,7 @@ Manages the state and operations for applying artistic style transfer to images. > **downloadProgress**: `number` -Defined in: [types/styleTransfer.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L42) +Defined in: [types/styleTransfer.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L40) Represents the download progress of the model binary as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the download progress of the model binary as a value between 0 and 1. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/styleTransfer.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L27) +Defined in: [types/styleTransfer.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L25) Contains the error object if the model failed to load, download, or encountered a runtime error during style transfer. @@ -31,7 +31,7 @@ Contains the error object if the model failed to load, download, or encountered > **forward**: (`imageSource`) => `Promise`\<`string`\> -Defined in: [types/styleTransfer.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L50) +Defined in: [types/styleTransfer.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L48) Executes the model's forward pass to apply the specific artistic style to the provided image. @@ -59,7 +59,7 @@ If the model is not loaded or is currently processing another image. > **isGenerating**: `boolean` -Defined in: [types/styleTransfer.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L37) +Defined in: [types/styleTransfer.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L35) Indicates whether the model is currently processing an image. @@ -69,6 +69,6 @@ Indicates whether the model is currently processing an image. > **isReady**: `boolean` -Defined in: [types/styleTransfer.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L32) +Defined in: [types/styleTransfer.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/styleTransfer.ts#L30) Indicates whether the style transfer model is loaded and ready to process images. diff --git a/docs/docs/06-api-reference/interfaces/TensorPtr.md b/docs/docs/06-api-reference/interfaces/TensorPtr.md index df80727f1..0213ecdc1 100644 --- a/docs/docs/06-api-reference/interfaces/TensorPtr.md +++ b/docs/docs/06-api-reference/interfaces/TensorPtr.md @@ -1,6 +1,6 @@ # Interface: TensorPtr -Defined in: [types/common.ts:134](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L134) +Defined in: [types/common.ts:130](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L130) Represents a pointer to a tensor, including its data buffer, size dimensions, and scalar type. @@ -10,7 +10,7 @@ Represents a pointer to a tensor, including its data buffer, size dimensions, an > **dataPtr**: [`TensorBuffer`](../type-aliases/TensorBuffer.md) -Defined in: [types/common.ts:135](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L135) +Defined in: [types/common.ts:131](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L131) The data buffer of the tensor. @@ -20,7 +20,7 @@ The data buffer of the tensor. > **scalarType**: [`ScalarType`](../enumerations/ScalarType.md) -Defined in: [types/common.ts:137](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L137) +Defined in: [types/common.ts:133](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L133) The scalar type of the tensor, as defined in the `ScalarType` enum. @@ -30,6 +30,6 @@ The scalar type of the tensor, as defined in the `ScalarType` enum. > **sizes**: `number`[] -Defined in: [types/common.ts:136](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L136) +Defined in: [types/common.ts:132](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L132) An array representing the size of each dimension of the tensor. diff --git a/docs/docs/06-api-reference/interfaces/TextEmbeddingsProps.md b/docs/docs/06-api-reference/interfaces/TextEmbeddingsProps.md index 539d421e7..eed8c571e 100644 --- a/docs/docs/06-api-reference/interfaces/TextEmbeddingsProps.md +++ b/docs/docs/06-api-reference/interfaces/TextEmbeddingsProps.md @@ -1,6 +1,6 @@ # Interface: TextEmbeddingsProps -Defined in: [types/textEmbeddings.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L11) +Defined in: [types/textEmbeddings.ts:10](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L10) Props for the useTextEmbeddings hook. @@ -10,7 +10,7 @@ Props for the useTextEmbeddings hook. > **model**: `object` -Defined in: [types/textEmbeddings.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L12) +Defined in: [types/textEmbeddings.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L11) An object containing the model and tokenizer sources. @@ -32,6 +32,6 @@ The source of the tokenizer JSON file. > `optional` **preventLoad**: `boolean` -Defined in: [types/textEmbeddings.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L22) +Defined in: [types/textEmbeddings.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L21) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/TextEmbeddingsType.md b/docs/docs/06-api-reference/interfaces/TextEmbeddingsType.md index 541d8bc09..b1baff8fb 100644 --- a/docs/docs/06-api-reference/interfaces/TextEmbeddingsType.md +++ b/docs/docs/06-api-reference/interfaces/TextEmbeddingsType.md @@ -1,6 +1,6 @@ # Interface: TextEmbeddingsType -Defined in: [types/textEmbeddings.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L30) +Defined in: [types/textEmbeddings.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L28) React hook state and methods for managing a Text Embeddings model instance. @@ -10,7 +10,7 @@ React hook state and methods for managing a Text Embeddings model instance. > **downloadProgress**: `number` -Defined in: [types/textEmbeddings.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L49) +Defined in: [types/textEmbeddings.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L47) Tracks the progress of the model download process (value between 0 and 1). @@ -20,7 +20,7 @@ Tracks the progress of the model download process (value between 0 and 1). > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/textEmbeddings.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L34) +Defined in: [types/textEmbeddings.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L32) Contains the error message if the model failed to load or during inference. @@ -30,7 +30,7 @@ Contains the error message if the model failed to load or during inference. > **isGenerating**: `boolean` -Defined in: [types/textEmbeddings.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L44) +Defined in: [types/textEmbeddings.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L42) Indicates whether the model is currently generating embeddings. @@ -40,7 +40,7 @@ Indicates whether the model is currently generating embeddings. > **isReady**: `boolean` -Defined in: [types/textEmbeddings.ts:39](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L39) +Defined in: [types/textEmbeddings.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L37) Indicates whether the embeddings model has successfully loaded and is ready for inference. @@ -50,7 +50,7 @@ Indicates whether the embeddings model has successfully loaded and is ready for > **forward**(`input`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [types/textEmbeddings.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L57) +Defined in: [types/textEmbeddings.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/textEmbeddings.ts#L55) Runs the text embeddings model on the provided input string. diff --git a/docs/docs/06-api-reference/interfaces/TextToImageProps.md b/docs/docs/06-api-reference/interfaces/TextToImageProps.md index 88f61fb7b..d093f2a5f 100644 --- a/docs/docs/06-api-reference/interfaces/TextToImageProps.md +++ b/docs/docs/06-api-reference/interfaces/TextToImageProps.md @@ -1,6 +1,6 @@ # Interface: TextToImageProps -Defined in: [types/tti.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L9) +Defined in: [types/tti.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L8) Configuration properties for the `useTextToImage` hook. @@ -10,7 +10,7 @@ Configuration properties for the `useTextToImage` hook. > `optional` **inferenceCallback**: (`stepIdx`) => `void` -Defined in: [types/tti.ts:31](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L31) +Defined in: [types/tti.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L30) Optional callback function that is triggered after each diffusion inference step. Useful for updating a progress bar during image generation. @@ -33,7 +33,7 @@ The index of the current inference step. > **model**: `object` -Defined in: [types/tti.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L13) +Defined in: [types/tti.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L12) Object containing the required model sources for the diffusion pipeline. @@ -73,7 +73,7 @@ Source for the UNet (noise predictor) model binary. > `optional` **preventLoad**: `boolean` -Defined in: [types/tti.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L37) +Defined in: [types/tti.ts:36](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L36) Boolean that can prevent automatic model loading (and downloading the data if loaded for the first time) after running the hook. Defaults to `false`. diff --git a/docs/docs/06-api-reference/interfaces/TextToImageType.md b/docs/docs/06-api-reference/interfaces/TextToImageType.md index 5d29900ce..f1029e013 100644 --- a/docs/docs/06-api-reference/interfaces/TextToImageType.md +++ b/docs/docs/06-api-reference/interfaces/TextToImageType.md @@ -1,6 +1,6 @@ # Interface: TextToImageType -Defined in: [types/tti.ts:46](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L46) +Defined in: [types/tti.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L44) Return type for the `useTextToImage` hook. Manages the state and operations for generating images from text prompts using a diffusion model pipeline. @@ -11,7 +11,7 @@ Manages the state and operations for generating images from text prompts using a > **downloadProgress**: `number` -Defined in: [types/tti.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L65) +Defined in: [types/tti.ts:63](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L63) Represents the total download progress of all the model binaries combined, as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the total download progress of all the model binaries combined, as a > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/tti.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L50) +Defined in: [types/tti.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L48) Contains the error object if any of the pipeline models failed to load, download, or encountered a runtime error. @@ -31,7 +31,7 @@ Contains the error object if any of the pipeline models failed to load, download > **generate**: (`input`, `imageSize?`, `numSteps?`, `seed?`) => `Promise`\<`string`\> -Defined in: [types/tti.ts:76](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L76) +Defined in: [types/tti.ts:74](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L74) Runs the diffusion pipeline to generate an image from the provided text prompt. @@ -77,7 +77,7 @@ If the model is not loaded or is currently generating another image. > **interrupt**: () => `void` -Defined in: [types/tti.ts:86](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L86) +Defined in: [types/tti.ts:84](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L84) Interrupts the currently active image generation process at the next available inference step. @@ -91,7 +91,7 @@ Interrupts the currently active image generation process at the next available i > **isGenerating**: `boolean` -Defined in: [types/tti.ts:60](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L60) +Defined in: [types/tti.ts:58](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L58) Indicates whether the model is currently generating an image. @@ -101,6 +101,6 @@ Indicates whether the model is currently generating an image. > **isReady**: `boolean` -Defined in: [types/tti.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L55) +Defined in: [types/tti.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tti.ts#L53) Indicates whether the entire diffusion pipeline is loaded into memory and ready for generation. diff --git a/docs/docs/06-api-reference/interfaces/TextToSpeechConfig.md b/docs/docs/06-api-reference/interfaces/TextToSpeechConfig.md index 6f2e04ab5..e6ffed241 100644 --- a/docs/docs/06-api-reference/interfaces/TextToSpeechConfig.md +++ b/docs/docs/06-api-reference/interfaces/TextToSpeechConfig.md @@ -1,6 +1,6 @@ # Interface: TextToSpeechConfig -Defined in: [types/tts.ts:64](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L64) +Defined in: [types/tts.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L59) General Text to Speech module configuration @@ -14,7 +14,7 @@ General Text to Speech module configuration > **model**: [`KokoroConfig`](KokoroConfig.md) -Defined in: [types/tts.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L65) +Defined in: [types/tts.ts:60](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L60) a selected T2S model @@ -24,6 +24,6 @@ a selected T2S model > **voice**: [`VoiceConfig`](VoiceConfig.md) -Defined in: [types/tts.ts:66](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L66) +Defined in: [types/tts.ts:61](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L61) a selected speaker's voice diff --git a/docs/docs/06-api-reference/interfaces/TextToSpeechInput.md b/docs/docs/06-api-reference/interfaces/TextToSpeechInput.md index 73414dd7f..00ff04683 100644 --- a/docs/docs/06-api-reference/interfaces/TextToSpeechInput.md +++ b/docs/docs/06-api-reference/interfaces/TextToSpeechInput.md @@ -1,6 +1,6 @@ # Interface: TextToSpeechInput -Defined in: [types/tts.ts:88](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L88) +Defined in: [types/tts.ts:80](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L80) Text to Speech module input definition @@ -14,7 +14,7 @@ Text to Speech module input definition > `optional` **speed**: `number` -Defined in: [types/tts.ts:90](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L90) +Defined in: [types/tts.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L82) optional speed argument - the higher it is, the faster the speech becomes @@ -24,6 +24,6 @@ optional speed argument - the higher it is, the faster the speech becomes > **text**: `string` -Defined in: [types/tts.ts:89](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L89) +Defined in: [types/tts.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L81) a text to be spoken diff --git a/docs/docs/06-api-reference/interfaces/TextToSpeechProps.md b/docs/docs/06-api-reference/interfaces/TextToSpeechProps.md index 2cf0a8810..49130369d 100644 --- a/docs/docs/06-api-reference/interfaces/TextToSpeechProps.md +++ b/docs/docs/06-api-reference/interfaces/TextToSpeechProps.md @@ -1,6 +1,6 @@ # Interface: TextToSpeechProps -Defined in: [types/tts.ts:77](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L77) +Defined in: [types/tts.ts:70](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L70) Props for the useTextToSpeech hook. @@ -14,7 +14,7 @@ Props for the useTextToSpeech hook. > **model**: [`KokoroConfig`](KokoroConfig.md) -Defined in: [types/tts.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L65) +Defined in: [types/tts.ts:60](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L60) a selected T2S model @@ -28,7 +28,7 @@ a selected T2S model > `optional` **preventLoad**: `boolean` -Defined in: [types/tts.ts:78](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L78) +Defined in: [types/tts.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L71) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. @@ -38,7 +38,7 @@ Boolean that can prevent automatic model loading (and downloading the data if yo > **voice**: [`VoiceConfig`](VoiceConfig.md) -Defined in: [types/tts.ts:66](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L66) +Defined in: [types/tts.ts:61](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L61) a selected speaker's voice diff --git a/docs/docs/06-api-reference/interfaces/TextToSpeechStreamingInput.md b/docs/docs/06-api-reference/interfaces/TextToSpeechStreamingInput.md index 69cb159ae..2a4045259 100644 --- a/docs/docs/06-api-reference/interfaces/TextToSpeechStreamingInput.md +++ b/docs/docs/06-api-reference/interfaces/TextToSpeechStreamingInput.md @@ -1,6 +1,6 @@ # Interface: TextToSpeechStreamingInput -Defined in: [types/tts.ts:156](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L156) +Defined in: [types/tts.ts:146](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L146) Text to Speech streaming input definition @@ -19,7 +19,7 @@ Callbacks can be both synchronous or asynchronous. > `optional` **onBegin**: () => `void` \| `Promise`\<`void`\> -Defined in: [types/tts.ts:157](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L157) +Defined in: [types/tts.ts:147](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L147) Called when streaming begins @@ -33,7 +33,7 @@ Called when streaming begins > `optional` **onEnd**: () => `void` \| `Promise`\<`void`\> -Defined in: [types/tts.ts:159](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L159) +Defined in: [types/tts.ts:149](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L149) Called when streaming ends @@ -47,7 +47,7 @@ Called when streaming ends > `optional` **onNext**: (`audio`) => `void` \| `Promise`\<`void`\> -Defined in: [types/tts.ts:158](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L158) +Defined in: [types/tts.ts:148](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L148) Called after each audio chunk gets calculated. @@ -67,7 +67,7 @@ Called after each audio chunk gets calculated. > `optional` **speed**: `number` -Defined in: [types/tts.ts:90](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L90) +Defined in: [types/tts.ts:82](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L82) optional speed argument - the higher it is, the faster the speech becomes @@ -81,7 +81,7 @@ optional speed argument - the higher it is, the faster the speech becomes > **text**: `string` -Defined in: [types/tts.ts:89](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L89) +Defined in: [types/tts.ts:81](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L81) a text to be spoken diff --git a/docs/docs/06-api-reference/interfaces/TextToSpeechType.md b/docs/docs/06-api-reference/interfaces/TextToSpeechType.md index 342f868f2..f9e65a563 100644 --- a/docs/docs/06-api-reference/interfaces/TextToSpeechType.md +++ b/docs/docs/06-api-reference/interfaces/TextToSpeechType.md @@ -1,6 +1,6 @@ # Interface: TextToSpeechType -Defined in: [types/tts.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L99) +Defined in: [types/tts.ts:90](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L90) Return type for the `useTextToSpeech` hook. Manages the state and operations for Text-to-Speech generation. @@ -11,7 +11,7 @@ Manages the state and operations for Text-to-Speech generation. > **downloadProgress**: `number` -Defined in: [types/tts.ts:118](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L118) +Defined in: [types/tts.ts:109](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L109) Represents the download progress of the model and voice assets as a value between 0 and 1. @@ -21,7 +21,7 @@ Represents the download progress of the model and voice assets as a value betwee > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/tts.ts:103](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L103) +Defined in: [types/tts.ts:94](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L94) Contains the error object if the model failed to load or encountered an error during inference. @@ -31,12 +31,10 @@ Contains the error object if the model failed to load or encountered an error du > **forward**: (`input`) => `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\> -Defined in: [types/tts.ts:126](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L126) +Defined in: [types/tts.ts:117](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L117) Runs the model to convert the provided text into speech audio in a single pass. -- - #### Parameters ##### input @@ -61,7 +59,7 @@ If the model is not loaded or is currently generating. > **isGenerating**: `boolean` -Defined in: [types/tts.ts:113](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L113) +Defined in: [types/tts.ts:104](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L104) Indicates whether the model is currently generating audio. @@ -71,7 +69,7 @@ Indicates whether the model is currently generating audio. > **isReady**: `boolean` -Defined in: [types/tts.ts:108](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L108) +Defined in: [types/tts.ts:99](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L99) Indicates whether the Text-to-Speech model is loaded and ready to accept inputs. @@ -81,13 +79,11 @@ Indicates whether the Text-to-Speech model is loaded and ready to accept inputs. > **stream**: (`input`) => `Promise`\<`void`\> -Defined in: [types/tts.ts:135](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L135) +Defined in: [types/tts.ts:126](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L126) Streams the generated audio data incrementally. This is optimal for real-time playback, allowing audio to start playing before the full text is synthesized. -- - #### Parameters ##### input @@ -112,7 +108,7 @@ If the model is not loaded or is currently generating. > **streamStop**: () => `void` -Defined in: [types/tts.ts:140](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L140) +Defined in: [types/tts.ts:131](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L131) Interrupts and stops the currently active audio generation stream. diff --git a/docs/docs/06-api-reference/interfaces/TokenizerProps.md b/docs/docs/06-api-reference/interfaces/TokenizerProps.md index 8ffacfc47..a5905972c 100644 --- a/docs/docs/06-api-reference/interfaces/TokenizerProps.md +++ b/docs/docs/06-api-reference/interfaces/TokenizerProps.md @@ -1,6 +1,6 @@ # Interface: TokenizerProps -Defined in: [types/tokenizer.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L9) +Defined in: [types/tokenizer.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L8) Parameters for initializing and configuring a Tokenizer instance. @@ -10,7 +10,7 @@ Parameters for initializing and configuring a Tokenizer instance. > `optional` **preventLoad**: `boolean` -Defined in: [types/tokenizer.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L20) +Defined in: [types/tokenizer.ts:19](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L19) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. @@ -20,7 +20,7 @@ Boolean that can prevent automatic model loading (and downloading the data if yo > **tokenizer**: `object` -Defined in: [types/tokenizer.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L15) +Defined in: [types/tokenizer.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L14) Object containing: diff --git a/docs/docs/06-api-reference/interfaces/TokenizerType.md b/docs/docs/06-api-reference/interfaces/TokenizerType.md index 7ccc1bd6f..e993c68f0 100644 --- a/docs/docs/06-api-reference/interfaces/TokenizerType.md +++ b/docs/docs/06-api-reference/interfaces/TokenizerType.md @@ -1,6 +1,6 @@ # Interface: TokenizerType -Defined in: [types/tokenizer.ts:28](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L28) +Defined in: [types/tokenizer.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L26) React hook state and methods for managing a Tokenizer instance. @@ -10,7 +10,7 @@ React hook state and methods for managing a Tokenizer instance. > **downloadProgress**: `number` -Defined in: [types/tokenizer.ts:47](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L47) +Defined in: [types/tokenizer.ts:45](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L45) Tracks the progress of the tokenizer download process (value between 0 and 1). @@ -20,7 +20,7 @@ Tracks the progress of the tokenizer download process (value between 0 and 1). > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/tokenizer.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L32) +Defined in: [types/tokenizer.ts:30](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L30) Contains the error message if the tokenizer failed to load or during processing. @@ -30,7 +30,7 @@ Contains the error message if the tokenizer failed to load or during processing. > **isGenerating**: `boolean` -Defined in: [types/tokenizer.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L42) +Defined in: [types/tokenizer.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L40) Indicates whether the tokenizer is currently processing data. @@ -40,7 +40,7 @@ Indicates whether the tokenizer is currently processing data. > **isReady**: `boolean` -Defined in: [types/tokenizer.ts:37](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L37) +Defined in: [types/tokenizer.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L35) Indicates whether the tokenizer has successfully loaded and is ready for use. @@ -50,7 +50,7 @@ Indicates whether the tokenizer has successfully loaded and is ready for use. > **decode**(`tokens`, `skipSpecialTokens`): `Promise`\<`string`\> -Defined in: [types/tokenizer.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L55) +Defined in: [types/tokenizer.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L53) Converts an array of token IDs into a string. @@ -80,7 +80,7 @@ A promise resolving to the decoded text string. > **encode**(`text`): `Promise`\<`number`[]\> -Defined in: [types/tokenizer.ts:65](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L65) +Defined in: [types/tokenizer.ts:63](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L63) Converts a string into an array of token IDs. @@ -104,7 +104,7 @@ A promise resolving to an array `number[]` containing the encoded token IDs. > **getVocabSize**(): `Promise`\<`number`\> -Defined in: [types/tokenizer.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L71) +Defined in: [types/tokenizer.ts:69](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L69) Returns the size of the tokenizer's vocabulary. @@ -120,7 +120,7 @@ A promise resolving to the vocabulary size. > **idToToken**(`id`): `Promise`\<`string`\> -Defined in: [types/tokenizer.ts:78](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L78) +Defined in: [types/tokenizer.ts:76](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L76) Returns the token associated to the ID. @@ -144,7 +144,7 @@ A promise resolving to the token string representation. > **tokenToId**(`token`): `Promise`\<`number`\> -Defined in: [types/tokenizer.ts:85](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L85) +Defined in: [types/tokenizer.ts:83](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tokenizer.ts#L83) Returns the ID associated to the token. diff --git a/docs/docs/06-api-reference/interfaces/ToolCall.md b/docs/docs/06-api-reference/interfaces/ToolCall.md index a8110815d..f5c9c2ad8 100644 --- a/docs/docs/06-api-reference/interfaces/ToolCall.md +++ b/docs/docs/06-api-reference/interfaces/ToolCall.md @@ -1,6 +1,6 @@ # Interface: ToolCall -Defined in: [types/llm.ts:196](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L196) +Defined in: [types/llm.ts:183](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L183) Represents a tool call made by the model. @@ -10,7 +10,7 @@ Represents a tool call made by the model. > **arguments**: `Object` -Defined in: [types/llm.ts:198](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L198) +Defined in: [types/llm.ts:185](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L185) The arguments passed to the tool. @@ -20,6 +20,6 @@ The arguments passed to the tool. > **toolName**: `string` -Defined in: [types/llm.ts:197](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L197) +Defined in: [types/llm.ts:184](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L184) The name of the tool being called. diff --git a/docs/docs/06-api-reference/interfaces/ToolsConfig.md b/docs/docs/06-api-reference/interfaces/ToolsConfig.md index c206936ff..7cef0417a 100644 --- a/docs/docs/06-api-reference/interfaces/ToolsConfig.md +++ b/docs/docs/06-api-reference/interfaces/ToolsConfig.md @@ -1,6 +1,6 @@ # Interface: ToolsConfig -Defined in: [types/llm.ts:232](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L232) +Defined in: [types/llm.ts:216](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L216) Object configuring options for enabling and managing tool use. **It will only have effect if your model's chat template support it**. @@ -10,7 +10,7 @@ Object configuring options for enabling and managing tool use. **It will only ha > `optional` **displayToolCalls**: `boolean` -Defined in: [types/llm.ts:235](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L235) +Defined in: [types/llm.ts:219](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L219) If set to true, JSON tool calls will be displayed in chat. If false, only answers will be displayed. @@ -20,7 +20,7 @@ If set to true, JSON tool calls will be displayed in chat. If false, only answer > **executeToolCallback**: (`call`) => `Promise`\<`string` \| `null`\> -Defined in: [types/llm.ts:234](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L234) +Defined in: [types/llm.ts:218](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L218) Function that accepts `ToolCall`, executes tool and returns the string to model. @@ -40,6 +40,6 @@ Function that accepts `ToolCall`, executes tool and returns the string to model. > **tools**: `Object`[] -Defined in: [types/llm.ts:233](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L233) +Defined in: [types/llm.ts:217](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L217) List of objects defining tools. diff --git a/docs/docs/06-api-reference/interfaces/TranscriptionResult.md b/docs/docs/06-api-reference/interfaces/TranscriptionResult.md index 109560de6..8eac5d5f4 100644 --- a/docs/docs/06-api-reference/interfaces/TranscriptionResult.md +++ b/docs/docs/06-api-reference/interfaces/TranscriptionResult.md @@ -1,6 +1,6 @@ # Interface: TranscriptionResult -Defined in: [types/stt.ts:250](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L250) +Defined in: [types/stt.ts:243](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L243) Structure that represent result of transcription for a one function call (either `transcribe` or `stream`). @@ -10,7 +10,7 @@ Structure that represent result of transcription for a one function call (either > **duration**: `number` -Defined in: [types/stt.ts:253](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L253) +Defined in: [types/stt.ts:246](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L246) Duration in seconds of a given transcription. @@ -20,7 +20,7 @@ Duration in seconds of a given transcription. > **language**: `string` -Defined in: [types/stt.ts:252](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L252) +Defined in: [types/stt.ts:245](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L245) Language chosen for transcription. @@ -30,7 +30,7 @@ Language chosen for transcription. > `optional` **segments**: [`TranscriptionSegment`](TranscriptionSegment.md)[] -Defined in: [types/stt.ts:255](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L255) +Defined in: [types/stt.ts:248](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L248) If `verbose` set to `true` in `DecodingOptions`, it contains array of `TranscriptionSegment` with details split into separate transcription segments. @@ -41,7 +41,7 @@ If `verbose` set to `true` in `DecodingOptions`, it contains array of > `optional` **task**: `"transcribe"` \| `"stream"` -Defined in: [types/stt.ts:251](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L251) +Defined in: [types/stt.ts:244](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L244) String indicating task, either 'transcribe' or 'stream'. @@ -51,6 +51,6 @@ String indicating task, either 'transcribe' or 'stream'. > **text**: `string` -Defined in: [types/stt.ts:254](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L254) +Defined in: [types/stt.ts:247](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L247) The whole text of a transcription as a `string`. diff --git a/docs/docs/06-api-reference/interfaces/TranscriptionSegment.md b/docs/docs/06-api-reference/interfaces/TranscriptionSegment.md index 5769cf2dc..18c0ebf06 100644 --- a/docs/docs/06-api-reference/interfaces/TranscriptionSegment.md +++ b/docs/docs/06-api-reference/interfaces/TranscriptionSegment.md @@ -1,6 +1,6 @@ # Interface: TranscriptionSegment -Defined in: [types/stt.ts:228](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L228) +Defined in: [types/stt.ts:222](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L222) Structure that represent single Segment of transcription. @@ -10,7 +10,7 @@ Structure that represent single Segment of transcription. > **avgLogprob**: `number` -Defined in: [types/stt.ts:235](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L235) +Defined in: [types/stt.ts:229](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L229) Average log probability calculated across all tokens in a segment. @@ -20,7 +20,7 @@ Average log probability calculated across all tokens in a segment. > **compressionRatio**: `number` -Defined in: [types/stt.ts:236](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L236) +Defined in: [types/stt.ts:230](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L230) Compression ration achieved on a given segment. @@ -30,7 +30,7 @@ Compression ration achieved on a given segment. > **end**: `number` -Defined in: [types/stt.ts:230](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L230) +Defined in: [types/stt.ts:224](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L224) Timestamp of the end of the segment in audio (in seconds). @@ -40,7 +40,7 @@ Timestamp of the end of the segment in audio (in seconds). > **start**: `number` -Defined in: [types/stt.ts:229](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L229) +Defined in: [types/stt.ts:223](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L223) Timestamp of the beginning of the segment in audio (in seconds). @@ -50,7 +50,7 @@ Timestamp of the beginning of the segment in audio (in seconds). > **temperature**: `number` -Defined in: [types/stt.ts:234](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L234) +Defined in: [types/stt.ts:228](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L228) Temperature for which given segment was computed. @@ -60,7 +60,7 @@ Temperature for which given segment was computed. > **text**: `string` -Defined in: [types/stt.ts:231](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L231) +Defined in: [types/stt.ts:225](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L225) Full text of the given segment as a string. @@ -70,7 +70,7 @@ Full text of the given segment as a string. > **tokens**: `number`[] -Defined in: [types/stt.ts:233](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L233) +Defined in: [types/stt.ts:227](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L227) Raw tokens represented as table of integers. @@ -80,7 +80,7 @@ Raw tokens represented as table of integers. > `optional` **words**: [`Word`](Word.md)[] -Defined in: [types/stt.ts:232](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L232) +Defined in: [types/stt.ts:226](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L226) If `verbose` set to `true` in `DecodingOptions`, it returns word-level timestamping as an array of `Word`. diff --git a/docs/docs/06-api-reference/interfaces/VADProps.md b/docs/docs/06-api-reference/interfaces/VADProps.md index 3c4e7748d..dccc5de13 100644 --- a/docs/docs/06-api-reference/interfaces/VADProps.md +++ b/docs/docs/06-api-reference/interfaces/VADProps.md @@ -1,6 +1,6 @@ # Interface: VADProps -Defined in: [types/vad.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L12) +Defined in: [types/vad.ts:11](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L11) Props for the useVAD hook. @@ -10,7 +10,7 @@ Props for the useVAD hook. > **model**: `object` -Defined in: [types/vad.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L13) +Defined in: [types/vad.ts:12](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L12) An object containing the model source. @@ -24,6 +24,6 @@ An object containing the model source. > `optional` **preventLoad**: `boolean` -Defined in: [types/vad.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L14) +Defined in: [types/vad.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L13) Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. diff --git a/docs/docs/06-api-reference/interfaces/VADType.md b/docs/docs/06-api-reference/interfaces/VADType.md index 38d8092e6..1c8fa94b0 100644 --- a/docs/docs/06-api-reference/interfaces/VADType.md +++ b/docs/docs/06-api-reference/interfaces/VADType.md @@ -1,6 +1,6 @@ # Interface: VADType -Defined in: [types/vad.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L34) +Defined in: [types/vad.ts:31](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L31) React hook state and methods for managing a Voice Activity Detection (VAD) model instance. @@ -10,7 +10,7 @@ React hook state and methods for managing a Voice Activity Detection (VAD) model > **downloadProgress**: `number` -Defined in: [types/vad.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L53) +Defined in: [types/vad.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L50) Represents the download progress as a value between 0 and 1. @@ -20,7 +20,7 @@ Represents the download progress as a value between 0 and 1. > **error**: [`RnExecutorchError`](../classes/RnExecutorchError.md) \| `null` -Defined in: [types/vad.ts:38](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L38) +Defined in: [types/vad.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L35) Contains the error message if the VAD model failed to load or during processing. @@ -30,7 +30,7 @@ Contains the error message if the VAD model failed to load or during processing. > **isGenerating**: `boolean` -Defined in: [types/vad.ts:48](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L48) +Defined in: [types/vad.ts:45](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L45) Indicates whether the model is currently processing an inference. @@ -40,7 +40,7 @@ Indicates whether the model is currently processing an inference. > **isReady**: `boolean` -Defined in: [types/vad.ts:43](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L43) +Defined in: [types/vad.ts:40](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L40) Indicates whether the VAD model has successfully loaded and is ready for inference. @@ -50,7 +50,7 @@ Indicates whether the VAD model has successfully loaded and is ready for inferen > **forward**(`waveform`): `Promise`\<[`Segment`](Segment.md)[]\> -Defined in: [types/vad.ts:61](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L61) +Defined in: [types/vad.ts:58](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/vad.ts#L58) Runs the Voice Activity Detection model on the provided audio waveform. diff --git a/docs/docs/06-api-reference/interfaces/VerticalOCRProps.md b/docs/docs/06-api-reference/interfaces/VerticalOCRProps.md index 59a2ec396..2ea3c58a6 100644 --- a/docs/docs/06-api-reference/interfaces/VerticalOCRProps.md +++ b/docs/docs/06-api-reference/interfaces/VerticalOCRProps.md @@ -1,6 +1,6 @@ # Interface: VerticalOCRProps -Defined in: [types/ocr.ts:70](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L70) +Defined in: [types/ocr.ts:66](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L66) Configuration properties for the `useVerticalOCR` hook. @@ -14,7 +14,7 @@ Configuration properties for the `useVerticalOCR` hook. > `optional` **independentCharacters**: `boolean` -Defined in: [types/ocr.ts:75](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L75) +Defined in: [types/ocr.ts:71](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L71) Boolean indicating whether to treat each character independently during recognition. Defaults to `false`. @@ -25,7 +25,7 @@ Defaults to `false`. > **model**: `object` -Defined in: [types/ocr.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L41) +Defined in: [types/ocr.ts:38](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L38) Object containing the necessary model sources and configuration for the OCR pipeline. @@ -57,7 +57,7 @@ The language configuration enum for the OCR model (e.g., English, Polish, etc.). > `optional` **preventLoad**: `boolean` -Defined in: [types/ocr.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L62) +Defined in: [types/ocr.ts:59](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L59) Boolean that can prevent automatic model loading (and downloading the data if loaded for the first time) after running the hook. Defaults to `false`. diff --git a/docs/docs/06-api-reference/interfaces/VoiceConfig.md b/docs/docs/06-api-reference/interfaces/VoiceConfig.md index 0bfbc1d01..b4a620207 100644 --- a/docs/docs/06-api-reference/interfaces/VoiceConfig.md +++ b/docs/docs/06-api-reference/interfaces/VoiceConfig.md @@ -1,6 +1,6 @@ # Interface: VoiceConfig -Defined in: [types/tts.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L23) +Defined in: [types/tts.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L21) Voice configuration @@ -12,7 +12,7 @@ So far in Kokoro, each voice is directly associated with a language. > `optional` **extra**: [`KokoroVoiceExtras`](KokoroVoiceExtras.md) -Defined in: [types/tts.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L26) +Defined in: [types/tts.ts:24](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L24) an optional extra sources or properties related to specific voice @@ -22,7 +22,7 @@ an optional extra sources or properties related to specific voice > **lang**: [`TextToSpeechLanguage`](../type-aliases/TextToSpeechLanguage.md) -Defined in: [types/tts.ts:24](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L24) +Defined in: [types/tts.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L22) speaker's language @@ -32,6 +32,6 @@ speaker's language > **voiceSource**: [`ResourceSource`](../type-aliases/ResourceSource.md) -Defined in: [types/tts.ts:25](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L25) +Defined in: [types/tts.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L23) a source to a binary file with voice embedding diff --git a/docs/docs/06-api-reference/interfaces/Word.md b/docs/docs/06-api-reference/interfaces/Word.md index 79c262948..49fbe9d3d 100644 --- a/docs/docs/06-api-reference/interfaces/Word.md +++ b/docs/docs/06-api-reference/interfaces/Word.md @@ -1,6 +1,6 @@ # Interface: Word -Defined in: [types/stt.ts:208](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L208) +Defined in: [types/stt.ts:203](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L203) Structure that represent single token with timestamp information. @@ -10,7 +10,7 @@ Structure that represent single token with timestamp information. > **end**: `number` -Defined in: [types/stt.ts:211](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L211) +Defined in: [types/stt.ts:206](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L206) Timestamp of the end of the token in audio (in seconds). @@ -20,7 +20,7 @@ Timestamp of the end of the token in audio (in seconds). > **start**: `number` -Defined in: [types/stt.ts:210](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L210) +Defined in: [types/stt.ts:205](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L205) Timestamp of the beginning of the token in audio (in seconds). @@ -30,6 +30,6 @@ Timestamp of the beginning of the token in audio (in seconds). > **word**: `string` -Defined in: [types/stt.ts:209](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L209) +Defined in: [types/stt.ts:204](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L204) Token as a string value. diff --git a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/calculateDownloadProgress.md b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/calculateDownloadProgress.md index 0e6b55b37..d86a97e35 100644 --- a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/calculateDownloadProgress.md +++ b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/calculateDownloadProgress.md @@ -2,7 +2,7 @@ > **calculateDownloadProgress**(`totalLength`, `previousFilesTotalLength`, `currentFileLength`, `setProgress`): (`progress`) => `void` -Defined in: [utils/ResourceFetcherUtils.ts:155](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L155) +Defined in: [utils/ResourceFetcherUtils.ts:152](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L152) Creates a progress callback that scales the current file's progress relative to the total size of all files being downloaded. diff --git a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/getFilenameFromUri.md b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/getFilenameFromUri.md index 42704f548..112b88d0d 100644 --- a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/getFilenameFromUri.md +++ b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/getFilenameFromUri.md @@ -2,7 +2,7 @@ > **getFilenameFromUri**(`uri`): `string` -Defined in: [utils/ResourceFetcherUtils.ts:204](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L204) +Defined in: [utils/ResourceFetcherUtils.ts:201](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L201) Generates a safe filename from a URI by removing the protocol and replacing special characters. diff --git a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/hashObject.md b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/hashObject.md index 927eed1db..b6e1a8236 100644 --- a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/hashObject.md +++ b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/hashObject.md @@ -2,7 +2,7 @@ > **hashObject**(`jsonString`): `string` -Defined in: [utils/ResourceFetcherUtils.ts:134](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L134) +Defined in: [utils/ResourceFetcherUtils.ts:131](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L131) Generates a hash from a string representation of an object. diff --git a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/removeFilePrefix.md b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/removeFilePrefix.md index bada306c6..d0deaebe9 100644 --- a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/removeFilePrefix.md +++ b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/removeFilePrefix.md @@ -2,7 +2,7 @@ > **removeFilePrefix**(`uri`): `string` -Defined in: [utils/ResourceFetcherUtils.ts:125](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L125) +Defined in: [utils/ResourceFetcherUtils.ts:122](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L122) Removes the 'file://' prefix from a URI if it exists. diff --git a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/triggerHuggingFaceDownloadCounter.md b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/triggerHuggingFaceDownloadCounter.md index 7a0dba617..472c65372 100644 --- a/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/triggerHuggingFaceDownloadCounter.md +++ b/docs/docs/06-api-reference/react-native-executorch/namespaces/ResourceFetcherUtils/functions/triggerHuggingFaceDownloadCounter.md @@ -2,7 +2,7 @@ > **triggerHuggingFaceDownloadCounter**(`uri`): `Promise`\<`void`\> -Defined in: [utils/ResourceFetcherUtils.ts:188](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L188) +Defined in: [utils/ResourceFetcherUtils.ts:185](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts#L185) Increments the Hugging Face download counter if the URI points to a Software Mansion Hugging Face repo. More information: https://huggingface.co/docs/hub/models-download-stats diff --git a/docs/docs/06-api-reference/type-aliases/LLMTool.md b/docs/docs/06-api-reference/type-aliases/LLMTool.md index 1247bb1f9..6cf694ac7 100644 --- a/docs/docs/06-api-reference/type-aliases/LLMTool.md +++ b/docs/docs/06-api-reference/type-aliases/LLMTool.md @@ -2,7 +2,7 @@ > **LLMTool** = `Object` -Defined in: [types/llm.ts:208](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L208) +Defined in: [types/llm.ts:194](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L194) Represents a tool that can be used by the model. Usually tool is represented with dictionary (Object), but fields depend on the model. diff --git a/docs/docs/06-api-reference/type-aliases/LabelEnum.md b/docs/docs/06-api-reference/type-aliases/LabelEnum.md index d7e161150..ecbcd3afb 100644 --- a/docs/docs/06-api-reference/type-aliases/LabelEnum.md +++ b/docs/docs/06-api-reference/type-aliases/LabelEnum.md @@ -2,7 +2,7 @@ > **LabelEnum** = `Readonly`\<`Record`\<`string`, `number` \| `string`\>\> -Defined in: [types/common.ts:146](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L146) +Defined in: [types/common.ts:141](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L141) A readonly record mapping string keys to numeric or string values. Used to represent enum-like label maps for models. diff --git a/docs/docs/06-api-reference/type-aliases/MessageRole.md b/docs/docs/06-api-reference/type-aliases/MessageRole.md index 2a03ef04b..b7e23cd3d 100644 --- a/docs/docs/06-api-reference/type-aliases/MessageRole.md +++ b/docs/docs/06-api-reference/type-aliases/MessageRole.md @@ -2,6 +2,6 @@ > **MessageRole** = `"user"` \| `"assistant"` \| `"system"` -Defined in: [types/llm.ts:175](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L175) +Defined in: [types/llm.ts:164](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L164) Roles that a message sender can have. diff --git a/docs/docs/06-api-reference/type-aliases/ModelNameOf.md b/docs/docs/06-api-reference/type-aliases/ModelNameOf.md index cfc2dfcd0..3086bc093 100644 --- a/docs/docs/06-api-reference/type-aliases/ModelNameOf.md +++ b/docs/docs/06-api-reference/type-aliases/ModelNameOf.md @@ -2,7 +2,7 @@ > **ModelNameOf**\<`C`\> = `C`\[`"modelName"`\] -Defined in: [types/semanticSegmentation.ts:62](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L62) +Defined in: [types/semanticSegmentation.ts:57](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L57) Extracts the model name from a [SemanticSegmentationModelSources](SemanticSegmentationModelSources.md) config object. diff --git a/docs/docs/06-api-reference/type-aliases/OCRLanguage.md b/docs/docs/06-api-reference/type-aliases/OCRLanguage.md index 0dd89381e..557663012 100644 --- a/docs/docs/06-api-reference/type-aliases/OCRLanguage.md +++ b/docs/docs/06-api-reference/type-aliases/OCRLanguage.md @@ -2,6 +2,6 @@ > **OCRLanguage** = keyof _typeof_ `symbols` -Defined in: [types/ocr.ts:119](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L119) +Defined in: [types/ocr.ts:113](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/ocr.ts#L113) Enumeration of supported OCR languages based on available symbol sets. diff --git a/docs/docs/06-api-reference/type-aliases/ResourceSource.md b/docs/docs/06-api-reference/type-aliases/ResourceSource.md index 6a956d2f9..02988411c 100644 --- a/docs/docs/06-api-reference/type-aliases/ResourceSource.md +++ b/docs/docs/06-api-reference/type-aliases/ResourceSource.md @@ -2,6 +2,6 @@ > **ResourceSource** = `string` \| `number` \| `object` -Defined in: [types/common.ts:10](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L10) +Defined in: [types/common.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L9) Represents a source of a resource, which can be a string (e.g., URL or file path), a number (e.g., resource ID), or an object (e.g., binary data). diff --git a/docs/docs/06-api-reference/type-aliases/SegmentationLabels.md b/docs/docs/06-api-reference/type-aliases/SegmentationLabels.md index eaa40fe6a..fdd8bcedc 100644 --- a/docs/docs/06-api-reference/type-aliases/SegmentationLabels.md +++ b/docs/docs/06-api-reference/type-aliases/SegmentationLabels.md @@ -2,7 +2,7 @@ > **SegmentationLabels**\<`M`\> = `ModelConfigsType`\[`M`\]\[`"labelMap"`\] -Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:55](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L55) +Defined in: [modules/computer_vision/SemanticSegmentationModule.ts:53](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts#L53) Resolves the [LabelEnum](LabelEnum.md) for a given built-in model name. diff --git a/docs/docs/06-api-reference/type-aliases/SemanticSegmentationConfig.md b/docs/docs/06-api-reference/type-aliases/SemanticSegmentationConfig.md index 72651f4bf..e0543dcc3 100644 --- a/docs/docs/06-api-reference/type-aliases/SemanticSegmentationConfig.md +++ b/docs/docs/06-api-reference/type-aliases/SemanticSegmentationConfig.md @@ -2,7 +2,7 @@ > **SemanticSegmentationConfig**\<`T`\> = `object` -Defined in: [types/semanticSegmentation.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L15) +Defined in: [types/semanticSegmentation.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L13) Configuration for a custom semantic segmentation model. @@ -20,7 +20,7 @@ The [LabelEnum](LabelEnum.md) type for the model. > **labelMap**: `T` -Defined in: [types/semanticSegmentation.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L16) +Defined in: [types/semanticSegmentation.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L14) The enum-like object mapping class names to indices. @@ -30,7 +30,7 @@ The enum-like object mapping class names to indices. > `optional` **preprocessorConfig**: `object` -Defined in: [types/semanticSegmentation.ts:17](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L17) +Defined in: [types/semanticSegmentation.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L15) Optional preprocessing parameters. diff --git a/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelName.md b/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelName.md index e99d28b75..4117178e5 100644 --- a/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelName.md +++ b/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelName.md @@ -2,7 +2,7 @@ > **SemanticSegmentationModelName** = [`SemanticSegmentationModelSources`](SemanticSegmentationModelSources.md)\[`"modelName"`\] -Defined in: [types/semanticSegmentation.ts:54](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L54) +Defined in: [types/semanticSegmentation.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L50) Union of all built-in semantic segmentation model names (e.g. `'deeplab-v3-resnet50'`, `'selfie-segmentation'`). diff --git a/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelSources.md b/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelSources.md index d59e3bb04..2b12b777f 100644 --- a/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelSources.md +++ b/docs/docs/06-api-reference/type-aliases/SemanticSegmentationModelSources.md @@ -2,7 +2,7 @@ > **SemanticSegmentationModelSources** = \{ `modelName`: `"deeplab-v3-resnet50"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"deeplab-v3-resnet101"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"deeplab-v3-mobilenet-v3-large"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"lraspp-mobilenet-v3-large"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"fcn-resnet50"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"fcn-resnet101"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"deeplab-v3-resnet50-quantized"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"deeplab-v3-resnet101-quantized"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"deeplab-v3-mobilenet-v3-large-quantized"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"lraspp-mobilenet-v3-large-quantized"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"fcn-resnet50-quantized"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"fcn-resnet101-quantized"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} \| \{ `modelName`: `"selfie-segmentation"`; `modelSource`: [`ResourceSource`](ResourceSource.md); \} -Defined in: [types/semanticSegmentation.ts:27](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L27) +Defined in: [types/semanticSegmentation.ts:24](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/semanticSegmentation.ts#L24) Per-model config for [SemanticSegmentationModule.fromModelName](../classes/SemanticSegmentationModule.md#frommodelname). Each model name maps to its required fields. diff --git a/docs/docs/06-api-reference/type-aliases/SpeechToTextLanguage.md b/docs/docs/06-api-reference/type-aliases/SpeechToTextLanguage.md index 5e9653afb..f1fe70147 100644 --- a/docs/docs/06-api-reference/type-aliases/SpeechToTextLanguage.md +++ b/docs/docs/06-api-reference/type-aliases/SpeechToTextLanguage.md @@ -2,6 +2,6 @@ > **SpeechToTextLanguage** = `"af"` \| `"sq"` \| `"ar"` \| `"hy"` \| `"az"` \| `"eu"` \| `"be"` \| `"bn"` \| `"bs"` \| `"bg"` \| `"my"` \| `"ca"` \| `"zh"` \| `"hr"` \| `"cs"` \| `"da"` \| `"nl"` \| `"et"` \| `"en"` \| `"fi"` \| `"fr"` \| `"gl"` \| `"ka"` \| `"de"` \| `"el"` \| `"gu"` \| `"ht"` \| `"he"` \| `"hi"` \| `"hu"` \| `"is"` \| `"id"` \| `"it"` \| `"ja"` \| `"kn"` \| `"kk"` \| `"km"` \| `"ko"` \| `"lo"` \| `"lv"` \| `"lt"` \| `"mk"` \| `"mg"` \| `"ms"` \| `"ml"` \| `"mt"` \| `"mr"` \| `"ne"` \| `"no"` \| `"fa"` \| `"pl"` \| `"pt"` \| `"pa"` \| `"ro"` \| `"ru"` \| `"sr"` \| `"si"` \| `"sk"` \| `"sl"` \| `"es"` \| `"su"` \| `"sw"` \| `"sv"` \| `"tl"` \| `"tg"` \| `"ta"` \| `"te"` \| `"th"` \| `"tr"` \| `"uk"` \| `"ur"` \| `"uz"` \| `"vi"` \| `"cy"` \| `"yi"` -Defined in: [types/stt.ts:110](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L110) +Defined in: [types/stt.ts:107](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/stt.ts#L107) Languages supported by whisper (not whisper.en) diff --git a/docs/docs/06-api-reference/type-aliases/TensorBuffer.md b/docs/docs/06-api-reference/type-aliases/TensorBuffer.md index 62ac207e1..30aeb234a 100644 --- a/docs/docs/06-api-reference/type-aliases/TensorBuffer.md +++ b/docs/docs/06-api-reference/type-aliases/TensorBuffer.md @@ -2,6 +2,6 @@ > **TensorBuffer** = `ArrayBuffer` \| `Float32Array` \| `Float64Array` \| `Int8Array` \| `Int16Array` \| `Int32Array` \| `Uint8Array` \| `Uint16Array` \| `Uint32Array` \| `BigInt64Array` \| `BigUint64Array` -Defined in: [types/common.ts:113](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L113) +Defined in: [types/common.ts:110](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L110) Represents the data buffer of a tensor, which can be one of several typed array formats. diff --git a/docs/docs/06-api-reference/type-aliases/TextToSpeechLanguage.md b/docs/docs/06-api-reference/type-aliases/TextToSpeechLanguage.md index 51caa8698..371f0f6b7 100644 --- a/docs/docs/06-api-reference/type-aliases/TextToSpeechLanguage.md +++ b/docs/docs/06-api-reference/type-aliases/TextToSpeechLanguage.md @@ -2,6 +2,6 @@ > **TextToSpeechLanguage** = `"en-us"` \| `"en-gb"` -Defined in: [types/tts.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L9) +Defined in: [types/tts.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/tts.ts#L8) List all the languages available in TTS models (as lang shorthands) diff --git a/docs/docs/06-api-reference/type-aliases/Triple.md b/docs/docs/06-api-reference/type-aliases/Triple.md index b8d830897..5a43d7475 100644 --- a/docs/docs/06-api-reference/type-aliases/Triple.md +++ b/docs/docs/06-api-reference/type-aliases/Triple.md @@ -2,7 +2,7 @@ > **Triple**\<`T`\> = readonly \[`T`, `T`, `T`\] -Defined in: [types/common.ts:153](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L153) +Defined in: [types/common.ts:147](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/common.ts#L147) A readonly triple of values, typically used for per-channel normalization parameters. diff --git a/docs/docs/06-api-reference/variables/DEFAULT_CHAT_CONFIG.md b/docs/docs/06-api-reference/variables/DEFAULT_CHAT_CONFIG.md index 1666a1c8b..5ad0242c5 100644 --- a/docs/docs/06-api-reference/variables/DEFAULT_CHAT_CONFIG.md +++ b/docs/docs/06-api-reference/variables/DEFAULT_CHAT_CONFIG.md @@ -2,6 +2,6 @@ > `const` **DEFAULT_CHAT_CONFIG**: [`ChatConfig`](../interfaces/ChatConfig.md) -Defined in: [constants/llmDefaults.ts:49](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L49) +Defined in: [constants/llmDefaults.ts:44](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L44) Default chat configuration for Large Language Models (LLMs). diff --git a/docs/docs/06-api-reference/variables/DEFAULT_CONTEXT_BUFFER_TOKENS.md b/docs/docs/06-api-reference/variables/DEFAULT_CONTEXT_BUFFER_TOKENS.md index c38006996..c355cc604 100644 --- a/docs/docs/06-api-reference/variables/DEFAULT_CONTEXT_BUFFER_TOKENS.md +++ b/docs/docs/06-api-reference/variables/DEFAULT_CONTEXT_BUFFER_TOKENS.md @@ -2,6 +2,6 @@ > `const` **DEFAULT_CONTEXT_BUFFER_TOKENS**: `512` = `512` -Defined in: [constants/llmDefaults.ts:42](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L42) +Defined in: [constants/llmDefaults.ts:38](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L38) Default context buffer tokens (number of tokens to keep for the model response) for Large Language Models (LLMs). diff --git a/docs/docs/06-api-reference/variables/DEFAULT_MESSAGE_HISTORY.md b/docs/docs/06-api-reference/variables/DEFAULT_MESSAGE_HISTORY.md index bec42f000..f19bc10ec 100644 --- a/docs/docs/06-api-reference/variables/DEFAULT_MESSAGE_HISTORY.md +++ b/docs/docs/06-api-reference/variables/DEFAULT_MESSAGE_HISTORY.md @@ -2,6 +2,6 @@ > `const` **DEFAULT_MESSAGE_HISTORY**: [`Message`](../interfaces/Message.md)[] = `[]` -Defined in: [constants/llmDefaults.ts:35](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L35) +Defined in: [constants/llmDefaults.ts:32](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L32) Default message history for Large Language Models (LLMs). diff --git a/docs/docs/06-api-reference/variables/DEFAULT_SYSTEM_PROMPT.md b/docs/docs/06-api-reference/variables/DEFAULT_SYSTEM_PROMPT.md index 10f772ba6..474794b6d 100644 --- a/docs/docs/06-api-reference/variables/DEFAULT_SYSTEM_PROMPT.md +++ b/docs/docs/06-api-reference/variables/DEFAULT_SYSTEM_PROMPT.md @@ -2,6 +2,6 @@ > `const` **DEFAULT_SYSTEM_PROMPT**: `"You are a knowledgeable, efficient, and direct AI assistant. Provide concise answers, focusing on the key information needed. Offer suggestions tactfully when appropriate to improve outcomes. Engage in productive collaboration with the user. Don't return too much text."` = `"You are a knowledgeable, efficient, and direct AI assistant. Provide concise answers, focusing on the key information needed. Offer suggestions tactfully when appropriate to improve outcomes. Engage in productive collaboration with the user. Don't return too much text."` -Defined in: [constants/llmDefaults.ts:9](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L9) +Defined in: [constants/llmDefaults.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/llmDefaults.ts#L8) Default system prompt used to guide the behavior of Large Language Models (LLMs). diff --git a/docs/docs/06-api-reference/variables/KOKORO_MEDIUM.md b/docs/docs/06-api-reference/variables/KOKORO_MEDIUM.md index cb5913cbe..a95bbb52d 100644 --- a/docs/docs/06-api-reference/variables/KOKORO_MEDIUM.md +++ b/docs/docs/06-api-reference/variables/KOKORO_MEDIUM.md @@ -2,7 +2,7 @@ > `const` **KOKORO_MEDIUM**: `object` -Defined in: [constants/tts/models.ts:26](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/tts/models.ts#L26) +Defined in: [constants/tts/models.ts:24](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/tts/models.ts#L24) A standard Kokoro instance which processes the text in batches of maximum 128 tokens. diff --git a/docs/docs/06-api-reference/variables/KOKORO_SMALL.md b/docs/docs/06-api-reference/variables/KOKORO_SMALL.md index 098f4f631..64ac35fcf 100644 --- a/docs/docs/06-api-reference/variables/KOKORO_SMALL.md +++ b/docs/docs/06-api-reference/variables/KOKORO_SMALL.md @@ -2,7 +2,7 @@ > `const` **KOKORO_SMALL**: `object` -Defined in: [constants/tts/models.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/tts/models.ts#L15) +Defined in: [constants/tts/models.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/tts/models.ts#L14) A Kokoro model instance which processes the text in batches of maximum 64 tokens. Uses significant less memory than the medium model, but could produce diff --git a/docs/docs/06-api-reference/variables/SPECIAL_TOKENS.md b/docs/docs/06-api-reference/variables/SPECIAL_TOKENS.md index 0b2a1acce..c7fb248c4 100644 --- a/docs/docs/06-api-reference/variables/SPECIAL_TOKENS.md +++ b/docs/docs/06-api-reference/variables/SPECIAL_TOKENS.md @@ -2,7 +2,7 @@ > `const` **SPECIAL_TOKENS**: `object` -Defined in: [types/llm.ts:281](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L281) +Defined in: [types/llm.ts:262](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/types/llm.ts#L262) Special tokens used in Large Language Models (LLMs). diff --git a/docs/docs/06-api-reference/variables/parseToolCall.md b/docs/docs/06-api-reference/variables/parseToolCall.md index 2492e294b..e1ab2107d 100644 --- a/docs/docs/06-api-reference/variables/parseToolCall.md +++ b/docs/docs/06-api-reference/variables/parseToolCall.md @@ -2,7 +2,7 @@ > `const` **parseToolCall**: (`message`) => [`ToolCall`](../interfaces/ToolCall.md)[] -Defined in: [utils/llm.ts:16](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llm.ts#L16) +Defined in: [utils/llm.ts:15](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/utils/llm.ts#L15) Parses tool calls from a given message string. diff --git a/package.json b/package.json index 661b13ad1..f53e67f54 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "cspell": "^8.19.0", "eslint": "^8.57.0", "eslint-plugin-ft-flow": "^2.0.3", + "eslint-plugin-jsdoc": "^62.7.1", "eslint-plugin-markdown": "^5.1.0", "eslint-plugin-prettier": "^5.0.1", "prettier": "^3.3.3", diff --git a/packages/bare-resource-fetcher/src/ResourceFetcher.ts b/packages/bare-resource-fetcher/src/ResourceFetcher.ts index 406ad34b2..88176b9f0 100644 --- a/packages/bare-resource-fetcher/src/ResourceFetcher.ts +++ b/packages/bare-resource-fetcher/src/ResourceFetcher.ts @@ -4,9 +4,7 @@ * This module provides functions to download and manage files stored in the application's document directory * inside the `react-native-executorch/` directory. These utilities help manage storage and clean up downloaded * files when they are no longer needed. - * * @category Utilities - General - * * @remarks * **Key Functionality:** * - **Download Control**: Pause, resume, and cancel operations through: @@ -97,7 +95,6 @@ interface BareResourceFetcherInterface extends ResourceFetcherAdapter { /** * This module provides functions to download and work with downloaded files stored in the application's document directory inside the `react-native-executorch/` directory. * These utilities can help you manage your storage and clean up the downloaded files when they are no longer needed. - * * @category Utilities - General */ export const BareResourceFetcher: BareResourceFetcherInterface = { @@ -105,7 +102,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Fetches resources (remote URLs, local files or embedded assets), downloads or stores them locally for use by React Native ExecuTorch. - * * @param callback - Optional callback to track progress of all downloads, reported between 0 and 1. * @param sources - Multiple resources that can be strings, asset references, or objects. * @returns If the fetch was successful, it returns a promise which resolves to an array of local file paths for the downloaded/stored resources (without file:// prefix). @@ -315,7 +311,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Pauses an ongoing download of files. - * * @param sources - The resource identifiers used when calling `fetch`. * @returns A promise that resolves once the download is paused. */ @@ -326,7 +321,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Resumes a paused download of files. - * * @param sources - The resource identifiers used when calling fetch. * @returns If the fetch was successful, it returns a promise which resolves to an array of local file paths for the downloaded resources (without file:// prefix). * If the fetch was again interrupted by `pauseFetching` or `cancelFetching`, it returns a promise which resolves to `null`. @@ -338,7 +332,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Cancels an ongoing/paused download of files. - * * @param sources - The resource identifiers used when calling `fetch()`. * @returns A promise that resolves once the download is canceled. */ @@ -361,7 +354,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Lists all the downloaded files used by React Native ExecuTorch. - * * @returns A promise, which resolves to an array of URIs for all the downloaded files. */ async listDownloadedFiles() { @@ -371,7 +363,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Lists all the downloaded models used by React Native ExecuTorch. - * * @returns A promise, which resolves to an array of URIs for all the downloaded models. */ async listDownloadedModels() { @@ -381,7 +372,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Deletes downloaded resources from the local filesystem. - * * @param sources - The resource identifiers used when calling `fetch`. * @returns A promise that resolves once all specified resources have been removed. */ @@ -399,7 +389,6 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Fetches the info about files size. Works only for remote files. - * * @param sources - The resource identifiers (URLs). * @returns A promise that resolves to combined size of files in bytes. */ @@ -559,10 +548,8 @@ export const BareResourceFetcher: BareResourceFetcherInterface = { /** * Reads the contents of a file as a string. - * * @param path - Absolute file path to read. * @returns A promise that resolves to the file contents as a string. - * * @remarks * **REQUIRED**: Used internally for reading configuration files (e.g., tokenizer configs). */ diff --git a/packages/bare-resource-fetcher/src/ResourceFetcherUtils.ts b/packages/bare-resource-fetcher/src/ResourceFetcherUtils.ts index 74e25f54b..859e6f892 100644 --- a/packages/bare-resource-fetcher/src/ResourceFetcherUtils.ts +++ b/packages/bare-resource-fetcher/src/ResourceFetcherUtils.ts @@ -18,7 +18,6 @@ export type { ResourceSourceExtended }; /** * Utility functions for fetching and managing resources. - * * @category Utilities - General */ export namespace ResourceFetcherUtils { diff --git a/packages/expo-resource-fetcher/src/ResourceFetcher.ts b/packages/expo-resource-fetcher/src/ResourceFetcher.ts index 4a81bdfe6..e1c037393 100644 --- a/packages/expo-resource-fetcher/src/ResourceFetcher.ts +++ b/packages/expo-resource-fetcher/src/ResourceFetcher.ts @@ -4,9 +4,7 @@ * This module provides functions to download and manage files stored in the application's document directory * inside the `react-native-executorch/` directory. These utilities help manage storage and clean up downloaded * files when they are no longer needed. - * * @category Utilities - General - * * @remarks * **Key Functionality:** * - **Download Control**: Pause, resume, and cancel operations through: @@ -94,7 +92,6 @@ interface ExpoResourceFetcherInterface extends ResourceFetcherAdapter { /** * This module provides functions to download and work with downloaded files stored in the application's document directory inside the `react-native-executorch/` directory. * These utilities can help you manage your storage and clean up the downloaded files when they are no longer needed. - * * @category Utilities - General */ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { @@ -102,7 +99,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Fetches resources (remote URLs, local files or embedded assets), downloads or stores them locally for use by React Native ExecuTorch. - * * @param callback - Optional callback to track progress of all downloads, reported between 0 and 1. * @param sources - Multiple resources that can be strings, asset references, or objects. * @returns If the fetch was successful, it returns a promise which resolves to an array of local file paths for the downloaded/stored resources (without file:// prefix). @@ -288,7 +284,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Pauses an ongoing download of files. - * * @param sources - The resource identifiers used when calling `fetch`. * @returns A promise that resolves once the download is paused. */ @@ -299,7 +294,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Resumes a paused download of files. - * * @param sources - The resource identifiers used when calling fetch. * @returns If the fetch was successful, it returns a promise which resolves to an array of local file paths for the downloaded resources (without file:// prefix). * If the fetch was again interrupted by `pauseFetching` or `cancelFetching`, it returns a promise which resolves to `null`. @@ -311,7 +305,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Cancels an ongoing/paused download of files. - * * @param sources - The resource identifiers used when calling `fetch()`. * @returns A promise that resolves once the download is canceled. */ @@ -334,7 +327,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Lists all the downloaded files used by React Native ExecuTorch. - * * @returns A promise, which resolves to an array of URIs for all the downloaded files. */ async listDownloadedFiles() { @@ -344,7 +336,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Lists all the downloaded models used by React Native ExecuTorch. - * * @returns A promise, which resolves to an array of URIs for all the downloaded models. */ async listDownloadedModels() { @@ -354,7 +345,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Deletes downloaded resources from the local filesystem. - * * @param sources - The resource identifiers used when calling `fetch`. * @returns A promise that resolves once all specified resources have been removed. */ @@ -372,7 +362,6 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Fetches the info about files size. Works only for remote files. - * * @param sources - The resource identifiers (URLs). * @returns A promise that resolves to combined size of files in bytes. */ @@ -543,10 +532,8 @@ export const ExpoResourceFetcher: ExpoResourceFetcherInterface = { /** * Reads the contents of a file as a string. - * * @param path - Absolute file path or file URI to read. * @returns A promise that resolves to the file contents as a string. - * * @remarks * **REQUIRED**: Used internally for reading configuration files (e.g., tokenizer configs). * diff --git a/packages/expo-resource-fetcher/src/ResourceFetcherUtils.ts b/packages/expo-resource-fetcher/src/ResourceFetcherUtils.ts index 3165d39c9..98347e0da 100644 --- a/packages/expo-resource-fetcher/src/ResourceFetcherUtils.ts +++ b/packages/expo-resource-fetcher/src/ResourceFetcherUtils.ts @@ -31,7 +31,6 @@ export interface DownloadResource { /** * Utility functions for fetching and managing resources. - * * @category Utilities - General */ export namespace ResourceFetcherUtils { diff --git a/packages/react-native-executorch/src/constants/llmDefaults.ts b/packages/react-native-executorch/src/constants/llmDefaults.ts index 77bf5add9..a27a2f7a4 100644 --- a/packages/react-native-executorch/src/constants/llmDefaults.ts +++ b/packages/react-native-executorch/src/constants/llmDefaults.ts @@ -3,7 +3,6 @@ import { SlidingWindowContextStrategy } from '../utils/llms/context_strategy'; /** * Default system prompt used to guide the behavior of Large Language Models (LLMs). - * * @category Utilities - LLM */ export const DEFAULT_SYSTEM_PROMPT = @@ -11,7 +10,6 @@ export const DEFAULT_SYSTEM_PROMPT = /** * Generates a default structured output prompt based on the provided JSON schema. - * * @category Utilities - LLM * @param structuredOutputSchema - A string representing the JSON schema for the desired output format. * @returns A prompt string instructing the model to format its output according to the given schema. @@ -29,21 +27,18 @@ ${structuredOutputSchema} /** * Default message history for Large Language Models (LLMs). - * * @category Utilities - LLM */ export const DEFAULT_MESSAGE_HISTORY: Message[] = []; /** * Default context buffer tokens (number of tokens to keep for the model response) for Large Language Models (LLMs). - * * @category Utilities - LLM */ export const DEFAULT_CONTEXT_BUFFER_TOKENS = 512; /** * Default chat configuration for Large Language Models (LLMs). - * * @category Utilities - LLM */ export const DEFAULT_CHAT_CONFIG: ChatConfig = { diff --git a/packages/react-native-executorch/src/constants/tts/models.ts b/packages/react-native-executorch/src/constants/tts/models.ts index 96bca3842..24dd96a72 100644 --- a/packages/react-native-executorch/src/constants/tts/models.ts +++ b/packages/react-native-executorch/src/constants/tts/models.ts @@ -9,7 +9,6 @@ const KOKORO_EN_MEDIUM_MODELS_ROOT = `${KOKORO_EN_MODELS_ROOT}/medium`; * A Kokoro model instance which processes the text in batches of maximum 64 tokens. * Uses significant less memory than the medium model, but could produce * a lower quality speech due to forced, aggressive text splitting. - * * @category Models - Text to Speech */ export const KOKORO_SMALL = { @@ -20,7 +19,6 @@ export const KOKORO_SMALL = { /** * A standard Kokoro instance which processes the text in batches of maximum 128 tokens. - * * @category Models - Text to Speech */ export const KOKORO_MEDIUM = { diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useClassification.ts b/packages/react-native-executorch/src/hooks/computer_vision/useClassification.ts index bee943d67..86e03e0bb 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useClassification.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useClassification.ts @@ -7,7 +7,6 @@ import { /** * React hook for managing a Classification model instance. - * * @category Hooks * @param ClassificationProps - Configuration object containing `model` source and optional `preventLoad` flag. * @returns Ready to use Classification model. diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useImageEmbeddings.ts b/packages/react-native-executorch/src/hooks/computer_vision/useImageEmbeddings.ts index d5d82f68f..cffdf3e72 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useImageEmbeddings.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useImageEmbeddings.ts @@ -7,7 +7,6 @@ import { useModule } from '../useModule'; /** * React hook for managing an Image Embeddings model instance. - * * @category Hooks * @param ImageEmbeddingsProps - Configuration object containing `model` source and optional `preventLoad` flag. * @returns Ready to use Image Embeddings model. diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useOCR.ts b/packages/react-native-executorch/src/hooks/computer_vision/useOCR.ts index 6b2868834..1c095e2c1 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useOCR.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useOCR.ts @@ -5,7 +5,6 @@ import { RnExecutorchError } from '../../errors/errorUtils'; /** * React hook for managing an OCR instance. - * * @category Hooks * @param OCRProps - Configuration object containing `model` sources and optional `preventLoad` flag. * @returns Ready to use OCR model. diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useObjectDetection.ts b/packages/react-native-executorch/src/hooks/computer_vision/useObjectDetection.ts index 2d52eb706..9efed3486 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useObjectDetection.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useObjectDetection.ts @@ -7,7 +7,6 @@ import { /** * React hook for managing an Object Detection model instance. - * * @category Hooks * @param ObjectDetectionProps - Configuration object containing `model` source and optional `preventLoad` flag. * @returns Ready to use Object Detection model. diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useSemanticSegmentation.ts b/packages/react-native-executorch/src/hooks/computer_vision/useSemanticSegmentation.ts index 5cfd1af18..3274cfe0e 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useSemanticSegmentation.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useSemanticSegmentation.ts @@ -14,18 +14,15 @@ import { RnExecutorchError, parseUnknownError } from '../../errors/errorUtils'; /** * React hook for managing a Semantic Segmentation model instance. - * * @typeParam C - A {@link SemanticSegmentationModelSources} config specifying which built-in model to load. * @param props - Configuration object containing `model` config and optional `preventLoad` flag. * @returns An object with model state (`error`, `isReady`, `isGenerating`, `downloadProgress`) and a typed `forward` function. - * * @example * ```ts * const { isReady, forward } = useSemanticSegmentation({ * model: { modelName: 'deeplab-v3', modelSource: DEEPLAB_V3_RESNET50 }, * }); * ``` - * * @category Hooks */ export const useSemanticSegmentation = < diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useStyleTransfer.ts b/packages/react-native-executorch/src/hooks/computer_vision/useStyleTransfer.ts index d51ff7a9e..03cd05382 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useStyleTransfer.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useStyleTransfer.ts @@ -7,7 +7,6 @@ import { /** * React hook for managing a Style Transfer model instance. - * * @category Hooks * @param StyleTransferProps - Configuration object containing `model` source and optional `preventLoad` flag. * @returns Ready to use Style Transfer model. diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useTextToImage.ts b/packages/react-native-executorch/src/hooks/computer_vision/useTextToImage.ts index 0487e9e86..8b1766498 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useTextToImage.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useTextToImage.ts @@ -6,7 +6,6 @@ import { TextToImageProps, TextToImageType } from '../../types/tti'; /** * React hook for managing a Text to Image instance. - * * @category Hooks * @param TextToImageProps - Configuration object containing `model` source, `inferenceCallback`, and optional `preventLoad` flag. * @returns Ready to use Text to Image model. diff --git a/packages/react-native-executorch/src/hooks/computer_vision/useVerticalOCR.ts b/packages/react-native-executorch/src/hooks/computer_vision/useVerticalOCR.ts index eb9d289eb..ea27b0da3 100644 --- a/packages/react-native-executorch/src/hooks/computer_vision/useVerticalOCR.ts +++ b/packages/react-native-executorch/src/hooks/computer_vision/useVerticalOCR.ts @@ -5,7 +5,6 @@ import { RnExecutorchError } from '../../errors/errorUtils'; /** * React hook for managing a Vertical OCR instance. - * * @category Hooks * @param VerticalOCRProps - Configuration object containing `model` sources, optional `independentCharacters` and `preventLoad` flag. * @returns Ready to use Vertical OCR model. diff --git a/packages/react-native-executorch/src/hooks/general/useExecutorchModule.ts b/packages/react-native-executorch/src/hooks/general/useExecutorchModule.ts index e0b16535a..f41524fc4 100644 --- a/packages/react-native-executorch/src/hooks/general/useExecutorchModule.ts +++ b/packages/react-native-executorch/src/hooks/general/useExecutorchModule.ts @@ -7,7 +7,6 @@ import { useModule } from '../useModule'; /** * React hook for managing an arbitrary Executorch module instance. - * * @category Hooks * @param executorchModuleProps - Configuration object containing `modelSource` and optional `preventLoad` flag. * @returns Ready to use Executorch module. diff --git a/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts b/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts index 5578c1de7..3cf37b20e 100644 --- a/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts +++ b/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts @@ -11,7 +11,6 @@ import { RnExecutorchError, parseUnknownError } from '../../errors/errorUtils'; /** * React hook for managing a Large Language Model (LLM) instance. - * * @category Hooks * @param model - Object containing model, tokenizer, and tokenizer config sources. * @returns An object implementing the `LLMType` interface for interacting with the LLM. diff --git a/packages/react-native-executorch/src/hooks/natural_language_processing/useSpeechToText.ts b/packages/react-native-executorch/src/hooks/natural_language_processing/useSpeechToText.ts index fa3d8c685..0aabf899f 100644 --- a/packages/react-native-executorch/src/hooks/natural_language_processing/useSpeechToText.ts +++ b/packages/react-native-executorch/src/hooks/natural_language_processing/useSpeechToText.ts @@ -11,7 +11,6 @@ import { RnExecutorchError, parseUnknownError } from '../../errors/errorUtils'; /** * React hook for managing a Speech to Text (STT) instance. - * * @category Hooks * @param speechToTextProps - Configuration object containing `model` source and optional `preventLoad` flag. * @returns Ready to use Speech to Text model. diff --git a/packages/react-native-executorch/src/hooks/natural_language_processing/useTextEmbeddings.ts b/packages/react-native-executorch/src/hooks/natural_language_processing/useTextEmbeddings.ts index 4ffa11900..72095f12b 100644 --- a/packages/react-native-executorch/src/hooks/natural_language_processing/useTextEmbeddings.ts +++ b/packages/react-native-executorch/src/hooks/natural_language_processing/useTextEmbeddings.ts @@ -7,7 +7,6 @@ import { /** * React hook for managing a Text Embeddings model instance. - * * @category Hooks * @param TextEmbeddingsProps - Configuration object containing `model` source and optional `preventLoad` flag. * @returns Ready to use Text Embeddings model. diff --git a/packages/react-native-executorch/src/hooks/natural_language_processing/useTextToSpeech.ts b/packages/react-native-executorch/src/hooks/natural_language_processing/useTextToSpeech.ts index b29b4bc8d..b3eadec35 100644 --- a/packages/react-native-executorch/src/hooks/natural_language_processing/useTextToSpeech.ts +++ b/packages/react-native-executorch/src/hooks/natural_language_processing/useTextToSpeech.ts @@ -11,7 +11,6 @@ import { RnExecutorchError, parseUnknownError } from '../../errors/errorUtils'; /** * React hook for managing Text to Speech instance. - * * @category Hooks * @param TextToSpeechProps - Configuration object containing `model` source, `voice` and optional `preventLoad`. * @returns Ready to use Text to Speech model. diff --git a/packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts b/packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts index ea55157bc..0c6da0282 100644 --- a/packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts +++ b/packages/react-native-executorch/src/hooks/natural_language_processing/useTokenizer.ts @@ -6,7 +6,6 @@ import { TokenizerProps, TokenizerType } from '../../types/tokenizer'; /** * React hook for managing a Tokenizer instance. - * * @category Hooks * @param tokenizerProps - Configuration object containing `tokenizer` source and optional `preventLoad` flag. * @returns Ready to use Tokenizer model. diff --git a/packages/react-native-executorch/src/hooks/natural_language_processing/useVAD.ts b/packages/react-native-executorch/src/hooks/natural_language_processing/useVAD.ts index abb3dca6a..c3dd37db8 100644 --- a/packages/react-native-executorch/src/hooks/natural_language_processing/useVAD.ts +++ b/packages/react-native-executorch/src/hooks/natural_language_processing/useVAD.ts @@ -4,7 +4,6 @@ import { VADType, VADProps } from '../../types/vad'; /** * React hook for managing a VAD model instance. - * * @category Hooks * @param VADProps - Configuration object containing `model` source and optional `preventLoad` flag. * @returns Ready to use VAD model. diff --git a/packages/react-native-executorch/src/index.ts b/packages/react-native-executorch/src/index.ts index dd7557ca2..a040cd81d 100644 --- a/packages/react-native-executorch/src/index.ts +++ b/packages/react-native-executorch/src/index.ts @@ -7,7 +7,6 @@ import { Triple } from './types/common'; /** * Configuration that goes to the `initExecutorch`. * You can pass either bare React Native or Expo configuration. - * * @category Utilities - General */ export interface ExecutorchConfig { @@ -16,7 +15,6 @@ export interface ExecutorchConfig { /** * Function that setups the provided resource fetcher. - * * @category Utilities - General * @param config - Configuration that you want to use in resource fetching. */ @@ -26,7 +24,6 @@ export function initExecutorch(config: ExecutorchConfig) { /** * Function that cleans current setup of fetching resources. - * * @category Utilities - General */ export function cleanupExecutorch() { diff --git a/packages/react-native-executorch/src/modules/BaseModule.ts b/packages/react-native-executorch/src/modules/BaseModule.ts index 6aefc8b2a..8c77bf032 100644 --- a/packages/react-native-executorch/src/modules/BaseModule.ts +++ b/packages/react-native-executorch/src/modules/BaseModule.ts @@ -16,7 +16,6 @@ export abstract class BaseModule { /** * Runs the model's forward method with the given input tensors. * It returns the output tensors that mimic the structure of output from ExecuTorch. - * * @param inputTensor - Array of input tensors. * @returns Array of output tensors. */ @@ -26,7 +25,6 @@ export abstract class BaseModule { /** * Gets the input shape for a given method and index. - * * @param methodName method name * @param index index of the argument which shape is requested * @returns The input shape as an array of numbers. diff --git a/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts b/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts index 45b7e2b39..7792a93ad 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts @@ -7,14 +7,12 @@ import { Logger } from '../../common/Logger'; /** * Module for image classification tasks. - * * @category Typescript API */ export class ClassificationModule extends BaseModule { /** * Loads the model, where `modelSource` is a string that specifies the location of the model binary. * To track the download progress, supply a callback function `onDownloadProgressCallback`. - * * @param model - Object containing `modelSource`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -44,7 +42,6 @@ export class ClassificationModule extends BaseModule { /** * Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. - * * @param imageSource - The image source to be classified. * @returns The classification result. */ diff --git a/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts b/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts index 3e62f450d..ce1ec7945 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts @@ -7,13 +7,11 @@ import { Logger } from '../../common/Logger'; /** * Module for generating image embeddings from input images. - * * @category Typescript API */ export class ImageEmbeddingsModule extends BaseModule { /** * Loads the model, where `modelSource` is a string that specifies the location of the model binary. - * * @param model - Object containing `modelSource`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -43,7 +41,6 @@ export class ImageEmbeddingsModule extends BaseModule { /** * Executes the model's forward pass. Returns an embedding array for a given sentence. - * * @param imageSource - The image source (URI/URL) to image that will be embedded. * @returns A Float32Array containing the image embeddings. */ diff --git a/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts b/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts index 41a931a39..959dc0db6 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/OCRModule.ts @@ -6,7 +6,6 @@ import { parseUnknownError } from '../../errors/errorUtils'; /** * Module for Optical Character Recognition (OCR) tasks. - * * @category Typescript API */ export class OCRModule { @@ -20,7 +19,6 @@ export class OCRModule { * Loads the model, where `detectorSource` is a string that specifies the location of the detector binary, * `recognizerSource` is a string that specifies the location of the recognizer binary, * and `language` is a parameter that specifies the language of the text to be recognized by the OCR. - * * @param model - Object containing `detectorSource`, `recognizerSource`, and `language`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -47,7 +45,6 @@ export class OCRModule { /** * Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. - * * @param imageSource - The image source to be processed. * @returns The OCR result as a `OCRDetection[]`. */ diff --git a/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts b/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts index 95b9e436b..50d13b5a4 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/ObjectDetectionModule.ts @@ -8,14 +8,12 @@ import { Logger } from '../../common/Logger'; /** * Module for object detection tasks. - * * @category Typescript API */ export class ObjectDetectionModule extends BaseModule { /** * Loads the model, where `modelSource` is a string that specifies the location of the model binary. * To track the download progress, supply a callback function `onDownloadProgressCallback`. - * * @param model - Object containing `modelSource`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -46,7 +44,6 @@ export class ObjectDetectionModule extends BaseModule { /** * Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. * `detectionThreshold` can be supplied to alter the sensitivity of the detection. - * * @param imageSource - The image source to be processed. * @param detectionThreshold - The threshold for detection sensitivity. Default is 0.7. * @returns An array of Detection objects representing detected items in the image. diff --git a/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts b/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts index b3b7030b3..028cb7129 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/SemanticSegmentationModule.ts @@ -47,18 +47,16 @@ type ModelConfigsType = typeof ModelConfigs; /** * Resolves the {@link LabelEnum} for a given built-in model name. - * * @typeParam M - A built-in model name from {@link SemanticSegmentationModelName}. - * * @category Types */ export type SegmentationLabels = ModelConfigsType[M]['labelMap']; /** - * @internal * Resolves the label type: if `T` is a {@link SemanticSegmentationModelName}, looks up its labels * from the built-in config; otherwise uses `T` directly as a {@link LabelEnum}. + * @internal */ type ResolveLabels = T extends SemanticSegmentationModelName ? SegmentationLabels : T; @@ -67,7 +65,6 @@ type ResolveLabels = * Generic semantic segmentation module with type-safe label maps. * Use a model name (e.g. `'deeplab-v3-resnet50'`) as the generic parameter for built-in models, * or a custom label enum for custom configs. - * * @typeParam T - Either a built-in model name (`'deeplab-v3-resnet50'`, * `'deeplab-v3-resnet50-quantized'`, `'deeplab-v3-resnet101'`, * `'deeplab-v3-resnet101-quantized'`, `'deeplab-v3-mobilenet-v3-large'`, @@ -75,7 +72,6 @@ type ResolveLabels = * `'lraspp-mobilenet-v3-large-quantized'`, `'fcn-resnet50'`, * `'fcn-resnet50-quantized'`, `'fcn-resnet101'`, `'fcn-resnet101-quantized'`, * `'selfie-segmentation'`) or a custom {@link LabelEnum} label map. - * * @category Typescript API */ export class SemanticSegmentationModule< @@ -99,11 +95,9 @@ export class SemanticSegmentationModule< /** * Creates a segmentation instance for a built-in model. * The config object is discriminated by `modelName` — each model can require different fields. - * * @param config - A {@link SemanticSegmentationModelSources} object specifying which model to load and where to fetch it from. * @param onDownloadProgress - Optional callback to monitor download progress, receiving a value between 0 and 1. * @returns A Promise resolving to a `SemanticSegmentationModule` instance typed to the chosen model's label map. - * * @example * ```ts * const segmentation = await SemanticSegmentationModule.fromModelName({ @@ -145,12 +139,10 @@ export class SemanticSegmentationModule< /** * Creates a segmentation instance with a user-provided label map and custom config. * Use this when working with a custom-exported segmentation model that is not one of the built-in models. - * * @param modelSource - A fetchable resource pointing to the model binary. * @param config - A {@link SemanticSegmentationConfig} object with the label map and optional preprocessing parameters. * @param onDownloadProgress - Optional callback to monitor download progress, receiving a value between 0 and 1. * @returns A Promise resolving to a `SemanticSegmentationModule` instance typed to the provided label map. - * * @example * ```ts * const MyLabels = { BACKGROUND: 0, FOREGROUND: 1 } as const; @@ -187,7 +179,6 @@ export class SemanticSegmentationModule< /** * Executes the model's forward pass to perform semantic segmentation on the provided image. - * * @param imageSource - A string representing the image source (e.g., a file path, URI, or Base64-encoded string). * @param classesOfInterest - An optional list of label keys indicating which per-class probability masks to include in the output. `ARGMAX` is always returned regardless. * @param resizeToInput - Whether to resize the output masks to the original input image dimensions. If `false`, returns the raw model output dimensions. Defaults to `true`. diff --git a/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts b/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts index 90e5242de..d71f1f3c4 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/StyleTransferModule.ts @@ -7,14 +7,12 @@ import { Logger } from '../../common/Logger'; /** * Module for style transfer tasks. - * * @category Typescript API */ export class StyleTransferModule extends BaseModule { /** * Loads the model, where `modelSource` is a string that specifies the location of the model binary. * To track the download progress, supply a callback function `onDownloadProgressCallback`. - * * @param model - Object containing `modelSource`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -44,7 +42,6 @@ export class StyleTransferModule extends BaseModule { /** * Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. - * * @param imageSource - The image source to be processed. * @returns The stylized image as a Base64-encoded string. */ diff --git a/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts b/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts index d22ff9946..7f041c267 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts @@ -9,7 +9,6 @@ import { Logger } from '../../common/Logger'; /** * Module for text-to-image generation tasks. - * * @category Typescript API */ export class TextToImageModule extends BaseModule { @@ -17,7 +16,6 @@ export class TextToImageModule extends BaseModule { /** * Creates a new instance of `TextToImageModule` with optional callback on inference step. - * * @param inferenceCallback - Optional callback function that receives the current step index during inference. */ constructor(inferenceCallback?: (stepIdx: number) => void) { @@ -29,7 +27,6 @@ export class TextToImageModule extends BaseModule { /** * Loads the model from specified resources. - * * @param model - Object containing sources for tokenizer, scheduler, encoder, unet, and decoder. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -96,7 +93,6 @@ export class TextToImageModule extends BaseModule { /** * Runs the model to generate an image described by `input`, and conditioned by `seed`, performing `numSteps` inference steps. * The resulting image, with dimensions `imageSize`×`imageSize` pixels, is returned as a base64-encoded string. - * * @param input - The text prompt to generate the image from. * @param imageSize - The desired width and height of the output image in pixels. * @param numSteps - The number of inference steps to perform. diff --git a/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts b/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts index 824a15021..0b99ed29a 100644 --- a/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts +++ b/packages/react-native-executorch/src/modules/computer_vision/VerticalOCRModule.ts @@ -6,7 +6,6 @@ import { OCRDetection, OCRLanguage } from '../../types/ocr'; /** * Module for Vertical Optical Character Recognition (Vertical OCR) tasks. - * * @category Typescript API */ export class VerticalOCRModule { @@ -20,7 +19,6 @@ export class VerticalOCRModule { * Loads the model, where `detectorSource` is a string that specifies the location of the detector binary, * `recognizerSource` is a string that specifies the location of the recognizer binary, * and `language` is a parameter that specifies the language of the text to be recognized by the OCR. - * * @param model - Object containing `detectorSource`, `recognizerSource`, and `language`. * @param independentCharacters - Whether to treat characters independently during recognition. * @param onDownloadProgressCallback - Optional callback to monitor download progress. @@ -50,7 +48,6 @@ export class VerticalOCRModule { /** * Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string. - * * @param imageSource - The image source to be processed. * @returns The OCR result as a `OCRDetection[]`. */ diff --git a/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts b/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts index 57c0c2712..8051f43a5 100644 --- a/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts +++ b/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts @@ -8,14 +8,12 @@ import { Logger } from '../../common/Logger'; /** * General module for executing custom Executorch models. - * * @category Typescript API */ export class ExecutorchModule extends BaseModule { /** * Loads the model, where `modelSource` is a string, number, or object that specifies the location of the model binary. * Optionally accepts a download progress callback. - * * @param modelSource - Source of the model to be loaded. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -44,7 +42,6 @@ export class ExecutorchModule extends BaseModule { /** * Executes the model's forward pass, where input is an array of `TensorPtr` objects. * If the inference is successful, an array of tensor pointers is returned. - * * @param inputTensor - Array of input tensor pointers. * @returns An array of output tensor pointers. */ diff --git a/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts b/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts index 7321a4518..0832e6370 100644 --- a/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts +++ b/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts @@ -4,7 +4,6 @@ import { LLMConfig, LLMTool, Message } from '../../types/llm'; /** * Module for managing a Large Language Model (LLM) instance. - * * @category Typescript API */ export class LLMModule { @@ -14,7 +13,6 @@ export class LLMModule { /** * Creates a new instance of `LLMModule` with optional callbacks. * @param optionalCallbacks - Object containing optional callbacks. - * * @returns A new LLMModule instance. */ constructor({ @@ -39,7 +37,6 @@ export class LLMModule { /** * Loads the LLM model and tokenizer. - * * @param model - Object containing model, tokenizer, and tokenizer config sources. * @param model.modelSource - `ResourceSource` that specifies the location of the model binary. * @param model.tokenizerSource - `ResourceSource` pointing to the JSON file which contains the tokenizer. @@ -67,7 +64,6 @@ export class LLMModule { /** * Sets new token callback invoked on every token batch. - * * @param tokenCallback - Callback function to handle new tokens. */ setTokenCallback({ @@ -81,7 +77,6 @@ export class LLMModule { /** * Configures chat and tool calling and generation settings. * See [Configuring the model](https://docs.swmansion.com/react-native-executorch/docs/hooks/natural-language-processing/useLLM#configuring-the-model) for details. - * * @param config - Configuration object containing `chatConfig`, `toolsConfig`, and `generationConfig`. */ configure(config: LLMConfig) { @@ -97,7 +92,6 @@ export class LLMModule { * You need to provide entire conversation and prompt (in correct format and with special tokens!) in input string to this method. * It doesn't manage conversation context. It is intended for users that need access to the model itself without any wrapper. * If you want a simple chat with model the consider using `sendMessage` - * * @param input - Raw input string containing the prompt and conversation history. * @returns The generated response as a string. */ @@ -107,7 +101,6 @@ export class LLMModule { /** * Runs model to complete chat passed in `messages` argument. It doesn't manage conversation context. - * * @param messages - Array of messages representing the chat history. * @param tools - Optional array of tools that can be used during generation. * @returns The generated response as a string. @@ -120,7 +113,6 @@ export class LLMModule { * Method to add user message to conversation. * After model responds it will call `messageHistoryCallback()` containing both user message and model response. * It also returns them. - * * @param message - The message string to send. * @returns - Updated message history including the new user message and model response. */ @@ -133,7 +125,6 @@ export class LLMModule { * Deletes all messages starting with message on `index` position. * After deletion it will call `messageHistoryCallback()` containing new history. * It also returns it. - * * @param index - The index of the message to delete from history. * @returns - Updated message history after deletion. */ @@ -151,7 +142,6 @@ export class LLMModule { /** * Returns the number of tokens generated in the last response. - * * @returns The count of generated tokens. */ getGeneratedTokenCount(): number { @@ -160,7 +150,6 @@ export class LLMModule { /** * Returns the number of prompt tokens in the last message. - * * @returns The count of prompt token. */ getPromptTokensCount() { @@ -169,7 +158,6 @@ export class LLMModule { /** * Returns the number of total tokens from the previous generation. This is a sum of prompt tokens and generated tokens. - * * @returns The count of prompt and generated tokens. */ getTotalTokensCount() { diff --git a/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts b/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts index e460e15f9..e13ce27f2 100644 --- a/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts +++ b/packages/react-native-executorch/src/modules/natural_language_processing/SpeechToTextModule.ts @@ -10,7 +10,6 @@ import { Logger } from '../../common/Logger'; /** * Module for Speech to Text (STT) functionalities. - * * @category Typescript API */ export class SpeechToTextModule { @@ -20,7 +19,6 @@ export class SpeechToTextModule { /** * Loads the model specified by the config object. * `onDownloadProgressCallback` allows you to monitor the current progress of the model download. - * * @param model - Configuration object containing model sources. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -73,7 +71,6 @@ export class SpeechToTextModule { /** * Runs the encoding part of the model on the provided waveform. * Returns the encoded waveform as a Float32Array. - * * @param waveform - The input audio waveform. * @returns The encoded output. */ @@ -83,7 +80,6 @@ export class SpeechToTextModule { /** * Runs the decoder of the model. - * * @param tokens - The input tokens. * @param encoderOutput - The encoder output. * @returns Decoded output. @@ -101,7 +97,6 @@ export class SpeechToTextModule { * Starts a transcription process for a given input array (16kHz waveform). * For multilingual models, specify the language in `options`. * Returns the transcription as a string. Passing `number[]` is deprecated. - * * @param waveform - The Float32Array audio data. * @param options - Decoding options including language. * @returns The transcription string. @@ -126,8 +121,8 @@ export class SpeechToTextModule { * Non-committed transcription contains the part of the transcription that is still being processed and may change. * Useful for displaying live, partial results during streaming. * Use with `streamInsert` and `streamStop` to control the stream. - * * @param options - Decoding options including language. + * @yields An object containing `committed` and `nonCommitted` transcription results. * @returns An async generator yielding transcription updates. */ public async *stream(options: DecodingOptions = {}): AsyncGenerator<{ @@ -200,7 +195,6 @@ export class SpeechToTextModule { /** * Inserts a new audio chunk into the streaming transcription session. - * * @param waveform - The audio chunk to insert. */ public streamInsert(waveform: Float32Array): void { diff --git a/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts b/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts index 855c01eef..3b180316f 100644 --- a/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts +++ b/packages/react-native-executorch/src/modules/natural_language_processing/TextEmbeddingsModule.ts @@ -7,13 +7,11 @@ import { Logger } from '../../common/Logger'; /** * Module for generating text embeddings from input text. - * * @category Typescript API */ export class TextEmbeddingsModule extends BaseModule { /** * Loads the model and tokenizer specified by the config object. - * * @param model - Object containing model and tokenizer sources. * @param model.modelSource - `ResourceSource` that specifies the location of the text embeddings model binary. * @param model.tokenizerSource - `ResourceSource` that specifies the location of the tokenizer JSON file. @@ -53,7 +51,6 @@ export class TextEmbeddingsModule extends BaseModule { /** * Executes the model's forward pass, where `input` is a text that will be embedded. - * * @param input - The text string to embed. * @returns A Float32Array containing the vector embeddings. */ diff --git a/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts b/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts index 849c25676..d5ffb8c49 100644 --- a/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts +++ b/packages/react-native-executorch/src/modules/natural_language_processing/TextToSpeechModule.ts @@ -11,7 +11,6 @@ import { Logger } from '../../common/Logger'; /** * Module for Text to Speech (TTS) functionalities. - * * @category Typescript API */ export class TextToSpeechModule { @@ -23,7 +22,6 @@ export class TextToSpeechModule { /** * Loads the model and voice assets specified by the config object. * `onDownloadProgressCallback` allows you to monitor the current progress. - * * @param config - Configuration object containing `model` source and `voice`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -101,7 +99,6 @@ export class TextToSpeechModule { /** * Synthesizes the provided text into speech. * Returns a promise that resolves to the full audio waveform as a `Float32Array`. - * * @param text The input text to be synthesized. * @param speed Optional speed multiplier for the speech synthesis (default is 1.0). * @returns A promise resolving to the synthesized audio waveform. @@ -120,8 +117,8 @@ export class TextToSpeechModule { /** * Starts a streaming synthesis session. Yields audio chunks as they are generated. - * * @param input - Input object containing text and optional speed. + * @yields An audio chunk generated during synthesis. * @returns An async generator yielding Float32Array audio chunks. */ public async *stream({ diff --git a/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts b/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts index d30bb5d71..c8f51b2c1 100644 --- a/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts +++ b/packages/react-native-executorch/src/modules/natural_language_processing/TokenizerModule.ts @@ -6,7 +6,6 @@ import { Logger } from '../../common/Logger'; /** * Module for Tokenizer functionalities. - * * @category Typescript API */ export class TokenizerModule { @@ -18,7 +17,6 @@ export class TokenizerModule { /** * Loads the tokenizer from the specified source. * `tokenizerSource` is a string that points to the location of the tokenizer JSON file. - * * @param tokenizer - Object containing `tokenizerSource`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -47,7 +45,6 @@ export class TokenizerModule { /** * Converts a string into an array of token IDs. - * * @param input - The input string to be tokenized. * @returns An array of token IDs. */ @@ -57,7 +54,6 @@ export class TokenizerModule { /** * Converts an array of token IDs into a string. - * * @param tokens - Array of token IDs to be decoded. * @param skipSpecialTokens - Whether to skip special tokens during decoding (default: true). * @returns The decoded string. @@ -74,7 +70,6 @@ export class TokenizerModule { /** * Returns the size of the tokenizer's vocabulary. - * * @returns The vocabulary size. */ async getVocabSize(): Promise { @@ -83,7 +78,6 @@ export class TokenizerModule { /** * Returns the token associated to the ID. - * * @param tokenId - ID of the token. * @returns The token string associated to ID. */ @@ -93,7 +87,6 @@ export class TokenizerModule { /** * Returns the ID associated to the token. - * * @param token - The token string. * @returns The ID associated to the token. */ diff --git a/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts b/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts index 7039c5924..c06608ff2 100644 --- a/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts +++ b/packages/react-native-executorch/src/modules/natural_language_processing/VADModule.ts @@ -8,14 +8,12 @@ import { Logger } from '../../common/Logger'; /** * Module for Voice Activity Detection (VAD) functionalities. - * * @category Typescript API */ export class VADModule extends BaseModule { /** * Loads the model, where `modelSource` is a string that specifies the location of the model binary. * To track the download progress, supply a callback function `onDownloadProgressCallback`. - * * @param model - Object containing `modelSource`. * @param onDownloadProgressCallback - Optional callback to monitor download progress. */ @@ -43,7 +41,6 @@ export class VADModule extends BaseModule { /** * Executes the model's forward pass, where `waveform` is a Float32Array representing the audio signal (16kHz). - * * @param waveform - The input audio waveform as a Float32Array. It must represent a mono audio signal sampled at 16kHz. * @returns A promise resolving to an array of detected speech segments. */ diff --git a/packages/react-native-executorch/src/types/classification.ts b/packages/react-native-executorch/src/types/classification.ts index 51152ec08..b9c7bb04a 100644 --- a/packages/react-native-executorch/src/types/classification.ts +++ b/packages/react-native-executorch/src/types/classification.ts @@ -3,9 +3,8 @@ import { ResourceSource } from './common'; /** * Props for the `useClassification` hook. - * * @category Types - * @property {Object} model - An object containing the model source. + * @property {object} model - An object containing the model source. * @property {ResourceSource} model.modelSource - The source of the classification model binary. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. */ @@ -17,7 +16,6 @@ export interface ClassificationProps { /** * Return type for the `useClassification` hook. * Manages the state and operations for Computer Vision image classification. - * * @category Types */ export interface ClassificationType { diff --git a/packages/react-native-executorch/src/types/common.ts b/packages/react-native-executorch/src/types/common.ts index 384caa861..601a4c72f 100644 --- a/packages/react-native-executorch/src/types/common.ts +++ b/packages/react-native-executorch/src/types/common.ts @@ -4,14 +4,12 @@ /** * Represents a source of a resource, which can be a string (e.g., URL or file path), a number (e.g., resource ID), or an object (e.g., binary data). - * * @category Types */ export type ResourceSource = string | number | object; /** * Enum representing the scalar types of tensors. - * * @category Types */ export enum ScalarType { @@ -107,7 +105,6 @@ export enum ScalarType { /** * Represents the data buffer of a tensor, which can be one of several typed array formats. - * * @category Types */ export type TensorBuffer = @@ -125,7 +122,6 @@ export type TensorBuffer = /** * Represents a pointer to a tensor, including its data buffer, size dimensions, and scalar type. - * * @category Types * @property {TensorBuffer} dataPtr - The data buffer of the tensor. * @property {number[]} sizes - An array representing the size of each dimension of the tensor. @@ -140,14 +136,12 @@ export interface TensorPtr { /** * A readonly record mapping string keys to numeric or string values. * Used to represent enum-like label maps for models. - * * @category Types */ export type LabelEnum = Readonly>; /** * A readonly triple of values, typically used for per-channel normalization parameters. - * * @category Types */ export type Triple = readonly [T, T, T]; diff --git a/packages/react-native-executorch/src/types/executorchModule.ts b/packages/react-native-executorch/src/types/executorchModule.ts index edf171086..e058d13eb 100644 --- a/packages/react-native-executorch/src/types/executorchModule.ts +++ b/packages/react-native-executorch/src/types/executorchModule.ts @@ -3,7 +3,6 @@ import { RnExecutorchError } from '../errors/errorUtils'; /** * Props for the `useExecutorchModule` hook. - * * @category Types * @property {ResourceSource} modelSource - The source of the ExecuTorch model binary. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. @@ -16,7 +15,6 @@ export interface ExecutorchModuleProps { /** * Return type for the `useExecutorchModule` hook. * Manages the state and core execution methods for a general ExecuTorch model. - * * @category Types */ export interface ExecutorchModuleType { diff --git a/packages/react-native-executorch/src/types/imageEmbeddings.ts b/packages/react-native-executorch/src/types/imageEmbeddings.ts index 5dc23d66f..38e416d5b 100644 --- a/packages/react-native-executorch/src/types/imageEmbeddings.ts +++ b/packages/react-native-executorch/src/types/imageEmbeddings.ts @@ -3,9 +3,8 @@ import { ResourceSource } from './common'; /** * Props for the `useImageEmbeddings` hook. - * * @category Types - * @property {Object} model - An object containing the model source. + * @property {object} model - An object containing the model source. * @property {ResourceSource} model.modelSource - The source of the image embeddings model binary. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. */ @@ -17,7 +16,6 @@ export interface ImageEmbeddingsProps { /** * Return type for the `useImageEmbeddings` hook. * Manages the state and operations for generating image embeddings (feature vectors) used in Computer Vision tasks. - * * @category Types */ export interface ImageEmbeddingsType { diff --git a/packages/react-native-executorch/src/types/llm.ts b/packages/react-native-executorch/src/types/llm.ts index 70cc492a9..6f8234ccd 100644 --- a/packages/react-native-executorch/src/types/llm.ts +++ b/packages/react-native-executorch/src/types/llm.ts @@ -3,7 +3,6 @@ import { ResourceSource } from './common'; /** * Properties for initializing and configuring a Large Language Model (LLM) instance. - * * @category Types */ export interface LLMProps { @@ -29,7 +28,6 @@ export interface LLMProps { /** * React hook for managing a Large Language Model (LLM) instance. - * * @category Types */ export interface LLMType { @@ -71,20 +69,17 @@ export interface LLMType { /** * Configures chat and tool calling. * See [Configuring the model](https://docs.swmansion.com/react-native-executorch/docs/hooks/natural-language-processing/useLLM#configuring-the-model) for details. - * * @param {LLMConfig} configuration - Configuration object containing `chatConfig`, `toolsConfig`, and `generationConfig`. */ configure: ({ chatConfig, toolsConfig, generationConfig }: LLMConfig) => void; /** * Returns the number of tokens generated so far in the current generation. - * * @returns The count of generated tokens. */ getGeneratedTokenCount: () => number; /** * Runs model to complete chat passed in `messages` argument. It doesn't manage conversation context. - * * @param messages - Array of messages representing the chat history. * @param tools - Optional array of tools that can be used during generation. * @returns The generated tokens as `string`. @@ -92,13 +87,11 @@ export interface LLMType { generate: (messages: Message[], tools?: LLMTool[]) => Promise; /** * Returns the number of total tokens from the previous generation.This is a sum of prompt tokens and generated tokens. - * * @returns The count of prompt and generated tokens. */ getTotalTokenCount: () => number; /** * Returns the number of prompt tokens in the last message. - * * @returns The count of prompt token. */ getPromptTokenCount: () => number; @@ -106,7 +99,6 @@ export interface LLMType { /** * Function to add user message to conversation. * After model responds, `messageHistory` will be updated with both user message and model response. - * * @param message - The message string to send. * @returns The model's response as a `string`. */ @@ -114,7 +106,6 @@ export interface LLMType { /** * Deletes all messages starting with message on `index` position. After deletion `messageHistory` will be updated. - * * @param index - The index of the message to delete from history. */ deleteMessage: (index: number) => void; @@ -127,7 +118,6 @@ export interface LLMType { /** * Configuration object for initializing and customizing a Large Language Model (LLM) instance. - * * @category Types */ export interface LLMConfig { @@ -169,14 +159,12 @@ export interface LLMConfig { /** * Roles that a message sender can have. - * * @category Types */ export type MessageRole = 'user' | 'assistant' | 'system'; /** * Represents a message in the conversation. - * * @category Types * @property {MessageRole} role - Role of the message sender of type `MessageRole`. * @property {string} content - Content of the message. @@ -188,10 +176,9 @@ export interface Message { /** * Represents a tool call made by the model. - * * @category Types * @property {string} toolName - The name of the tool being called. - * @property {Object} arguments - The arguments passed to the tool. + * @property {object} arguments - The arguments passed to the tool. */ export interface ToolCall { toolName: string; @@ -202,14 +189,12 @@ export interface ToolCall { * Represents a tool that can be used by the model. * Usually tool is represented with dictionary (Object), but fields depend on the model. * Unfortunately there's no one standard so it's hard to type it better. - * * @category Types */ export type LLMTool = Object; /** * Object configuring chat management. - * * @category Types * @property {Message[]} initialMessageHistory - An array of `Message` objects that represent the conversation history. This can be used to provide initial context to the model. * @property {string} systemPrompt - Often used to tell the model what is its purpose, for example - "Be a helpful translator". @@ -223,7 +208,6 @@ export interface ChatConfig { /** * Object configuring options for enabling and managing tool use. **It will only have effect if your model's chat template support it**. - * * @category Types * @property {LLMTool[]} tools - List of objects defining tools. * @property {(call: ToolCall) => Promise} executeToolCallback - Function that accepts `ToolCall`, executes tool and returns the string to model. @@ -237,7 +221,6 @@ export interface ToolsConfig { /** * Object configuring generation settings. - * * @category Types * @property {number} [temperature] - Scales output logits by the inverse of temperature. Controls the randomness / creativity of text generation. * @property {number} [topp] - Only samples from the smallest set of tokens whose cumulative probability exceeds topp. @@ -253,13 +236,12 @@ export interface GenerationConfig { /** * Defines a strategy for managing the conversation context window and message history. - * * @category Types */ export interface ContextStrategy { /** * Constructs the final array of messages to be sent to the model for the current inference step. - * * @param systemPrompt - The top-level instructions or persona assigned to the model. + * @param systemPrompt - The top-level instructions or persona assigned to the model. * @param history - The complete conversation history up to the current point. * @param maxContextLength - The maximum number of tokens that the model can keep in the context. * @param getTokenCount - A callback function provided by the LLM controller that calculates the exact number of tokens a specific array of messages will consume once formatted. @@ -275,7 +257,6 @@ export interface ContextStrategy { /** * Special tokens used in Large Language Models (LLMs). - * * @category Types */ export const SPECIAL_TOKENS = { diff --git a/packages/react-native-executorch/src/types/objectDetection.ts b/packages/react-native-executorch/src/types/objectDetection.ts index 94f7cf5c0..0b74dff86 100644 --- a/packages/react-native-executorch/src/types/objectDetection.ts +++ b/packages/react-native-executorch/src/types/objectDetection.ts @@ -3,7 +3,6 @@ import { ResourceSource } from './common'; /** * Represents a bounding box for a detected object in an image. - * * @category Types * @property {number} x1 - The x-coordinate of the bottom-left corner of the bounding box. * @property {number} y1 - The y-coordinate of the bottom-left corner of the bounding box. @@ -19,7 +18,6 @@ export interface Bbox { /** * Represents a detected object within an image, including its bounding box, label, and confidence score. - * * @category Types * @property {Bbox} bbox - The bounding box of the detected object, defined by its top-left (x1, y1) and bottom-right (x2, y2) coordinates. * @property {keyof typeof CocoLabel} label - The class label of the detected object, represented as a key from the `CocoLabel` enum. @@ -33,7 +31,6 @@ export interface Detection { /** * COCO dataset class labels used for object detection. - * * @category Types */ export enum CocoLabel { @@ -131,9 +128,8 @@ export enum CocoLabel { /** * Props for the `useObjectDetection` hook. - * * @category Types - * @property {Object} model - An object containing the model source. + * @property {object} model - An object containing the model source. * @property {ResourceSource} model.modelSource - The source of the object detection model binary. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. */ @@ -145,7 +141,6 @@ export interface ObjectDetectionProps { /** * Return type for the `useObjectDetection` hook. * Manages the state and operations for Computer Vision object detection tasks. - * * @category Types */ export interface ObjectDetectionType { diff --git a/packages/react-native-executorch/src/types/ocr.ts b/packages/react-native-executorch/src/types/ocr.ts index 6ca2f4324..786a95b17 100644 --- a/packages/react-native-executorch/src/types/ocr.ts +++ b/packages/react-native-executorch/src/types/ocr.ts @@ -5,7 +5,6 @@ import { ResourceSource } from './common'; /** * OCRDetection represents a single detected text instance in an image, * including its bounding box, recognized text, and confidence score. - * * @category Types * @property {Point[]} bbox - An array of points defining the bounding box around the detected text. * @property {string} text - The recognized text within the bounding box. @@ -19,7 +18,6 @@ export interface OCRDetection { /** * Point represents a coordinate in 2D space. - * * @category Types * @property {number} x - The x-coordinate of the point. * @property {number} y - The y-coordinate of the point. @@ -31,7 +29,6 @@ export interface Point { /** * Configuration properties for the `useOCR` hook. - * * @category Types */ export interface OCRProps { @@ -64,7 +61,6 @@ export interface OCRProps { /** * Configuration properties for the `useVerticalOCR` hook. - * * @category Types */ export interface VerticalOCRProps extends OCRProps { @@ -78,7 +74,6 @@ export interface VerticalOCRProps extends OCRProps { /** * Return type for the `useOCR` hook. * Manages the state and operations for Optical Character Recognition (OCR). - * * @category Types */ export interface OCRType { @@ -113,7 +108,6 @@ export interface OCRType { /** * Enumeration of supported OCR languages based on available symbol sets. - * * @category Types */ export type OCRLanguage = keyof typeof symbols; diff --git a/packages/react-native-executorch/src/types/semanticSegmentation.ts b/packages/react-native-executorch/src/types/semanticSegmentation.ts index 109f6f094..1d12806d7 100644 --- a/packages/react-native-executorch/src/types/semanticSegmentation.ts +++ b/packages/react-native-executorch/src/types/semanticSegmentation.ts @@ -3,13 +3,11 @@ import { LabelEnum, Triple, ResourceSource } from './common'; /** * Configuration for a custom semantic segmentation model. - * * @typeParam T - The {@link LabelEnum} type for the model. * @property labelMap - The enum-like object mapping class names to indices. * @property preprocessorConfig - Optional preprocessing parameters. * @property preprocessorConfig.normMean - Per-channel mean values for input normalization. * @property preprocessorConfig.normStd - Per-channel standard deviation values for input normalization. - * * @category Types */ export type SemanticSegmentationConfig = { @@ -21,7 +19,6 @@ export type SemanticSegmentationConfig = { * Per-model config for {@link SemanticSegmentationModule.fromModelName}. * Each model name maps to its required fields. * Add new union members here when a model needs extra sources or options. - * * @category Types */ export type SemanticSegmentationModelSources = @@ -48,7 +45,6 @@ export type SemanticSegmentationModelSources = /** * Union of all built-in semantic segmentation model names * (e.g. `'deeplab-v3-resnet50'`, `'selfie-segmentation'`). - * * @category Types */ export type SemanticSegmentationModelName = @@ -56,7 +52,6 @@ export type SemanticSegmentationModelName = /** * Extracts the model name from a {@link SemanticSegmentationModelSources} config object. - * * @category Types */ export type ModelNameOf = @@ -64,7 +59,6 @@ export type ModelNameOf = /** * Labels used in the DeepLab semantic segmentation model. - * * @category Types */ export enum DeeplabLabel { @@ -93,7 +87,6 @@ export enum DeeplabLabel { /** * Labels used in the selfie semantic segmentation model. - * * @category Types */ export enum SelfieSegmentationLabel { @@ -103,11 +96,9 @@ export enum SelfieSegmentationLabel { /** * Props for the `useSemanticSegmentation` hook. - * * @typeParam C - A {@link SemanticSegmentationModelSources} config specifying which built-in model to load. * @property model - The model config containing `modelName` and `modelSource`. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. - * * @category Types */ export interface SemanticSegmentationProps< @@ -120,9 +111,7 @@ export interface SemanticSegmentationProps< /** * Return type for the `useSemanticSegmentation` hook. * Manages the state and operations for semantic segmentation models. - * * @typeParam L - The {@link LabelEnum} representing the model's class labels. - * * @category Types */ export interface SemanticSegmentationType { diff --git a/packages/react-native-executorch/src/types/stt.ts b/packages/react-native-executorch/src/types/stt.ts index bf7fc6436..cae943cfd 100644 --- a/packages/react-native-executorch/src/types/stt.ts +++ b/packages/react-native-executorch/src/types/stt.ts @@ -3,7 +3,6 @@ import { RnExecutorchError } from '../errors/errorUtils'; /** * Configuration for Speech to Text model. - * * @category Types */ export interface SpeechToTextProps { @@ -19,7 +18,6 @@ export interface SpeechToTextProps { /** * React hook for managing Speech to Text (STT) instance. - * * @category Types */ export interface SpeechToTextType { @@ -104,7 +102,6 @@ export interface SpeechToTextType { /** * Languages supported by whisper (not whisper.en) - * * @category Types */ export type SpeechToTextLanguage = @@ -186,7 +183,6 @@ export type SpeechToTextLanguage = /** * Options for decoding speech to text. - * * @category Types * @property {SpeechToTextLanguage} [language] - Optional language code to guide the transcription. * @property {boolean} [verbose] - Optional flag. If set, transcription result is presented with timestamps @@ -199,7 +195,6 @@ export interface DecodingOptions { /** * Structure that represent single token with timestamp information. - * * @category Types * @property {string} [word] - Token as a string value. * @property {number} [start] - Timestamp of the beginning of the token in audio (in seconds). @@ -213,7 +208,6 @@ export interface Word { /** * Structure that represent single Segment of transcription. - * * @category Types * @property {number} [start] - Timestamp of the beginning of the segment in audio (in seconds). * @property {number} [end] - Timestamp of the end of the segment in audio (in seconds). @@ -238,7 +232,6 @@ export interface TranscriptionSegment { /** * Structure that represent result of transcription for a one function call (either `transcribe` or `stream`). - * * @category Types * @property {'transcribe' | 'stream'} [task] - String indicating task, either 'transcribe' or 'stream'. * @property {string} [language] - Language chosen for transcription. @@ -257,7 +250,6 @@ export interface TranscriptionResult { /** * Configuration for Speech to Text model. - * * @category Types */ export interface SpeechToTextModelConfig { diff --git a/packages/react-native-executorch/src/types/styleTransfer.ts b/packages/react-native-executorch/src/types/styleTransfer.ts index 162086722..90720ae10 100644 --- a/packages/react-native-executorch/src/types/styleTransfer.ts +++ b/packages/react-native-executorch/src/types/styleTransfer.ts @@ -3,9 +3,8 @@ import { ResourceSource } from './common'; /** * Configuration properties for the `useStyleTransfer` hook. - * * @category Types - * @property {Object} model - Object containing the `modelSource` for the style transfer model. + * @property {object} model - Object containing the `modelSource` for the style transfer model. * @property {ResourceSource} model.modelSource - `ResourceSource` that specifies the location of the style transfer model binary. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if loaded for the first time) after running the hook. */ @@ -17,7 +16,6 @@ export interface StyleTransferProps { /** * Return type for the `useStyleTransfer` hook. * Manages the state and operations for applying artistic style transfer to images. - * * @category Types */ export interface StyleTransferType { diff --git a/packages/react-native-executorch/src/types/textEmbeddings.ts b/packages/react-native-executorch/src/types/textEmbeddings.ts index 43bf6606d..86186f046 100644 --- a/packages/react-native-executorch/src/types/textEmbeddings.ts +++ b/packages/react-native-executorch/src/types/textEmbeddings.ts @@ -3,9 +3,8 @@ import { ResourceSource } from '../types/common'; /** * Props for the useTextEmbeddings hook. - * * @category Types - * @property {Object} model - An object containing the model and tokenizer sources. + * @property {object} model - An object containing the model and tokenizer sources. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. */ export interface TextEmbeddingsProps { @@ -24,7 +23,6 @@ export interface TextEmbeddingsProps { /** * React hook state and methods for managing a Text Embeddings model instance. - * * @category Types */ export interface TextEmbeddingsType { diff --git a/packages/react-native-executorch/src/types/tokenizer.ts b/packages/react-native-executorch/src/types/tokenizer.ts index 47b58124c..dba7d61e7 100644 --- a/packages/react-native-executorch/src/types/tokenizer.ts +++ b/packages/react-native-executorch/src/types/tokenizer.ts @@ -3,7 +3,6 @@ import { ResourceSource } from './common'; /** * Parameters for initializing and configuring a Tokenizer instance. - * * @category Types */ export interface TokenizerProps { @@ -22,7 +21,6 @@ export interface TokenizerProps { /** * React hook state and methods for managing a Tokenizer instance. - * * @category Types */ export interface TokenizerType { diff --git a/packages/react-native-executorch/src/types/tti.ts b/packages/react-native-executorch/src/types/tti.ts index 7cdce9fd8..d0f8c4c2b 100644 --- a/packages/react-native-executorch/src/types/tti.ts +++ b/packages/react-native-executorch/src/types/tti.ts @@ -3,7 +3,6 @@ import { ResourceSource } from '../types/common'; /** * Configuration properties for the `useTextToImage` hook. - * * @category Types */ export interface TextToImageProps { @@ -40,7 +39,6 @@ export interface TextToImageProps { /** * Return type for the `useTextToImage` hook. * Manages the state and operations for generating images from text prompts using a diffusion model pipeline. - * * @category Types */ export interface TextToImageType { diff --git a/packages/react-native-executorch/src/types/tts.ts b/packages/react-native-executorch/src/types/tts.ts index 55937be49..30704986f 100644 --- a/packages/react-native-executorch/src/types/tts.ts +++ b/packages/react-native-executorch/src/types/tts.ts @@ -3,7 +3,6 @@ import { RnExecutorchError } from '../errors/errorUtils'; /** * List all the languages available in TTS models (as lang shorthands) - * * @category Types */ export type TextToSpeechLanguage = @@ -14,7 +13,6 @@ export type TextToSpeechLanguage = * Voice configuration * * So far in Kokoro, each voice is directly associated with a language. - * * @category Types * @property {TextToSpeechLanguage} lang - speaker's language * @property {ResourceSource} voiceSource - a source to a binary file with voice embedding @@ -28,7 +26,6 @@ export interface VoiceConfig { /** * Kokoro-specific voice extra props - * * @category Types * @property {ResourceSource} taggerSource - source to Kokoro's tagger model binary * @property {ResourceSource} lexiconSource - source to Kokoro's lexicon binary @@ -41,7 +38,6 @@ export interface KokoroVoiceExtras { /** * Kokoro model configuration. * Only the core Kokoro model sources, as phonemizer sources are included in voice configuration. - * * @category Types * @property {'kokoro'} type - model type identifier * @property {ResourceSource} durationPredictorSource - source to Kokoro's duration predictor model binary @@ -55,7 +51,6 @@ export interface KokoroConfig { /** * General Text to Speech module configuration - * * @category Types * @property {KokoroConfig} model - a selected T2S model * @property {VoiceConfig} voice - a selected speaker's voice @@ -68,10 +63,8 @@ export interface TextToSpeechConfig { /** * Props for the useTextToSpeech hook. - * * @category Types - * @extends TextToSpeechConfig - * + * @augments TextToSpeechConfig * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. */ export interface TextToSpeechProps extends TextToSpeechConfig { @@ -80,7 +73,6 @@ export interface TextToSpeechProps extends TextToSpeechConfig { /** * Text to Speech module input definition - * * @category Types * @property {string} text - a text to be spoken * @property {number} [speed] - optional speed argument - the higher it is, the faster the speech becomes @@ -93,7 +85,6 @@ export interface TextToSpeechInput { /** * Return type for the `useTextToSpeech` hook. * Manages the state and operations for Text-to-Speech generation. - * * @category Types */ export interface TextToSpeechType { @@ -119,7 +110,7 @@ export interface TextToSpeechType { /** * Runs the model to convert the provided text into speech audio in a single pass. - * * @param input - The `TextToSpeechInput` object containing the `text` to synthesize and optional `speed`. + * @param input - The `TextToSpeechInput` object containing the `text` to synthesize and optional `speed`. * @returns A Promise that resolves with the generated audio data (typically a `Float32Array`). * @throws {RnExecutorchError} If the model is not loaded or is currently generating. */ @@ -128,7 +119,7 @@ export interface TextToSpeechType { /** * Streams the generated audio data incrementally. * This is optimal for real-time playback, allowing audio to start playing before the full text is synthesized. - * * @param input - The `TextToSpeechStreamingInput` object containing `text`, optional `speed`, and lifecycle callbacks (`onBegin`, `onNext`, `onEnd`). + * @param input - The `TextToSpeechStreamingInput` object containing `text`, optional `speed`, and lifecycle callbacks (`onBegin`, `onNext`, `onEnd`). * @returns A Promise that resolves when the streaming process is complete. * @throws {RnExecutorchError} If the model is not loaded or is currently generating. */ @@ -147,7 +138,6 @@ export interface TextToSpeechType { * executed at given moments of the streaming. * Actions such as playing the audio should happen within the onNext callback. * Callbacks can be both synchronous or asynchronous. - * * @category Types * @property {() => void | Promise} [onBegin] - Called when streaming begins * @property {(audio: Float32Array) => void | Promise} [onNext] - Called after each audio chunk gets calculated. diff --git a/packages/react-native-executorch/src/types/vad.ts b/packages/react-native-executorch/src/types/vad.ts index cf379124d..1e8fbd633 100644 --- a/packages/react-native-executorch/src/types/vad.ts +++ b/packages/react-native-executorch/src/types/vad.ts @@ -3,9 +3,8 @@ import { RnExecutorchError } from '../errors/errorUtils'; /** * Props for the useVAD hook. - * * @category Types - * @property {Object} model - An object containing the model source. + * @property {object} model - An object containing the model source. * @property {ResourceSource} model.modelSource - The source of the VAD model binary. * @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook. */ @@ -16,7 +15,6 @@ export interface VADProps { /** * Represents a detected audio segment with start and end timestamps. - * * @category Types * @property {number} start - Start time of the segment in seconds. * @property {number} end - End time of the segment in seconds. @@ -28,7 +26,6 @@ export interface Segment { /** * React hook state and methods for managing a Voice Activity Detection (VAD) model instance. - * * @category Types */ export interface VADType { diff --git a/packages/react-native-executorch/src/utils/ResourceFetcher.ts b/packages/react-native-executorch/src/utils/ResourceFetcher.ts index 619aebf72..4aa473c5a 100644 --- a/packages/react-native-executorch/src/utils/ResourceFetcher.ts +++ b/packages/react-native-executorch/src/utils/ResourceFetcher.ts @@ -8,9 +8,7 @@ import { ResourceFetcherUtils } from './ResourceFetcherUtils'; * **Required Methods:** * - `fetch`: Download resources to local storage (used by all modules) * - `readAsString`: Read file contents as string (used for config files) - * * @category Utilities - General - * * @remarks * This interface is intentionally minimal. Custom fetchers only need to implement * these two methods for the library to function correctly. @@ -18,12 +16,10 @@ import { ResourceFetcherUtils } from './ResourceFetcherUtils'; export interface ResourceFetcherAdapter { /** * Fetches resources (remote URLs, local files or embedded assets), downloads or stores them locally for use by React Native ExecuTorch. - * * @param callback - Optional callback to track progress of all downloads, reported between 0 and 1. * @param sources - Multiple resources that can be strings, asset references, or objects. * @returns If the fetch was successful, it returns a promise which resolves to an array of local file paths for the downloaded/stored resources (without file:// prefix). * If the fetch was interrupted, it returns a promise which resolves to `null`. - * * @remarks * **REQUIRED**: Used by all library modules for downloading models and resources. */ @@ -34,10 +30,8 @@ export interface ResourceFetcherAdapter { /** * Read file contents as a string. - * * @param path - Absolute file path * @returns File contents as string - * * @remarks * **REQUIRED**: Used internally for reading configuration files (e.g., tokenizer configs). */ @@ -47,7 +41,6 @@ export interface ResourceFetcherAdapter { /** * This module provides functions to download and work with downloaded files stored in the application's document directory inside the `react-native-executorch/` directory. * These utilities can help you manage your storage and clean up the downloaded files when they are no longer needed. - * * @category Utilities - General */ export class ResourceFetcher { @@ -55,9 +48,7 @@ export class ResourceFetcher { /** * Sets a custom resource fetcher adapter for resource operations. - * * @param adapter - The adapter instance to use for fetching resources. - * * @remarks * **INTERNAL**: Used by platform-specific init functions (expo/bare) to inject their fetcher implementation. */ @@ -67,7 +58,6 @@ export class ResourceFetcher { /** * Resets the resource fetcher adapter to null. - * * @remarks * **INTERNAL**: Used primarily for testing purposes to clear the adapter state. */ @@ -77,10 +67,8 @@ export class ResourceFetcher { /** * Gets the current resource fetcher adapter instance. - * * @returns The configured ResourceFetcherAdapter instance. * @throws {RnExecutorchError} If no adapter has been set via {@link setAdapter}. - * * @remarks * **INTERNAL**: Used internally by all resource fetching operations. */ @@ -96,7 +84,6 @@ export class ResourceFetcher { /** * Fetches resources (remote URLs, local files or embedded assets), downloads or stores them locally for use by React Native ExecuTorch. - * * @param callback - Optional callback to track progress of all downloads, reported between 0 and 1. * @param sources - Multiple resources that can be strings, asset references, or objects. * @returns If the fetch was successful, it returns a promise which resolves to an array of local file paths for the downloaded/stored resources (without file:// prefix). @@ -120,7 +107,6 @@ export class ResourceFetcher { /** * Filesystem utilities for reading downloaded resources. - * * @remarks * Provides access to filesystem operations through the configured adapter. * Currently supports reading file contents as strings for configuration files. @@ -128,10 +114,8 @@ export class ResourceFetcher { static fs = { /** * Reads the contents of a file as a string. - * * @param path - Absolute file path to read. * @returns A promise that resolves to the file contents as a string. - * * @remarks * **REQUIRED**: Used internally for reading configuration files (e.g., tokenizer configs). */ diff --git a/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts b/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts index 6aab9d2a4..b98496af5 100644 --- a/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts +++ b/packages/react-native-executorch/src/utils/ResourceFetcherUtils.ts @@ -2,22 +2,22 @@ import { ResourceSource } from '..'; /** * Http status codes - * * @category Types */ export enum HTTP_CODE { - /** * Everything is ok. + /** + Everything is ok. */ OK = 200, - /** * Server has fulfilled a client request for a specific part of a resource, instead of sending the entire file. + /** + Server has fulfilled a client request for a specific part of a resource, instead of sending the entire file. */ PARTIAL_CONTENT = 206, } /** * Download status of the file. - * * @category Types */ export enum DownloadStatus { @@ -34,7 +34,6 @@ export enum DownloadStatus { /** * Types of sources that can be downloaded - * * @category Types */ export enum SourceType { @@ -66,7 +65,6 @@ export enum SourceType { /** * Extended interface for resource sources, tracking download state and file locations. - * * @category Interfaces */ export interface ResourceSourceExtended { @@ -113,7 +111,6 @@ export interface ResourceSourceExtended { /** * Utility functions for fetching and managing resources. - * * @category Utilities - General */ export namespace ResourceFetcherUtils { diff --git a/packages/react-native-executorch/src/utils/llm.ts b/packages/react-native-executorch/src/utils/llm.ts index 5b4383ffb..4dedfe018 100644 --- a/packages/react-native-executorch/src/utils/llm.ts +++ b/packages/react-native-executorch/src/utils/llm.ts @@ -8,7 +8,6 @@ import { Logger } from '../common/Logger'; /** * Parses tool calls from a given message string. - * * @category Utilities - LLM * @param message - The message string containing tool calls in JSON format. * @returns An array of `ToolCall` objects extracted from the message. @@ -56,7 +55,6 @@ const filterObjectKeys = (obj: object, keysToRemove: string[]) => { /** * Generates a structured output prompt based on the provided schema. - * * @category Utilities - LLM * @param responseSchema - The schema (Zod or JSON Schema) defining the desired output format. * @returns A prompt string instructing the model to format its output according to the given schema. @@ -93,7 +91,6 @@ const extractBetweenBrackets = (text: string): string => { /** * Fixes and validates structured output from LLMs against a provided schema. - * * @category Utilities - LLM * @param output - The raw output string from the LLM. * @param responseSchema - The schema (Zod or JSON Schema) to validate the output against. diff --git a/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts b/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts index 83a391547..c96756137 100644 --- a/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts +++ b/packages/react-native-executorch/src/utils/llms/context_strategy/MessageCountContextStrategy.ts @@ -3,24 +3,22 @@ import { ContextStrategy, Message } from '../../../types/llm'; /** * A simple context strategy that retains a fixed number of the most recent messages. * This strategy trims the conversation history based purely on the message count. - * * @category Utils */ export class MessageCountContextStrategy implements ContextStrategy { /** * Initializes the MessageCountContextStrategy. - * * @param {number} windowLength - The maximum number of recent messages to retain in the context. Defaults to 5. + * @param windowLength - The maximum number of recent messages to retain in the context. Defaults to 5. */ constructor(private readonly windowLength: number = 5) {} /** * Builds the context by slicing the history to retain only the most recent `windowLength` messages. - * - * @param {string} systemPrompt - The top-level instructions for the model. - * @param {Message[]} history - The complete conversation history. - * @param {(messages: Message[]) => number} _getTokenCount - Unused in this strategy. - * @param {number} _maxContextLength - Unused in this strategy. - * @returns {Message[]} The truncated message history with the system prompt at the beginning. + * @param systemPrompt - The top-level instructions for the model. + * @param history - The complete conversation history. + * @param _maxContextLength - Unused in this strategy. + * @param _getTokenCount - Unused in this strategy. + * @returns The truncated message history with the system prompt at the beginning. */ buildContext( systemPrompt: string, diff --git a/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts b/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts index 243849266..a9dee23f9 100644 --- a/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts +++ b/packages/react-native-executorch/src/utils/llms/context_strategy/NoopContextStrategy.ts @@ -2,20 +2,18 @@ import { ContextStrategy, Message } from '../../../types/llm'; /** * A context strategy that performs no filtering or trimming of the message history. - * * This strategy is ideal when the developer wants to manually manage the conversation + * This strategy is ideal when the developer wants to manually manage the conversation * context. - * * @category Utils */ export class NoopContextStrategy implements ContextStrategy { /** * Builds the context by prepending the system prompt to the entire unfiltered history. - * - * @param {string} systemPrompt - The top-level instructions for the model. - * @param {Message[]} history - The complete conversation history. - * @param {number} _maxContextLength - Unused in this strategy. - * @param {(messages: Message[]) => number} _getTokenCount - Unused in this strategy. - * @returns {Message[]} The unedited message history with the system prompt at the beginning. + * @param systemPrompt - The top-level instructions for the model. + * @param history - The complete conversation history. + * @param _maxContextLength - Unused in this strategy. + * @param _getTokenCount - Unused in this strategy. + * @returns The unedited message history with the system prompt at the beginning. */ buildContext( systemPrompt: string, diff --git a/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts b/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts index 096be005e..fcbe1c295 100644 --- a/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts +++ b/packages/react-native-executorch/src/utils/llms/context_strategy/SlidingWindowContextStrategy.ts @@ -3,17 +3,16 @@ import { ContextStrategy, Message } from '../../../types/llm'; /** * An advanced, token-aware context strategy that dynamically trims the message history * to ensure it fits within the model's physical context limits. - * * This strategy calculates the exact token count of the formatted prompt. If the prompt + * This strategy calculates the exact token count of the formatted prompt. If the prompt * exceeds the allowed token budget (`maxContextLength` - `bufferTokens`), it recursively * removes the oldest messages. - * * @category Utils */ export class SlidingWindowContextStrategy implements ContextStrategy { /** * Initializes the SlidingWindowContextStrategy. - * @param {number} bufferTokens - The number of tokens to keep free for the model's generated response (e.g., 1000). - * @param {boolean} allowOrphanedAssistantMessages - Whether to allow orphaned assistant messages when trimming the history. + * @param bufferTokens - The number of tokens to keep free for the model's generated response (e.g., 1000). + * @param allowOrphanedAssistantMessages - Whether to allow orphaned assistant messages when trimming the history. * If false, the strategy will ensure that an assistant message is not left without its preceding user message. */ constructor( @@ -24,12 +23,11 @@ export class SlidingWindowContextStrategy implements ContextStrategy { /** * Builds the context by recursively evicting the oldest messages until the total * token count is safely within the defined budget. - * - * @param {string} systemPrompt - The top-level instructions for the model. - * @param {Message[]} history - The complete conversation history. - * @param {number} maxContextLength - Unused in this strategy, as the strategy relies on token count rather than message count. - * @param {(messages: Message[]) => number} getTokenCount - Callback to calculate the exact token count of the rendered template. - * @returns {Message[]} The optimized message history guaranteed to fit the token budget. + * @param systemPrompt - The top-level instructions for the model. + * @param history - The complete conversation history. + * @param maxContextLength - Unused in this strategy, as the strategy relies on token count rather than message count. + * @param getTokenCount - Callback to calculate the exact token count of the rendered template. + * @returns The optimized message history guaranteed to fit the token budget. */ buildContext( systemPrompt: string, diff --git a/yarn.lock b/yarn.lock index 829e4f42f..ed13963c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2531,6 +2531,26 @@ __metadata: languageName: node linkType: hard +"@es-joy/jsdoccomment@npm:~0.84.0": + version: 0.84.0 + resolution: "@es-joy/jsdoccomment@npm:0.84.0" + dependencies: + "@types/estree": "npm:^1.0.8" + "@typescript-eslint/types": "npm:^8.54.0" + comment-parser: "npm:1.4.5" + esquery: "npm:^1.7.0" + jsdoc-type-pratt-parser: "npm:~7.1.1" + checksum: 10/3387c5f7ae9bb52e1b9bd65757d74e4e7628741da6fe67dac08e2aa3f69de4a7cf60148707e259747a773f85ee0b40850f3839e21569d904ed705a50cbbc0ee1 + languageName: node + linkType: hard + +"@es-joy/resolve.exports@npm:1.2.0": + version: 1.2.0 + resolution: "@es-joy/resolve.exports@npm:1.2.0" + checksum: 10/238189f011902b3db0dcf9cd01d403eb565cfc80fb2614cba01c0c1f66b607575132f9952ac914a7395074fbca13415137a50152afc17b1dcb5ae032a84a680d + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.9.0 resolution: "@eslint-community/eslint-utils@npm:4.9.0" @@ -4924,6 +4944,24 @@ __metadata: languageName: node linkType: hard +"@react-navigation/core@npm:^7.13.5": + version: 7.13.5 + resolution: "@react-navigation/core@npm:7.13.5" + dependencies: + "@react-navigation/routers": "npm:^7.5.2" + escape-string-regexp: "npm:^4.0.0" + fast-deep-equal: "npm:^3.1.3" + nanoid: "npm:^3.3.11" + query-string: "npm:^7.1.3" + react-is: "npm:^19.1.0" + use-latest-callback: "npm:^0.2.4" + use-sync-external-store: "npm:^1.5.0" + peerDependencies: + react: ">= 18.2.0" + checksum: 10/3abe3f59492f97c7ea3e13cb9b531114c97156288255eac013b91c4d687377eef88653a1e3d7375cab0f995fa99ba84f5be13a2688b9637b7d0bda4f7bcac7e7 + languageName: node + linkType: hard + "@react-navigation/core@npm:^7.14.0": version: 7.14.0 resolution: "@react-navigation/core@npm:7.14.0" @@ -5020,7 +5058,7 @@ __metadata: languageName: node linkType: hard -"@react-navigation/native@npm:^7.1.28, @react-navigation/native@npm:^7.1.8": +"@react-navigation/native@npm:^7.1.28": version: 7.1.28 resolution: "@react-navigation/native@npm:7.1.28" dependencies: @@ -5036,6 +5074,31 @@ __metadata: languageName: node linkType: hard +"@react-navigation/native@npm:^7.1.8": + version: 7.1.24 + resolution: "@react-navigation/native@npm:7.1.24" + dependencies: + "@react-navigation/core": "npm:^7.13.5" + escape-string-regexp: "npm:^4.0.0" + fast-deep-equal: "npm:^3.1.3" + nanoid: "npm:^3.3.11" + use-latest-callback: "npm:^0.2.4" + peerDependencies: + react: ">= 18.2.0" + react-native: "*" + checksum: 10/efa8c912a71d40d00105b683ce3ebaba5a2f5d78142f0236a9a8bd4d6ccee8e28a105ff7ddf7a1455aa1c24abee890da7660c3e4db22a438817473596190d31e + languageName: node + linkType: hard + +"@react-navigation/routers@npm:^7.5.2": + version: 7.5.2 + resolution: "@react-navigation/routers@npm:7.5.2" + dependencies: + nanoid: "npm:^3.3.11" + checksum: 10/b490b9bf9865cc419dfe9a7c3aa99041e7495b4b48e385716c1f9ce815fb59677c9c667de7e3b17d7e1fad6f9a7da5e26ace6f2ca8cb0be5e65178e9b9cc31a9 + languageName: node + linkType: hard + "@react-navigation/routers@npm:^7.5.3": version: 7.5.3 resolution: "@react-navigation/routers@npm:7.5.3" @@ -5103,6 +5166,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/base62@npm:^1.0.0": + version: 1.0.0 + resolution: "@sindresorhus/base62@npm:1.0.0" + checksum: 10/ba1a1ccfc9de0995f0e4506b8cabff3436fd1a9815f9c1a44f6833694bba6b3db7fa61fa5fc2f63180edda01abf3c26ffd16325be0ab25409f992ba91ea6dcd0 + languageName: node + linkType: hard + "@sinonjs/commons@npm:^3.0.0, @sinonjs/commons@npm:^3.0.1": version: 3.0.1 resolution: "@sinonjs/commons@npm:3.0.1" @@ -5336,6 +5406,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:^1.0.8": + version: 1.0.8 + resolution: "@types/estree@npm:1.0.8" + checksum: 10/25a4c16a6752538ffde2826c2cc0c6491d90e69cd6187bef4a006dd2c3c45469f049e643d7e516c515f21484dc3d48fd5c870be158a5beb72f5baf3dc43e4099 + languageName: node + linkType: hard + "@types/graceful-fs@npm:^4.1.3": version: 4.1.9 resolution: "@types/graceful-fs@npm:4.1.9" @@ -5582,6 +5659,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:^8.54.0": + version: 8.56.1 + resolution: "@typescript-eslint/types@npm:8.56.1" + checksum: 10/4bcffab5b0fd48adb731fcade86a776ca4a66e229defa5a282b58ba9c95af16ffc459a7d188e27c988a35be1f6fb5b812f9cf0952692eac38d5b3e87daafb20a + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" @@ -5910,6 +5994,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.16.0": + version: 8.16.0 + resolution: "acorn@npm:8.16.0" + bin: + acorn: bin/acorn + checksum: 10/690c673bb4d61b38ef82795fab58526471ad7f7e67c0e40c4ff1e10ecd80ce5312554ef633c9995bfc4e6d170cef165711f9ca9e49040b62c0c66fbf2dd3df2b + languageName: node + linkType: hard + "agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": version: 7.1.4 resolution: "agent-base@npm:7.1.4" @@ -6043,6 +6136,13 @@ __metadata: languageName: node linkType: hard +"are-docs-informative@npm:^0.0.2": + version: 0.0.2 + resolution: "are-docs-informative@npm:0.0.2" + checksum: 10/12cdae51a4bb369832ef1a35840604247d4ed0cbc8392f2519988d170f92c3f8c60e465844f41acba1ec3062d0edb2e9133fca38cb9c1214309153d50a25fa29 + languageName: node + linkType: hard + "arg@npm:^5.0.2": version: 5.0.2 resolution: "arg@npm:5.0.2" @@ -7204,6 +7304,13 @@ __metadata: languageName: node linkType: hard +"comment-parser@npm:1.4.5": + version: 1.4.5 + resolution: "comment-parser@npm:1.4.5" + checksum: 10/4b5cacc7ab1ec48e3f51b788bd7cda567f5c83040e029e5c92eacf0785735a9b44ac49fdaf73d9bd4af9464aa4cc8cc7184902090b55b0023605a845f2666ba4 + languageName: node + linkType: hard + "comment-parser@npm:^1.4.0": version: 1.4.1 resolution: "comment-parser@npm:1.4.1" @@ -7655,7 +7762,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.4.0, debug@npm:^4.4.1": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -8343,6 +8450,30 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-jsdoc@npm:^62.7.1": + version: 62.7.1 + resolution: "eslint-plugin-jsdoc@npm:62.7.1" + dependencies: + "@es-joy/jsdoccomment": "npm:~0.84.0" + "@es-joy/resolve.exports": "npm:1.2.0" + are-docs-informative: "npm:^0.0.2" + comment-parser: "npm:1.4.5" + debug: "npm:^4.4.3" + escape-string-regexp: "npm:^4.0.0" + espree: "npm:^11.1.0" + esquery: "npm:^1.7.0" + html-entities: "npm:^2.6.0" + object-deep-merge: "npm:^2.0.0" + parse-imports-exports: "npm:^0.2.4" + semver: "npm:^7.7.4" + spdx-expression-parse: "npm:^4.0.0" + to-valid-identifier: "npm:^1.0.0" + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 + checksum: 10/cd4e6b0fa84747456f84ae1a5266de61b4e2171121ad57b6a27b58b09c9130dd4088d4e876b57fa7f0c88dc8c2029d6ee0e2d982fcfb164a75076e25ddc8949e + languageName: node + linkType: hard + "eslint-plugin-markdown@npm:^5.1.0": version: 5.1.0 resolution: "eslint-plugin-markdown@npm:5.1.0" @@ -8463,6 +8594,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^5.0.1": + version: 5.0.1 + resolution: "eslint-visitor-keys@npm:5.0.1" + checksum: 10/f9cc1a57b75e0ef949545cac33d01e8367e302de4c1483266ed4d8646ee5c306376660196bbb38b004e767b7043d1e661cb4336b49eff634a1bbe75c1db709ec + languageName: node + linkType: hard + "eslint@npm:^8.57.0": version: 8.57.1 resolution: "eslint@npm:8.57.1" @@ -8511,6 +8649,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^11.1.0": + version: 11.1.1 + resolution: "espree@npm:11.1.1" + dependencies: + acorn: "npm:^8.16.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^5.0.1" + checksum: 10/58ecfae40f4e1f2c54a825ff7a50c5f9cda42901468ba93354c13a1eb69aba0f15d68df5822bbcb02058f822214aba7ca24389eee2e6c27bb0cd3a05972606ae + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -8541,6 +8690,15 @@ __metadata: languageName: node linkType: hard +"esquery@npm:^1.7.0": + version: 1.7.0 + resolution: "esquery@npm:1.7.0" + dependencies: + estraverse: "npm:^5.1.0" + checksum: 10/4afaf3089367e1f5885caa116ef386dffd8bfd64da21fd3d0e56e938d2667cfb2e5400ab4a825aa70e799bb3741e5b5d63c0b94d86e2d4cf3095c9e64b2f5a15 + languageName: node + linkType: hard + "esrecurse@npm:^4.3.0": version: 4.3.0 resolution: "esrecurse@npm:4.3.0" @@ -9742,6 +9900,13 @@ __metadata: languageName: node linkType: hard +"html-entities@npm:^2.6.0": + version: 2.6.0 + resolution: "html-entities@npm:2.6.0" + checksum: 10/06d4e7a3ba6243bba558af176e56f85e09894b26d911bc1ef7b2b9b3f18b46604360805b32636f080e954778e9a34313d1982479a05a5aa49791afd6a4229346 + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -11125,6 +11290,13 @@ __metadata: languageName: node linkType: hard +"jsdoc-type-pratt-parser@npm:~7.1.1": + version: 7.1.1 + resolution: "jsdoc-type-pratt-parser@npm:7.1.1" + checksum: 10/2fd8a4b2b373d63d7d74993be3098230faebc24a7a964f78cfde42deb484646c3bd00d7388e44965a44f86d250d218d536d4e0e12b150fa85117532d877a482e + languageName: node + linkType: hard + "jsesc@npm:^3.0.2, jsesc@npm:~3.1.0": version: 3.1.0 resolution: "jsesc@npm:3.1.0" @@ -13391,6 +13563,13 @@ __metadata: languageName: node linkType: hard +"object-deep-merge@npm:^2.0.0": + version: 2.0.0 + resolution: "object-deep-merge@npm:2.0.0" + checksum: 10/d2f9aa0b2160118f3e261fe51634a958b9f19993f64479911df3d3b4daa0212cb01bf2a7cf2c3ab1a1830cc167151a408ecf8c3e47efa44343b516777d6ef11c + languageName: node + linkType: hard + "object-inspect@npm:^1.13.3, object-inspect@npm:^1.13.4": version: 1.13.4 resolution: "object-inspect@npm:1.13.4" @@ -13691,6 +13870,15 @@ __metadata: languageName: node linkType: hard +"parse-imports-exports@npm:^0.2.4": + version: 0.2.4 + resolution: "parse-imports-exports@npm:0.2.4" + dependencies: + parse-statements: "npm:1.0.11" + checksum: 10/144d459771d1aeaa80eebffe43a2074c34e5b79a86d326c907efea90b62ff41af9555600b8e117e6cab717654d8e20b440e9ab09cdbbc9092f352cb0a9e1f3a3 + languageName: node + linkType: hard + "parse-json@npm:^4.0.0": version: 4.0.0 resolution: "parse-json@npm:4.0.0" @@ -13722,6 +13910,13 @@ __metadata: languageName: node linkType: hard +"parse-statements@npm:1.0.11": + version: 1.0.11 + resolution: "parse-statements@npm:1.0.11" + checksum: 10/287c2739f4cbffa08e28a95ea2d3ff4a8a51ddb367df6212ae2cd80580a1189e09c6edcb8277fc05d0fdbcb93c86ad16b591f317e2fe12ac4189de738863e514 + languageName: node + linkType: hard + "parseurl@npm:~1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" @@ -14307,6 +14502,7 @@ __metadata: cspell: "npm:^8.19.0" eslint: "npm:^8.57.0" eslint-plugin-ft-flow: "npm:^2.0.3" + eslint-plugin-jsdoc: "npm:^62.7.1" eslint-plugin-markdown: "npm:^5.1.0" eslint-plugin-prettier: "npm:^5.0.1" prettier: "npm:^3.3.3" @@ -14806,6 +15002,13 @@ __metadata: languageName: node linkType: hard +"reserved-identifiers@npm:^1.0.0": + version: 1.2.0 + resolution: "reserved-identifiers@npm:1.2.0" + checksum: 10/02722585aa97f25384a59a33055529a90c8fa8ce3d32f02be4bcec1454254fb385429fc3168a85fe56bb952ad632ea8fecb8fa2addb47e7d97a1ab4922827ad9 + languageName: node + linkType: hard + "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -15079,7 +15282,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.7.2, semver@npm:^7.7.3": +"semver@npm:^7.7.2, semver@npm:^7.7.3, semver@npm:^7.7.4": version: 7.7.4 resolution: "semver@npm:7.7.4" bin: @@ -15446,6 +15649,30 @@ __metadata: languageName: node linkType: hard +"spdx-exceptions@npm:^2.1.0": + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: 10/bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^4.0.0": + version: 4.0.0 + resolution: "spdx-expression-parse@npm:4.0.0" + dependencies: + spdx-exceptions: "npm:^2.1.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10/936be681fbf5edeec3a79c023136479f70d6edb3fd3875089ac86cd324c6c8c81add47399edead296d1d0af17ae5ce88c7f88885eb150b62c2ff6e535841ca6a + languageName: node + linkType: hard + +"spdx-license-ids@npm:^3.0.0": + version: 3.0.23 + resolution: "spdx-license-ids@npm:3.0.23" + checksum: 10/fead6be44478e4dd73a0721ae569f4a04f358846d8d82e8d92efae64aca928592e380cf17e8b84c25c948f3a7d8a0b4fc781a1830f3911ca87d52733265176b5 + languageName: node + linkType: hard + "speech@workspace:apps/speech": version: 0.0.0-use.local resolution: "speech@workspace:apps/speech" @@ -15995,6 +16222,16 @@ __metadata: languageName: node linkType: hard +"to-valid-identifier@npm:^1.0.0": + version: 1.0.0 + resolution: "to-valid-identifier@npm:1.0.0" + dependencies: + "@sindresorhus/base62": "npm:^1.0.0" + reserved-identifiers: "npm:^1.0.0" + checksum: 10/fba7ebdf464c92c92ccde887f917c9461792f99b738d36bebe5c3bd07562c3fdceedfd120ac115da359162b115798136bb8b9ea7417d7e3a663db9425ff1bcc1 + languageName: node + linkType: hard + "toidentifier@npm:1.0.1, toidentifier@npm:~1.0.1": version: 1.0.1 resolution: "toidentifier@npm:1.0.1"