@mediapipe/tasks-text 1.1.0-rc.20260921 → 1.1.0-rc.20260923
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/package.json +1 -1
- package/text.d.ts +0 -88
- package/wasm/text_wasm_internal.js +1 -1
- package/wasm/text_wasm_internal.wasm +0 -0
- package/wasm/text_wasm_module_internal.js +1 -1
- package/wasm/text_wasm_module_internal.wasm +0 -0
- package/wasm/text_wasm_nosimd_internal.js +1 -1
- package/wasm/text_wasm_nosimd_internal.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediapipe/tasks-text",
|
|
3
|
-
"version": "1.1.0-rc.
|
|
3
|
+
"version": "1.1.0-rc.20260923",
|
|
4
4
|
"description": "MediaPipe Text Tasks. See the privacy notice at https://goo.gle/mediapipe-privacy.",
|
|
5
5
|
"main": "text_bundle.cjs",
|
|
6
6
|
"browser": "text_bundle.mjs",
|
package/text.d.ts
CHANGED
|
@@ -390,11 +390,6 @@ export declare interface LanguageDetectorResult {
|
|
|
390
390
|
languages: LanguageDetectorPrediction[];
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
/**
|
|
394
|
-
* The summarization mode for the text summarizer.
|
|
395
|
-
*/
|
|
396
|
-
export declare type SummarizationMode = "TLDR" | "KEYPOINTS";
|
|
397
|
-
|
|
398
393
|
/** Base class for all MediaPipe Tasks. */
|
|
399
394
|
declare abstract class TaskRunner {
|
|
400
395
|
protected constructor();
|
|
@@ -625,89 +620,6 @@ export declare interface TextFormatOptions {
|
|
|
625
620
|
*/
|
|
626
621
|
export declare type TextRole = "QUERY" | "DOCUMENT";
|
|
627
622
|
|
|
628
|
-
/**
|
|
629
|
-
* MediaPipe Task that performs text summarization.
|
|
630
|
-
*/
|
|
631
|
-
export declare class TextSummarizer extends TaskRunner {
|
|
632
|
-
/**
|
|
633
|
-
* Initializes the Wasm runtime and creates a new text summarizer based on the
|
|
634
|
-
* provided options.
|
|
635
|
-
* @export
|
|
636
|
-
* @param wasmFileset A configuration object that provides the location of the
|
|
637
|
-
* Wasm binary and its loader.
|
|
638
|
-
* @param textSummarizerOptions The options for TextSummarizer.
|
|
639
|
-
*/
|
|
640
|
-
static createFromOptions(wasmFileset: WasmFileset, textSummarizerOptions: TextSummarizerOptions): Promise<TextSummarizer>;
|
|
641
|
-
/**
|
|
642
|
-
* Initializes the Wasm runtime and creates a new text summarizer based on the
|
|
643
|
-
* path to the model asset.
|
|
644
|
-
* @export
|
|
645
|
-
* @param wasmFileset A configuration object that provides the location of the
|
|
646
|
-
* Wasm binary and its loader.
|
|
647
|
-
* @param modelAssetPath The path to the model asset.
|
|
648
|
-
* @param maxNumTokens The maximum number of tokens to generate.
|
|
649
|
-
* @param mode The summarization mode.
|
|
650
|
-
*/
|
|
651
|
-
static createFromModelPath(wasmFileset: WasmFileset, modelAssetPath: string, maxNumTokens?: number, mode?: SummarizationMode): Promise<TextSummarizer>;
|
|
652
|
-
/**
|
|
653
|
-
* Initializes the Wasm runtime and creates a new text summarizer based on the
|
|
654
|
-
* provided model asset buffer.
|
|
655
|
-
* @export
|
|
656
|
-
* @param wasmFileset A configuration object that provides the location of the
|
|
657
|
-
* Wasm binary and its loader.
|
|
658
|
-
* @param modelAssetBuffer An array or a stream containing a binary
|
|
659
|
-
* representation of the model.
|
|
660
|
-
* @param maxNumTokens The maximum number of tokens to generate.
|
|
661
|
-
* @param mode The summarization mode.
|
|
662
|
-
*/
|
|
663
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader, maxNumTokens?: number, mode?: SummarizationMode): Promise<TextSummarizer>;
|
|
664
|
-
private constructor();
|
|
665
|
-
/**
|
|
666
|
-
* Sets the initial options for the text summarizer.
|
|
667
|
-
* LiteRT LM Tasks do not support updating options after initialization.
|
|
668
|
-
* @param options The options for the text summarizer.
|
|
669
|
-
*/
|
|
670
|
-
setOptions(options: TextSummarizerOptions): Promise<void>;
|
|
671
|
-
/**
|
|
672
|
-
* Summarizes the given text.
|
|
673
|
-
* @param text The input text to be summarized.
|
|
674
|
-
* @return The generated summary.
|
|
675
|
-
*/
|
|
676
|
-
summarize(text: string): TextSummarizerResult;
|
|
677
|
-
/**
|
|
678
|
-
* Closes the TextSummarizer and frees resources.
|
|
679
|
-
*/
|
|
680
|
-
close(): void;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* Options to configure the MediaPipe Text Summarizer Task.
|
|
685
|
-
*/
|
|
686
|
-
export declare interface TextSummarizerOptions extends TaskRunnerOptions {
|
|
687
|
-
/** The maximum number of tokens to generate. */
|
|
688
|
-
maxNumTokens?: number;
|
|
689
|
-
/** The summarization mode to use. Defaults to 'KEYPOINTS'. */
|
|
690
|
-
mode?: SummarizationMode;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Copyright 2026 The MediaPipe Authors.
|
|
695
|
-
*
|
|
696
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
697
|
-
* you may not use this file except in compliance with the License.
|
|
698
|
-
* You may obtain a copy of the License at
|
|
699
|
-
*
|
|
700
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
701
|
-
*
|
|
702
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
703
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
704
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
705
|
-
* See the License for the specific language governing permissions and
|
|
706
|
-
* limitations under the License.
|
|
707
|
-
*/
|
|
708
|
-
/** The result of text summarization. */
|
|
709
|
-
export declare type TextSummarizerResult = string;
|
|
710
|
-
|
|
711
623
|
/**
|
|
712
624
|
* Copyright 2022 The MediaPipe Authors.
|
|
713
625
|
*
|
|
@@ -6509,7 +6509,7 @@ Module["FS_createLazyFile"] = FS_createLazyFile;
|
|
|
6509
6509
|
// End JS library exports
|
|
6510
6510
|
// end include: postlibrary.js
|
|
6511
6511
|
var ASM_CONSTS = {
|
|
6512
|
-
|
|
6512
|
+
755064: () => {
|
|
6513
6513
|
specialHTMLTargets["#canvas"] = Module.canvas;
|
|
6514
6514
|
}
|
|
6515
6515
|
};
|
|
Binary file
|
|
@@ -6512,7 +6512,7 @@ Module["FS_createLazyFile"] = FS_createLazyFile;
|
|
|
6512
6512
|
// End JS library exports
|
|
6513
6513
|
// end include: postlibrary.js
|
|
6514
6514
|
var ASM_CONSTS = {
|
|
6515
|
-
|
|
6515
|
+
755064: () => {
|
|
6516
6516
|
specialHTMLTargets["#canvas"] = Module.canvas;
|
|
6517
6517
|
}
|
|
6518
6518
|
};
|
|
Binary file
|
|
@@ -6509,7 +6509,7 @@ Module["FS_createLazyFile"] = FS_createLazyFile;
|
|
|
6509
6509
|
// End JS library exports
|
|
6510
6510
|
// end include: postlibrary.js
|
|
6511
6511
|
var ASM_CONSTS = {
|
|
6512
|
-
|
|
6512
|
+
754938: () => {
|
|
6513
6513
|
specialHTMLTargets["#canvas"] = Module.canvas;
|
|
6514
6514
|
}
|
|
6515
6515
|
};
|
|
Binary file
|