react-native-executorch 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -13
- package/android/build.gradle +1 -1
- package/android/libs/executorch.aar +0 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/ETModule.kt +1 -2
- package/android/src/main/java/com/swmansion/rnexecutorch/ImageSegmentation.kt +58 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +13 -49
- package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +37 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/StyleTransfer.kt +1 -1
- package/android/src/main/java/com/swmansion/rnexecutorch/TextEmbeddings.kt +51 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/Tokenizer.kt +86 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/BaseModel.kt +3 -4
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsModel.kt +48 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsUtils.kt +37 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/classification/ClassificationModel.kt +1 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/Constants.kt +26 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/ImageSegmentationModel.kt +142 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/RecognizerUtils.kt +3 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/{StyleTransferModel.kt → styleTransfer/StyleTransferModel.kt} +2 -1
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/ArrayUtils.kt +0 -8
- package/android/src/main/java/com/swmansion/rnexecutorch/{models/classification/Utils.kt → utils/Numerical.kt} +1 -1
- package/ios/ExecutorchLib.xcframework/Info.plist +4 -4
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/RnExecutorch/Classification.mm +15 -18
- package/ios/RnExecutorch/ETModule.mm +6 -5
- package/ios/RnExecutorch/ImageSegmentation.h +5 -0
- package/ios/RnExecutorch/ImageSegmentation.mm +60 -0
- package/ios/RnExecutorch/LLM.mm +12 -53
- package/ios/RnExecutorch/OCR.mm +39 -43
- package/ios/RnExecutorch/ObjectDetection.mm +20 -20
- package/ios/RnExecutorch/SpeechToText.mm +6 -7
- package/ios/RnExecutorch/StyleTransfer.mm +16 -19
- package/ios/RnExecutorch/TextEmbeddings.h +5 -0
- package/ios/RnExecutorch/TextEmbeddings.mm +62 -0
- package/ios/RnExecutorch/Tokenizer.h +5 -0
- package/ios/RnExecutorch/Tokenizer.mm +83 -0
- package/ios/RnExecutorch/VerticalOCR.mm +36 -36
- package/ios/RnExecutorch/models/BaseModel.h +2 -5
- package/ios/RnExecutorch/models/BaseModel.mm +5 -15
- package/ios/RnExecutorch/models/classification/ClassificationModel.mm +2 -3
- package/ios/RnExecutorch/models/classification/Constants.mm +0 -1
- package/ios/RnExecutorch/models/image_segmentation/Constants.h +4 -0
- package/ios/RnExecutorch/models/image_segmentation/Constants.mm +8 -0
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.h +10 -0
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.mm +146 -0
- package/ios/RnExecutorch/models/object_detection/SSDLiteLargeModel.mm +1 -2
- package/ios/RnExecutorch/models/ocr/Detector.h +0 -2
- package/ios/RnExecutorch/models/ocr/Detector.mm +2 -1
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.h +5 -4
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.mm +9 -26
- package/ios/RnExecutorch/models/ocr/Recognizer.mm +1 -2
- package/ios/RnExecutorch/models/ocr/VerticalDetector.h +0 -2
- package/ios/RnExecutorch/models/ocr/VerticalDetector.mm +2 -1
- package/ios/RnExecutorch/models/ocr/utils/OCRUtils.mm +0 -1
- package/ios/RnExecutorch/models/stt/Moonshine.mm +1 -6
- package/ios/RnExecutorch/models/stt/SpeechToTextBaseModel.mm +7 -11
- package/ios/RnExecutorch/models/stt/Whisper.mm +0 -5
- package/ios/RnExecutorch/models/{StyleTransferModel.h → style_transfer/StyleTransferModel.h} +1 -1
- package/ios/RnExecutorch/models/{StyleTransferModel.mm → style_transfer/StyleTransferModel.mm} +2 -3
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.h +15 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.mm +45 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.h +8 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.mm +49 -0
- package/ios/RnExecutorch/utils/Conversions.h +15 -0
- package/ios/RnExecutorch/utils/ImageProcessor.h +0 -1
- package/ios/RnExecutorch/{models/classification/Utils.h → utils/Numerical.h} +0 -2
- package/ios/RnExecutorch/{models/classification/Utils.mm → utils/Numerical.mm} +0 -2
- package/ios/RnExecutorch/utils/ObjectDetectionUtils.mm +0 -2
- package/ios/RnExecutorch/utils/SFFT.mm +1 -1
- package/ios/RnExecutorch/utils/ScalarType.h +0 -2
- package/lib/module/Error.js +16 -2
- package/lib/module/Error.js.map +1 -1
- package/lib/module/constants/{llamaDefaults.js → llmDefaults.js} +7 -3
- package/lib/module/constants/llmDefaults.js.map +1 -0
- package/lib/module/constants/modelUrls.js +88 -27
- package/lib/module/constants/modelUrls.js.map +1 -1
- package/lib/module/constants/ocr/models.js +290 -0
- package/lib/module/constants/ocr/models.js.map +1 -0
- package/lib/module/constants/ocr/symbols.js +137 -2
- package/lib/module/constants/ocr/symbols.js.map +1 -1
- package/lib/module/constants/sttDefaults.js +50 -25
- package/lib/module/constants/sttDefaults.js.map +1 -1
- package/lib/module/controllers/LLMController.js +205 -0
- package/lib/module/controllers/LLMController.js.map +1 -0
- package/lib/module/controllers/OCRController.js +5 -10
- package/lib/module/controllers/OCRController.js.map +1 -1
- package/lib/module/controllers/SpeechToTextController.js +225 -122
- package/lib/module/controllers/SpeechToTextController.js.map +1 -1
- package/lib/module/controllers/VerticalOCRController.js +6 -10
- package/lib/module/controllers/VerticalOCRController.js.map +1 -1
- package/lib/module/hooks/computer_vision/useClassification.js +8 -23
- package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageSegmentation.js +13 -0
- package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -0
- package/lib/module/hooks/computer_vision/useOCR.js +11 -6
- package/lib/module/hooks/computer_vision/useOCR.js.map +1 -1
- package/lib/module/hooks/computer_vision/useObjectDetection.js +8 -23
- package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
- package/lib/module/hooks/computer_vision/useStyleTransfer.js +8 -23
- package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
- package/lib/module/hooks/computer_vision/useVerticalOCR.js +10 -7
- package/lib/module/hooks/computer_vision/useVerticalOCR.js.map +1 -1
- package/lib/module/hooks/general/useExecutorchModule.js +8 -36
- package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useLLM.js +54 -63
- package/lib/module/hooks/natural_language_processing/useLLM.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js +15 -11
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +14 -0
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -0
- package/lib/module/hooks/natural_language_processing/useTokenizer.js +54 -0
- package/lib/module/hooks/natural_language_processing/useTokenizer.js.map +1 -0
- package/lib/module/hooks/useModule.js +18 -62
- package/lib/module/hooks/useModule.js.map +1 -1
- package/lib/module/index.js +16 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/BaseModule.js +9 -10
- package/lib/module/modules/BaseModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ClassificationModule.js +8 -5
- package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js +28 -0
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -0
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js +8 -5
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
- package/lib/module/modules/computer_vision/StyleTransferModule.js +8 -5
- package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
- package/lib/module/modules/general/ExecutorchModule.js +8 -5
- package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/LLMModule.js +46 -27
- package/lib/module/modules/natural_language_processing/LLMModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js +8 -5
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +14 -0
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -0
- package/lib/module/modules/natural_language_processing/TokenizerModule.js +26 -0
- package/lib/module/modules/natural_language_processing/TokenizerModule.js.map +1 -0
- package/lib/module/native/NativeClassification.js.map +1 -1
- package/lib/module/native/NativeImageSegmentation.js +5 -0
- package/lib/module/native/NativeImageSegmentation.js.map +1 -0
- package/lib/module/native/NativeLLM.js.map +1 -1
- package/lib/module/native/NativeTextEmbeddings.js +5 -0
- package/lib/module/native/NativeTextEmbeddings.js.map +1 -0
- package/lib/module/native/NativeTokenizer.js +5 -0
- package/lib/module/native/NativeTokenizer.js.map +1 -0
- package/lib/module/native/RnExecutorchModules.js +18 -113
- package/lib/module/native/RnExecutorchModules.js.map +1 -1
- package/lib/module/types/common.js.map +1 -1
- package/lib/module/types/imageSegmentation.js +29 -0
- package/lib/module/types/imageSegmentation.js.map +1 -0
- package/lib/module/types/llm.js +7 -0
- package/lib/module/types/llm.js.map +1 -0
- package/lib/module/types/{object_detection.js → objectDetection.js} +1 -1
- package/lib/module/types/objectDetection.js.map +1 -0
- package/lib/module/types/ocr.js +2 -0
- package/lib/module/types/stt.js +82 -0
- package/lib/module/types/stt.js.map +1 -0
- package/lib/module/utils/ResourceFetcher.js +156 -0
- package/lib/module/utils/ResourceFetcher.js.map +1 -0
- package/lib/module/utils/llm.js +25 -0
- package/lib/module/utils/llm.js.map +1 -0
- package/lib/module/utils/stt.js +22 -0
- package/lib/module/utils/stt.js.map +1 -0
- package/lib/typescript/Error.d.ts +4 -1
- package/lib/typescript/Error.d.ts.map +1 -1
- package/lib/typescript/constants/{llamaDefaults.d.ts → llmDefaults.d.ts} +5 -5
- package/lib/typescript/constants/llmDefaults.d.ts.map +1 -0
- package/lib/typescript/constants/modelUrls.d.ts +74 -28
- package/lib/typescript/constants/modelUrls.d.ts.map +1 -1
- package/lib/typescript/constants/ocr/models.d.ts +285 -0
- package/lib/typescript/constants/ocr/models.d.ts.map +1 -0
- package/lib/typescript/constants/ocr/symbols.d.ts +73 -1
- package/lib/typescript/constants/ocr/symbols.d.ts.map +1 -1
- package/lib/typescript/constants/sttDefaults.d.ts +8 -13
- package/lib/typescript/constants/sttDefaults.d.ts.map +1 -1
- package/lib/typescript/controllers/LLMController.d.ts +46 -0
- package/lib/typescript/controllers/LLMController.d.ts.map +1 -0
- package/lib/typescript/controllers/OCRController.d.ts.map +1 -1
- package/lib/typescript/controllers/SpeechToTextController.d.ts +30 -16
- package/lib/typescript/controllers/SpeechToTextController.d.ts.map +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts +5 -5
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts +37 -0
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts.map +1 -0
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts +2 -1
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts +5 -4
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts +4 -2
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts +2 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/general/useExecutorchModule.d.ts +5 -6
- package/lib/typescript/hooks/general/useExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts +6 -6
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts +7 -3
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts +13 -0
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts.map +1 -0
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts +16 -0
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts.map +1 -0
- package/lib/typescript/hooks/useModule.d.ts +11 -10
- package/lib/typescript/hooks/useModule.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +15 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/BaseModule.d.ts +4 -5
- package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +7 -7
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +32 -0
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -0
- package/lib/typescript/modules/computer_vision/OCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +6 -5
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +6 -5
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/VerticalOCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/general/ExecutorchModule.d.ts +4 -3
- package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts +19 -5
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts +7 -4
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +8 -0
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -0
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts +12 -0
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts.map +1 -0
- package/lib/typescript/native/NativeClassification.d.ts.map +1 -1
- package/lib/typescript/native/NativeImageSegmentation.d.ts +10 -0
- package/lib/typescript/native/NativeImageSegmentation.d.ts.map +1 -0
- package/lib/typescript/native/NativeLLM.d.ts +3 -4
- package/lib/typescript/native/NativeLLM.d.ts.map +1 -1
- package/lib/typescript/native/NativeObjectDetection.d.ts +1 -1
- package/lib/typescript/native/NativeObjectDetection.d.ts.map +1 -1
- package/lib/typescript/native/NativeSpeechToText.d.ts +2 -2
- package/lib/typescript/native/NativeSpeechToText.d.ts.map +1 -1
- package/lib/typescript/native/NativeTextEmbeddings.d.ts +8 -0
- package/lib/typescript/native/NativeTextEmbeddings.d.ts.map +1 -0
- package/lib/typescript/native/NativeTokenizer.d.ts +12 -0
- package/lib/typescript/native/NativeTokenizer.d.ts.map +1 -0
- package/lib/typescript/native/RnExecutorchModules.d.ts +18 -41
- package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
- package/lib/typescript/types/common.d.ts +1 -26
- package/lib/typescript/types/common.d.ts.map +1 -1
- package/lib/typescript/types/imageSegmentation.d.ts +25 -0
- package/lib/typescript/types/imageSegmentation.d.ts.map +1 -0
- package/lib/typescript/types/llm.d.ts +38 -0
- package/lib/typescript/types/llm.d.ts.map +1 -0
- package/lib/typescript/types/{object_detection.d.ts → objectDetection.d.ts} +1 -1
- package/lib/typescript/types/objectDetection.d.ts.map +1 -0
- package/lib/typescript/types/ocr.d.ts +2 -1
- package/lib/typescript/types/ocr.d.ts.map +1 -1
- package/lib/typescript/types/stt.d.ts +91 -0
- package/lib/typescript/types/stt.d.ts.map +1 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts +17 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -0
- package/lib/typescript/utils/llm.d.ts +3 -0
- package/lib/typescript/utils/llm.d.ts.map +1 -0
- package/lib/typescript/utils/stt.d.ts +2 -0
- package/lib/typescript/utils/stt.d.ts.map +1 -0
- package/package.json +12 -48
- package/react-native-executorch.podspec +1 -1
- package/src/Error.ts +16 -3
- package/src/constants/llmDefaults.ts +14 -0
- package/src/constants/modelUrls.ts +146 -39
- package/src/constants/ocr/models.ts +453 -0
- package/src/constants/ocr/symbols.ts +147 -3
- package/src/constants/sttDefaults.ts +55 -37
- package/src/controllers/LLMController.ts +286 -0
- package/src/controllers/OCRController.ts +14 -28
- package/src/controllers/SpeechToTextController.ts +318 -180
- package/src/controllers/VerticalOCRController.ts +17 -32
- package/src/hooks/computer_vision/useClassification.ts +11 -26
- package/src/hooks/computer_vision/useImageSegmentation.ts +18 -0
- package/src/hooks/computer_vision/useOCR.ts +17 -5
- package/src/hooks/computer_vision/useObjectDetection.ts +10 -24
- package/src/hooks/computer_vision/useStyleTransfer.ts +9 -25
- package/src/hooks/computer_vision/useVerticalOCR.ts +11 -4
- package/src/hooks/general/useExecutorchModule.ts +10 -50
- package/src/hooks/natural_language_processing/useLLM.ts +80 -97
- package/src/hooks/natural_language_processing/useSpeechToText.ts +39 -12
- package/src/hooks/natural_language_processing/useTextEmbeddings.ts +18 -0
- package/src/hooks/natural_language_processing/useTokenizer.ts +61 -0
- package/src/hooks/useModule.ts +32 -92
- package/src/index.tsx +16 -2
- package/src/modules/BaseModule.ts +16 -26
- package/src/modules/computer_vision/ClassificationModule.ts +13 -8
- package/src/modules/computer_vision/ImageSegmentationModule.ts +39 -0
- package/src/modules/computer_vision/ObjectDetectionModule.ts +13 -8
- package/src/modules/computer_vision/StyleTransferModule.ts +13 -8
- package/src/modules/general/ExecutorchModule.ts +11 -6
- package/src/modules/natural_language_processing/LLMModule.ts +64 -51
- package/src/modules/natural_language_processing/SpeechToTextModule.ts +25 -10
- package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +18 -0
- package/src/modules/natural_language_processing/TokenizerModule.ts +34 -0
- package/src/native/NativeClassification.ts +0 -1
- package/src/native/NativeImageSegmentation.ts +14 -0
- package/src/native/NativeLLM.ts +3 -10
- package/src/native/NativeObjectDetection.ts +1 -1
- package/src/native/NativeSpeechToText.ts +2 -2
- package/src/native/NativeTextEmbeddings.ts +9 -0
- package/src/native/NativeTokenizer.ts +13 -0
- package/src/native/RnExecutorchModules.ts +54 -234
- package/src/types/common.ts +1 -44
- package/src/types/imageSegmentation.ts +25 -0
- package/src/types/llm.ts +57 -0
- package/src/types/ocr.ts +3 -1
- package/src/types/stt.ts +93 -0
- package/src/utils/ResourceFetcher.ts +196 -0
- package/src/utils/llm.ts +34 -0
- package/src/utils/stt.ts +28 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/llms/ConversationManager.kt +0 -68
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/_CodeSignature/CodeResources +0 -124
- package/ios/RnExecutorch/utils/llms/Constants.h +0 -6
- package/ios/RnExecutorch/utils/llms/Constants.mm +0 -23
- package/ios/RnExecutorch/utils/llms/ConversationManager.h +0 -26
- package/ios/RnExecutorch/utils/llms/ConversationManager.mm +0 -71
- package/lib/module/constants/llamaDefaults.js.map +0 -1
- package/lib/module/modules/computer_vision/BaseCVModule.js +0 -14
- package/lib/module/modules/computer_vision/BaseCVModule.js.map +0 -1
- package/lib/module/types/object_detection.js.map +0 -1
- package/lib/module/utils/fetchResource.js +0 -93
- package/lib/module/utils/fetchResource.js.map +0 -1
- package/lib/module/utils/listDownloadedResources.js +0 -13
- package/lib/module/utils/listDownloadedResources.js.map +0 -1
- package/lib/typescript/constants/llamaDefaults.d.ts.map +0 -1
- package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts +0 -9
- package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts.map +0 -1
- package/lib/typescript/types/object_detection.d.ts.map +0 -1
- package/lib/typescript/utils/fetchResource.d.ts +0 -3
- package/lib/typescript/utils/fetchResource.d.ts.map +0 -1
- package/lib/typescript/utils/listDownloadedResources.d.ts +0 -3
- package/lib/typescript/utils/listDownloadedResources.d.ts.map +0 -1
- package/src/constants/llamaDefaults.ts +0 -9
- package/src/modules/computer_vision/BaseCVModule.ts +0 -22
- package/src/utils/fetchResource.ts +0 -106
- package/src/utils/listDownloadedResources.ts +0 -12
- /package/src/types/{object_detection.ts → objectDetection.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectDetectionModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/ObjectDetectionModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ObjectDetectionModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/ObjectDetectionModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,qBAAsB,SAAQ,UAAU;IACnD,iBAA0B,YAAY,oDAA+B;WAE/C,IAAI,CAAC,WAAW,EAAE,cAAc;WAIhC,OAAO,CAC3B,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;CAGhD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare class StyleTransferModule extends
|
|
4
|
-
static
|
|
5
|
-
static
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { BaseModule } from '../BaseModule';
|
|
3
|
+
export declare class StyleTransferModule extends BaseModule {
|
|
4
|
+
protected static nativeModule: import("../../native/NativeStyleTransfer").Spec;
|
|
5
|
+
static load(modelSource: ResourceSource): Promise<void>;
|
|
6
|
+
static forward(input: string): ReturnType<typeof this.nativeModule.forward>;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=StyleTransferModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleTransferModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/StyleTransferModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StyleTransferModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/StyleTransferModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,UAAU;IACjD,iBAA0B,YAAY,kDAA6B;WAE7C,IAAI,CAAC,WAAW,EAAE,cAAc;WAIhC,OAAO,CAC3B,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;CAGhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalOCRModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/VerticalOCRModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC;IAErC,MAAM,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"VerticalOCRModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/VerticalOCRModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC;IAErC,MAAM,CAAC,0BAA0B,GAAI,mBAAmB,MAAM,UAAQ;WAEzD,IAAI,CACf,eAAe,EAAE;QACf,aAAa,EAAE,cAAc,CAAC;QAC9B,cAAc,EAAE,cAAc,CAAC;KAChC,EACD,iBAAiB,EAAE;QACjB,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;KACjC,EACD,QAAQ,GAAE,WAAkB,EAC5B,qBAAqB,GAAE,OAAe;WAc3B,OAAO,CAAC,KAAK,EAAE,MAAM;IAIlC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI;CAGvE"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ETModule } from '../../native/RnExecutorchModules';
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
3
2
|
import { ETInput } from '../../types/common';
|
|
3
|
+
import { BaseModule } from '../BaseModule';
|
|
4
4
|
export declare class ExecutorchModule extends BaseModule {
|
|
5
|
-
static
|
|
5
|
+
protected static nativeModule: import("../../native/NativeETModule").Spec;
|
|
6
|
+
static load(modelSource: ResourceSource): Promise<void>;
|
|
6
7
|
static forward(input: ETInput[] | ETInput, shape: number[][]): Promise<number[][]>;
|
|
7
8
|
static loadMethod(methodName: string): Promise<void>;
|
|
8
9
|
static loadForward(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutorchModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/general/ExecutorchModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExecutorchModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/general/ExecutorchModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,iBAA0B,YAAY,6CAAwB;WAExC,IAAI,CAAC,WAAW,EAAE,cAAc;WAIhC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;WA4B9D,UAAU,CAAC,UAAU,EAAE,MAAM;WAQ7B,WAAW;CAGzB"}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
import { LLMController } from '../../controllers/LLMController';
|
|
1
2
|
import { ResourceSource } from '../../types/common';
|
|
3
|
+
import { ChatConfig, LLMTool, Message, ToolsConfig } from '../../types/llm';
|
|
2
4
|
export declare class LLMModule {
|
|
3
|
-
static
|
|
4
|
-
static load(modelSource
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
static controller: LLMController;
|
|
6
|
+
static load({ modelSource, tokenizerSource, tokenizerConfigSource, onDownloadProgressCallback, responseCallback, messageHistoryCallback, }: {
|
|
7
|
+
modelSource: ResourceSource;
|
|
8
|
+
tokenizerSource: ResourceSource;
|
|
9
|
+
tokenizerConfigSource: ResourceSource;
|
|
10
|
+
onDownloadProgressCallback?: (_downloadProgress: number) => void;
|
|
11
|
+
responseCallback?: (response: string) => void;
|
|
12
|
+
messageHistoryCallback?: (messageHistory: Message[]) => void;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
static configure({ chatConfig, toolsConfig, }: {
|
|
15
|
+
chatConfig?: Partial<ChatConfig>;
|
|
16
|
+
toolsConfig?: ToolsConfig;
|
|
17
|
+
}): void;
|
|
18
|
+
static forward(input: string): Promise<string>;
|
|
19
|
+
static generate(messages: Message[], tools?: LLMTool[]): Promise<string>;
|
|
20
|
+
static sendMessage(message: string): Promise<Message[]>;
|
|
21
|
+
static deleteMessage(index: number): Promise<Message[]>;
|
|
8
22
|
static interrupt(): void;
|
|
9
23
|
static delete(): void;
|
|
10
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/LLMModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LLMModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/LLMModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE5E,qBAAa,SAAS;IACpB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC;WAEpB,IAAI,CAAC,EAChB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,gBAAgB,EAChB,sBAAsB,GACvB,EAAE;QACD,WAAW,EAAE,cAAc,CAAC;QAC5B,eAAe,EAAE,cAAc,CAAC;QAChC,qBAAqB,EAAE,cAAc,CAAC;QACtC,0BAA0B,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,IAAI,CAAC;QACjE,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QAC9C,sBAAsB,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;KAC9D;IAaD,MAAM,CAAC,SAAS,CAAC,EACf,UAAU,EACV,WAAW,GACZ,EAAE;QACD,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QACjC,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B;WAIY,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAKvC,QAAQ,CACnB,QAAQ,EAAE,OAAO,EAAE,EACnB,KAAK,CAAC,EAAE,OAAO,EAAE,GAChB,OAAO,CAAC,MAAM,CAAC;WAKL,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;WAKhD,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAK7D,MAAM,CAAC,SAAS;IAIhB,MAAM,CAAC,MAAM;CAGd"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ResourceSource } from '../../types/common';
|
|
2
2
|
import { SpeechToTextController } from '../../controllers/SpeechToTextController';
|
|
3
|
+
import { AvailableModels, SpeechToTextLanguage } from '../../types/stt';
|
|
4
|
+
import { STREAMING_ACTION } from '../../constants/sttDefaults';
|
|
3
5
|
export declare class SpeechToText {
|
|
4
6
|
static module: SpeechToTextController;
|
|
5
7
|
static onDownloadProgressCallback: (_downloadProgress: number) => void;
|
|
6
|
-
static load(modelName:
|
|
8
|
+
static load(modelName: AvailableModels, transcribeCallback: (sequence: string) => void, modelDownloadProgressCallback?: (downloadProgress: number) => void, encoderSource?: ResourceSource, decoderSource?: ResourceSource, tokenizerSource?: ResourceSource, overlapSeconds?: ConstructorParameters<typeof SpeechToTextController>['0']['overlapSeconds'], windowSize?: ConstructorParameters<typeof SpeechToTextController>['0']['windowSize'], streamingConfig?: ConstructorParameters<typeof SpeechToTextController>['0']['streamingConfig']): Promise<void>;
|
|
7
9
|
static configureStreaming(overlapSeconds: Parameters<SpeechToTextController['configureStreaming']>[0], windowSize: Parameters<SpeechToTextController['configureStreaming']>[1], streamingConfig: Parameters<SpeechToTextController['configureStreaming']>[2]): void;
|
|
8
|
-
static
|
|
9
|
-
static
|
|
10
|
-
static
|
|
10
|
+
static encode(waveform: number[]): Promise<number[]>;
|
|
11
|
+
static decode(seq: number[], encodings: number[]): Promise<number>;
|
|
12
|
+
static transcribe(waveform: number[], audioLanguage?: SpeechToTextLanguage): ReturnType<SpeechToTextController['transcribe']>;
|
|
13
|
+
static streamingTranscribe(streamAction: STREAMING_ACTION, waveform?: number[], audioLanguage?: SpeechToTextLanguage): ReturnType<SpeechToTextController['streamingTranscribe']>;
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=SpeechToTextModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpeechToTextModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/SpeechToTextModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"SpeechToTextModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/SpeechToTextModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBAAa,YAAY;IACvB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAEtC,MAAM,CAAC,0BAA0B,GAAI,mBAAmB,MAAM,UAAQ;WAEzD,IAAI,CACf,SAAS,EAAE,eAAe,EAC1B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,EAC9C,6BAA6B,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,EAClE,aAAa,CAAC,EAAE,cAAc,EAC9B,aAAa,CAAC,EAAE,cAAc,EAC9B,eAAe,CAAC,EAAE,cAAc,EAChC,cAAc,CAAC,EAAE,qBAAqB,CACpC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,gBAAgB,CAAC,EACxB,UAAU,CAAC,EAAE,qBAAqB,CAChC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,EACpB,eAAe,CAAC,EAAE,qBAAqB,CACrC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAC;IAiB3B,MAAM,CAAC,kBAAkB,CACvB,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EAC3E,UAAU,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EACvE,eAAe,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;WASjE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE;WAIzB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;WAIzC,UAAU,CACrB,QAAQ,EAAE,MAAM,EAAE,EAClB,aAAa,CAAC,EAAE,oBAAoB,GACnC,UAAU,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;WAItC,mBAAmB,CAC9B,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,aAAa,CAAC,EAAE,oBAAoB,GACnC,UAAU,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;CAO7D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { BaseModule } from '../BaseModule';
|
|
3
|
+
export declare class TextEmbeddingsModule extends BaseModule {
|
|
4
|
+
protected static nativeModule: import("../../native/NativeTextEmbeddings").Spec;
|
|
5
|
+
static load(modelSource: ResourceSource, tokenizerSource: ResourceSource): Promise<void>;
|
|
6
|
+
static forward(input: string): Promise<number[]>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=TextEmbeddingsModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextEmbeddingsModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/TextEmbeddingsModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,oBAAqB,SAAQ,UAAU;IAClD,iBAA0B,YAAY,mDAA8B;WAE9C,IAAI,CACxB,WAAW,EAAE,cAAc,EAC3B,eAAe,EAAE,cAAc;WAKX,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAGhE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { BaseModule } from '../BaseModule';
|
|
3
|
+
export declare class TokenizerModule extends BaseModule {
|
|
4
|
+
protected static nativeModule: import("../../native/NativeTokenizer").Spec;
|
|
5
|
+
static load(tokenizerSource: ResourceSource): Promise<void>;
|
|
6
|
+
static decode(input: number[], skipSpecialTokens?: boolean): Promise<string>;
|
|
7
|
+
static encode(input: string): Promise<number[]>;
|
|
8
|
+
static getVocabSize(): Promise<number>;
|
|
9
|
+
static idToToken(tokenId: number): Promise<string>;
|
|
10
|
+
static tokenToId(token: string): Promise<number>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=TokenizerModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenizerModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/TokenizerModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,iBAA0B,YAAY,8CAAyB;WAEzC,IAAI,CAAC,eAAe,EAAE,cAAc;WAI7C,MAAM,CACjB,KAAK,EAAE,MAAM,EAAE,EACf,iBAAiB,UAAQ,GACxB,OAAO,CAAC,MAAM,CAAC;WAIL,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;WAIxC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;WAI/B,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAI3C,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeClassification.d.ts","sourceRoot":"","sources":["../../../src/native/NativeClassification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeClassification.d.ts","sourceRoot":"","sources":["../../../src/native/NativeClassification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;;AAED,wBAA+D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
loadModule(modelSource: string): Promise<number>;
|
|
4
|
+
forward(input: string, classesOfInterest: string[], resize: boolean): Promise<{
|
|
5
|
+
[category: string]: number[];
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: Spec | null;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=NativeImageSegmentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeImageSegmentation.d.ts","sourceRoot":"","sources":["../../../src/native/NativeImageSegmentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjD,OAAO,CACL,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,MAAM,EAAE,EAC3B,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CAC9C;;AAED,wBAAkE"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { TurboModule } from 'react-native';
|
|
2
2
|
import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
import { MessageType } from '../types/common';
|
|
4
3
|
export interface Spec extends TurboModule {
|
|
5
|
-
loadLLM(modelSource: string, tokenizerSource: string
|
|
6
|
-
|
|
4
|
+
loadLLM(modelSource: string, tokenizerSource: string): Promise<string>;
|
|
5
|
+
forward(input: string): Promise<string>;
|
|
7
6
|
interrupt(): void;
|
|
8
|
-
|
|
7
|
+
releaseResources(): void;
|
|
9
8
|
readonly onToken: EventEmitter<string>;
|
|
10
9
|
}
|
|
11
10
|
declare const _default: Spec | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeLLM.d.ts","sourceRoot":"","sources":["../../../src/native/NativeLLM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeLLM.d.ts","sourceRoot":"","sources":["../../../src/native/NativeLLM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,SAAS,IAAI,IAAI,CAAC;IAClB,gBAAgB,IAAI,IAAI,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACxC;;AAED,wBAAoD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TurboModule } from 'react-native';
|
|
2
|
-
import { Detection } from '../types/
|
|
2
|
+
import { Detection } from '../types/objectDetection';
|
|
3
3
|
export interface Spec extends TurboModule {
|
|
4
4
|
loadModule(modelSource: string): Promise<number>;
|
|
5
5
|
forward(input: string): Promise<Detection[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeObjectDetection.d.ts","sourceRoot":"","sources":["../../../src/native/NativeObjectDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NativeObjectDetection.d.ts","sourceRoot":"","sources":["../../../src/native/NativeObjectDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;CAC9C;;AAED,wBAAgE"}
|
|
@@ -3,8 +3,8 @@ import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
|
|
|
3
3
|
export interface Spec extends TurboModule {
|
|
4
4
|
loadModule(modelName: string, modelSources: (string | number)[]): Promise<number>;
|
|
5
5
|
generate(waveform: number[]): Promise<number[]>;
|
|
6
|
-
encode(input: number[]
|
|
7
|
-
decode(prevTokens: number[], encoderOutput: number[]): Promise<number
|
|
6
|
+
encode(input: number[]): Promise<number[]>;
|
|
7
|
+
decode(prevTokens: number[], encoderOutput: number[]): Promise<number>;
|
|
8
8
|
readonly onToken: EventEmitter<number>;
|
|
9
9
|
}
|
|
10
10
|
declare const _default: Spec | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeSpeechToText.d.ts","sourceRoot":"","sources":["../../../src/native/NativeSpeechToText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAChC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"NativeSpeechToText.d.ts","sourceRoot":"","sources":["../../../src/native/NativeSpeechToText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAChC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACxC;;AAED,wBAA6D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
loadModule(modelSource: string, tokenizerSource: string): Promise<number>;
|
|
4
|
+
forward(input: string): Promise<number[]>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: Spec | null;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=NativeTextEmbeddings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeTextEmbeddings.d.ts","sourceRoot":"","sources":["../../../src/native/NativeTextEmbeddings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC3C;;AAED,wBAA+D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
loadModule(tokenizerSource: string): Promise<number>;
|
|
4
|
+
decode(input: number[], skipSpecialTokens: boolean): Promise<string>;
|
|
5
|
+
encode(input: string): Promise<number[]>;
|
|
6
|
+
getVocabSize(): Promise<number>;
|
|
7
|
+
idToToken(tokenId: number): Promise<string>;
|
|
8
|
+
tokenToId(token: string): Promise<number>;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: Spec | null;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=NativeTokenizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeTokenizer.d.ts","sourceRoot":"","sources":["../../../src/native/NativeTokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C;;AAED,wBAA0D"}
|
|
@@ -1,47 +1,24 @@
|
|
|
1
|
-
import { Spec as ClassificationInterface } from './NativeClassification';
|
|
2
1
|
import { Spec as ObjectDetectionInterface } from './NativeObjectDetection';
|
|
3
2
|
import { Spec as StyleTransferInterface } from './NativeStyleTransfer';
|
|
3
|
+
import { Spec as ImageSegmentationInterface } from './NativeImageSegmentation';
|
|
4
4
|
import { Spec as ETModuleInterface } from './NativeETModule';
|
|
5
5
|
import { Spec as OCRInterface } from './NativeOCR';
|
|
6
6
|
import { Spec as VerticalOCRInterface } from './NativeVerticalOCR';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
15
|
-
declare
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
generate(waveform: number[][]): Promise<number[]>;
|
|
25
|
-
loadModule(modelName: String, modelSources: (string | number)[]): Promise<any>;
|
|
26
|
-
encode(input: number[]): Promise<any>;
|
|
27
|
-
decode(prevTokens: number[], encoderOutput?: number[]): Promise<any>;
|
|
28
|
-
}
|
|
29
|
-
declare class _ClassificationModule {
|
|
30
|
-
forward(input: string): ReturnType<ClassificationInterface['forward']>;
|
|
31
|
-
loadModule(modelSource: string | number): ReturnType<ClassificationInterface['loadModule']>;
|
|
32
|
-
}
|
|
33
|
-
declare class _OCRModule {
|
|
34
|
-
forward(input: string): ReturnType<OCRInterface['forward']>;
|
|
35
|
-
loadModule(detectorSource: string, recognizerSourceLarge: string, recognizerSourceMedium: string, recognizerSourceSmall: string, symbols: string): Promise<any>;
|
|
36
|
-
}
|
|
37
|
-
declare class _VerticalOCRModule {
|
|
38
|
-
forward(input: string): ReturnType<VerticalOCRInterface['forward']>;
|
|
39
|
-
loadModule(detectorLargeSource: string, detectorMediumSource: string, recognizerSource: string, symbols: string, independentCharacters: boolean): ReturnType<VerticalOCRInterface['loadModule']>;
|
|
40
|
-
}
|
|
41
|
-
declare class _ETModule {
|
|
42
|
-
forward(inputs: number[][], shapes: number[][], inputTypes: number[]): ReturnType<ETModuleInterface['forward']>;
|
|
43
|
-
loadModule(modelSource: string): ReturnType<ETModuleInterface['loadModule']>;
|
|
44
|
-
loadMethod(methodName: string): ReturnType<ETModuleInterface['loadMethod']>;
|
|
45
|
-
}
|
|
46
|
-
export { LLM, ETModule, Classification, ObjectDetection, StyleTransfer, SpeechToText, OCR, VerticalOCR, _ETModule, _ClassificationModule, _StyleTransferModule, _ObjectDetectionModule, _SpeechToTextModule, _OCRModule, _VerticalOCRModule, };
|
|
7
|
+
import { Spec as SpeechToTextInterface } from './NativeSpeechToText';
|
|
8
|
+
import { Spec as TextEmbeddingsInterface } from './NativeTextEmbeddings';
|
|
9
|
+
import { Spec as LLMInterface } from './NativeLLM';
|
|
10
|
+
import { Spec as ClassificationInterface } from './NativeClassification';
|
|
11
|
+
import { Spec as TokenizerInterface } from './NativeTokenizer';
|
|
12
|
+
declare const LLMNativeModule: LLMInterface;
|
|
13
|
+
declare const ETModuleNativeModule: ETModuleInterface;
|
|
14
|
+
declare const ClassificationNativeModule: ClassificationInterface;
|
|
15
|
+
declare const ImageSegmentationNativeModule: ImageSegmentationInterface;
|
|
16
|
+
declare const ObjectDetectionNativeModule: ObjectDetectionInterface;
|
|
17
|
+
declare const StyleTransferNativeModule: StyleTransferInterface;
|
|
18
|
+
declare const SpeechToTextNativeModule: SpeechToTextInterface;
|
|
19
|
+
declare const OCRNativeModule: OCRInterface;
|
|
20
|
+
declare const VerticalOCRNativeModule: VerticalOCRInterface;
|
|
21
|
+
declare const TokenizerNativeModule: TokenizerInterface;
|
|
22
|
+
declare const TextEmbeddingsNativeModule: TextEmbeddingsInterface;
|
|
23
|
+
export { LLMNativeModule, ETModuleNativeModule, ClassificationNativeModule, ObjectDetectionNativeModule, StyleTransferNativeModule, ImageSegmentationNativeModule, SpeechToTextNativeModule, OCRNativeModule, VerticalOCRNativeModule, TextEmbeddingsNativeModule, TokenizerNativeModule, };
|
|
47
24
|
//# sourceMappingURL=RnExecutorchModules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RnExecutorchModules.d.ts","sourceRoot":"","sources":["../../../src/native/RnExecutorchModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"RnExecutorchModules.d.ts","sourceRoot":"","sources":["../../../src/native/RnExecutorchModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,IAAI,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,IAAI,IAAI,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,IAAI,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,IAAI,IAAI,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,IAAI,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,IAAI,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAqB/D,QAAA,MAAM,eAAe,EAAE,YAEtB,CAAC;AACF,QAAA,MAAM,oBAAoB,EAAE,iBAE3B,CAAC;AACF,QAAA,MAAM,0BAA0B,EAAE,uBACwC,CAAC;AAC3E,QAAA,MAAM,6BAA6B,EAAE,0BACwC,CAAC;AAC9E,QAAA,MAAM,2BAA2B,EAAE,wBACwC,CAAC;AAC5E,QAAA,MAAM,yBAAyB,EAAE,sBACwC,CAAC;AAC1E,QAAA,MAAM,wBAAwB,EAAE,qBACwC,CAAC;AACzE,QAAA,MAAM,eAAe,EAAE,YAEtB,CAAC;AACF,QAAA,MAAM,uBAAuB,EAAE,oBACwC,CAAC;AACxE,QAAA,MAAM,qBAAqB,EAAE,kBAE5B,CAAC;AACF,QAAA,MAAM,0BAA0B,EAAE,uBACwC,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,GACtB,CAAC"}
|
|
@@ -1,29 +1,4 @@
|
|
|
1
|
-
import { _ClassificationModule, _StyleTransferModule, _ObjectDetectionModule, ETModule, _ETModule } from '../native/RnExecutorchModules';
|
|
2
1
|
export declare const getTypeIdentifier: (input: ETInput) => number;
|
|
3
|
-
export type ResourceSource = string | number;
|
|
4
|
-
export interface Model {
|
|
5
|
-
generate: (input: string) => Promise<void>;
|
|
6
|
-
response: string;
|
|
7
|
-
downloadProgress: number;
|
|
8
|
-
error: string | null;
|
|
9
|
-
isModelGenerating: boolean;
|
|
10
|
-
isGenerating: boolean;
|
|
11
|
-
isModelReady: boolean;
|
|
12
|
-
isReady: boolean;
|
|
13
|
-
interrupt: () => void;
|
|
14
|
-
}
|
|
2
|
+
export type ResourceSource = string | number | object;
|
|
15
3
|
export type ETInput = Int8Array | Int32Array | BigInt64Array | Float32Array | Float64Array;
|
|
16
|
-
export interface ExecutorchModule {
|
|
17
|
-
error: string | null;
|
|
18
|
-
isReady: boolean;
|
|
19
|
-
isGenerating: boolean;
|
|
20
|
-
forward: (inputs: ETInput[] | ETInput, shapes: number[][]) => ReturnType<_ETModule['forward']>;
|
|
21
|
-
loadMethod: (methodName: string) => Promise<void>;
|
|
22
|
-
loadForward: () => Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
export type Module = _ClassificationModule | _StyleTransferModule | _ObjectDetectionModule | typeof ETModule;
|
|
25
|
-
export interface MessageType {
|
|
26
|
-
role: 'user' | 'assistant';
|
|
27
|
-
content: string;
|
|
28
|
-
}
|
|
29
4
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,MAOlD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,MAAM,MAAM,OAAO,GACf,SAAS,GACT,UAAU,GACV,aAAa,GACb,YAAY,GACZ,YAAY,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum DeeplabLabel {
|
|
2
|
+
BACKGROUND = 0,
|
|
3
|
+
AEROPLANE = 1,
|
|
4
|
+
BICYCLE = 2,
|
|
5
|
+
BIRD = 3,
|
|
6
|
+
BOAT = 4,
|
|
7
|
+
BOTTLE = 5,
|
|
8
|
+
BUS = 6,
|
|
9
|
+
CAR = 7,
|
|
10
|
+
CAT = 8,
|
|
11
|
+
CHAIR = 9,
|
|
12
|
+
COW = 10,
|
|
13
|
+
DININGTABLE = 11,
|
|
14
|
+
DOG = 12,
|
|
15
|
+
HORSE = 13,
|
|
16
|
+
MOTORBIKE = 14,
|
|
17
|
+
PERSON = 15,
|
|
18
|
+
POTTEDPLANT = 16,
|
|
19
|
+
SHEEP = 17,
|
|
20
|
+
SOFA = 18,
|
|
21
|
+
TRAIN = 19,
|
|
22
|
+
TVMONITOR = 20,
|
|
23
|
+
ARGMAX = 21
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=imageSegmentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageSegmentation.d.ts","sourceRoot":"","sources":["../../../src/types/imageSegmentation.ts"],"names":[],"mappings":"AACA,oBAAY,YAAY;IACtB,UAAU,IAAA;IACV,SAAS,IAAA;IACT,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,GAAG,IAAA;IACH,GAAG,IAAA;IACH,GAAG,IAAA;IACH,KAAK,IAAA;IACL,GAAG,KAAA;IACH,WAAW,KAAA;IACX,GAAG,KAAA;IACH,KAAK,KAAA;IACL,SAAS,KAAA;IACT,MAAM,KAAA;IACN,WAAW,KAAA;IACX,KAAK,KAAA;IACL,IAAI,KAAA;IACJ,KAAK,KAAA;IACL,SAAS,KAAA;IACT,MAAM,KAAA;CACP"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface LLMType {
|
|
2
|
+
messageHistory: Message[];
|
|
3
|
+
response: string;
|
|
4
|
+
isReady: boolean;
|
|
5
|
+
isGenerating: boolean;
|
|
6
|
+
downloadProgress: number;
|
|
7
|
+
error: string | null;
|
|
8
|
+
configure: ({ chatConfig, toolsConfig, }: {
|
|
9
|
+
chatConfig?: Partial<ChatConfig>;
|
|
10
|
+
toolsConfig?: ToolsConfig;
|
|
11
|
+
}) => void;
|
|
12
|
+
generate: (messages: Message[], tools?: LLMTool[]) => Promise<void>;
|
|
13
|
+
sendMessage: (message: string) => Promise<void>;
|
|
14
|
+
deleteMessage: (index: number) => void;
|
|
15
|
+
interrupt: () => void;
|
|
16
|
+
}
|
|
17
|
+
export type MessageRole = 'user' | 'assistant' | 'system';
|
|
18
|
+
export interface Message {
|
|
19
|
+
role: MessageRole;
|
|
20
|
+
content: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ToolCall {
|
|
23
|
+
toolName: string;
|
|
24
|
+
arguments: Object;
|
|
25
|
+
}
|
|
26
|
+
export type LLMTool = Object;
|
|
27
|
+
export interface ChatConfig {
|
|
28
|
+
initialMessageHistory: Message[];
|
|
29
|
+
contextWindowLength: number;
|
|
30
|
+
systemPrompt: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ToolsConfig {
|
|
33
|
+
tools: LLMTool[];
|
|
34
|
+
executeToolCallback: (call: ToolCall) => Promise<string | null>;
|
|
35
|
+
displayToolCalls?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const SPECIAL_TOKENS: string[];
|
|
38
|
+
//# sourceMappingURL=llm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../../src/types/llm.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,CAAC,EACV,UAAU,EACV,WAAW,GACZ,EAAE;QACD,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QACjC,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,KAAK,IAAI,CAAC;IACX,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,UAAU;IACzB,qBAAqB,EAAE,OAAO,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,mBAAmB,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,cAAc,UAQ1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectDetection.d.ts","sourceRoot":"","sources":["../../../src/types/objectDetection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,OAAO,SAAS,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,aAAK,SAAS;IACZ,MAAM,IAAI;IACV,OAAO,IAAI;IACX,GAAG,IAAI;IACP,UAAU,IAAI;IACd,QAAQ,IAAI;IACZ,GAAG,IAAI;IACP,KAAK,IAAI;IACT,KAAK,IAAI;IACT,IAAI,IAAI;IACR,aAAa,KAAK;IAClB,YAAY,KAAK;IACjB,WAAW,KAAK;IAChB,SAAS,KAAK;IACd,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,IAAI,KAAK;IACT,GAAG,KAAK;IACR,GAAG,KAAK;IACR,KAAK,KAAK;IACV,KAAK,KAAK;IACV,GAAG,KAAK;IACR,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,KAAK,KAAK;IACV,OAAO,KAAK;IACZ,GAAG,KAAK;IACR,QAAQ,KAAK;IACb,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,GAAG,KAAK;IACR,OAAO,KAAK;IACZ,GAAG,KAAK;IACR,QAAQ,KAAK;IACb,OAAO,KAAK;IACZ,IAAI,KAAK;IACT,SAAS,KAAK;IACd,MAAM,KAAK;IACX,IAAI,KAAK;IACT,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,SAAS,KAAK;IACd,aAAa,KAAK;IAClB,MAAM,KAAK;IACX,KAAK,KAAK;IACV,UAAU,KAAK;IACf,GAAG,KAAK;IACR,IAAI,KAAK;IACT,KAAK,KAAK;IACV,KAAK,KAAK;IACV,IAAI,KAAK;IACT,MAAM,KAAK;IACX,KAAK,KAAK;IACV,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,KAAK,KAAK;IACV,IAAI,KAAK;IACT,KAAK,KAAK;IACV,KAAK,KAAK;IACV,YAAY,KAAK;IACjB,GAAG,KAAK;IACR,MAAM,KAAK;IACX,YAAY,KAAK;IACjB,MAAM,KAAK;IACX,IAAI,KAAK;IACT,MAAM,KAAK;IACX,IAAI,KAAK;IACT,EAAE,KAAK;IACP,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,SAAS,KAAK;IACd,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,IAAI,KAAK;IACT,YAAY,KAAK;IACjB,OAAO,KAAK;IACZ,IAAI,KAAK;IACT,KAAK,KAAK;IACV,IAAI,KAAK;IACT,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,UAAU,KAAK;IACf,UAAU,KAAK;IACf,UAAU,KAAK;CAChB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { symbols } from '../constants/ocr/symbols';
|
|
1
2
|
export interface OCRDetection {
|
|
2
3
|
bbox: OCRBbox[];
|
|
3
4
|
text: string;
|
|
@@ -7,5 +8,5 @@ export interface OCRBbox {
|
|
|
7
8
|
x: number;
|
|
8
9
|
y: number;
|
|
9
10
|
}
|
|
10
|
-
export type OCRLanguage =
|
|
11
|
+
export type OCRLanguage = keyof typeof symbols;
|
|
11
12
|
//# sourceMappingURL=ocr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ocr.d.ts","sourceRoot":"","sources":["../../../src/types/ocr.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"ocr.d.ts","sourceRoot":"","sources":["../../../src/types/ocr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export interface ModelConfig {
|
|
2
|
+
sources: {
|
|
3
|
+
encoder: string;
|
|
4
|
+
decoder: string;
|
|
5
|
+
};
|
|
6
|
+
tokenizer: {
|
|
7
|
+
source: string;
|
|
8
|
+
bos: number;
|
|
9
|
+
eos: number;
|
|
10
|
+
};
|
|
11
|
+
isMultilingual: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare enum SpeechToTextLanguage {
|
|
14
|
+
Afrikaans = "af",
|
|
15
|
+
Albanian = "sq",
|
|
16
|
+
Arabic = "ar",
|
|
17
|
+
Armenian = "hy",
|
|
18
|
+
Azerbaijani = "az",
|
|
19
|
+
Basque = "eu",
|
|
20
|
+
Belarusian = "be",
|
|
21
|
+
Bengali = "bn",
|
|
22
|
+
Bosnian = "bs",
|
|
23
|
+
Bulgarian = "bg",
|
|
24
|
+
Burmese = "my",
|
|
25
|
+
Catalan = "ca",
|
|
26
|
+
Chinese = "zh",
|
|
27
|
+
Croatian = "hr",
|
|
28
|
+
Czech = "cs",
|
|
29
|
+
Danish = "da",
|
|
30
|
+
Dutch = "nl",
|
|
31
|
+
Estonian = "et",
|
|
32
|
+
English = "en",
|
|
33
|
+
Finnish = "fi",
|
|
34
|
+
French = "fr",
|
|
35
|
+
Galician = "gl",
|
|
36
|
+
Georgian = "ka",
|
|
37
|
+
German = "de",
|
|
38
|
+
Greek = "el",
|
|
39
|
+
Gujarati = "gu",
|
|
40
|
+
HaitianCreole = "ht",
|
|
41
|
+
Hebrew = "he",
|
|
42
|
+
Hindi = "hi",
|
|
43
|
+
Hungarian = "hu",
|
|
44
|
+
Icelandic = "is",
|
|
45
|
+
Indonesian = "id",
|
|
46
|
+
Italian = "it",
|
|
47
|
+
Japanese = "ja",
|
|
48
|
+
Kannada = "kn",
|
|
49
|
+
Kazakh = "kk",
|
|
50
|
+
Khmer = "km",
|
|
51
|
+
Korean = "ko",
|
|
52
|
+
Lao = "lo",
|
|
53
|
+
Latvian = "lv",
|
|
54
|
+
Lithuanian = "lt",
|
|
55
|
+
Macedonian = "mk",
|
|
56
|
+
Malagasy = "mg",
|
|
57
|
+
Malay = "ms",
|
|
58
|
+
Malayalam = "ml",
|
|
59
|
+
Maltese = "mt",
|
|
60
|
+
Marathi = "mr",
|
|
61
|
+
Nepali = "ne",
|
|
62
|
+
Norwegian = "no",
|
|
63
|
+
Persian = "fa",
|
|
64
|
+
Polish = "pl",
|
|
65
|
+
Portuguese = "pt",
|
|
66
|
+
Punjabi = "pa",
|
|
67
|
+
Romanian = "ro",
|
|
68
|
+
Russian = "ru",
|
|
69
|
+
Serbian = "sr",
|
|
70
|
+
Sinhala = "si",
|
|
71
|
+
Slovak = "sk",
|
|
72
|
+
Slovenian = "sl",
|
|
73
|
+
Spanish = "es",
|
|
74
|
+
Sundanese = "su",
|
|
75
|
+
Swahili = "sw",
|
|
76
|
+
Swedish = "sv",
|
|
77
|
+
Tagalog = "tl",
|
|
78
|
+
Tajik = "tg",
|
|
79
|
+
Tamil = "ta",
|
|
80
|
+
Telugu = "te",
|
|
81
|
+
Thai = "th",
|
|
82
|
+
Turkish = "tr",
|
|
83
|
+
Ukrainian = "uk",
|
|
84
|
+
Urdu = "ur",
|
|
85
|
+
Uzbek = "uz",
|
|
86
|
+
Vietnamese = "vi",
|
|
87
|
+
Welsh = "cy",
|
|
88
|
+
Yiddish = "yi"
|
|
89
|
+
}
|
|
90
|
+
export type AvailableModels = 'whisper' | 'moonshine' | 'whisperMultilingual';
|
|
91
|
+
//# sourceMappingURL=stt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stt.d.ts","sourceRoot":"","sources":["../../../src/types/stt.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,cAAc,EAAE,OAAO,CAAC;CACzB;AAGD,oBAAY,oBAAoB;IAC9B,SAAS,OAAO;IAChB,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,WAAW,OAAO;IAClB,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,OAAO,OAAO;IACd,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,aAAa,OAAO;IACpB,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,SAAS,OAAO;IAChB,UAAU,OAAO;IACjB,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,GAAG,OAAO;IACV,OAAO,OAAO;IACd,UAAU,OAAO;IACjB,UAAU,OAAO;IACjB,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,IAAI,OAAO;IACX,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,IAAI,OAAO;IACX,KAAK,OAAO;IACZ,UAAU,OAAO;IACjB,KAAK,OAAO;IACZ,OAAO,OAAO;CACf;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,qBAAqB,CAAC"}
|