@huggingface/inference 2.6.3 → 2.6.4
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 +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
- package/src/lib/makeRequestOptions.ts +1 -0
- package/src/tasks/nlp/textGeneration.ts +4 -0
- package/src/types.ts +4 -0
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export interface Options {
|
|
|
24
24
|
* Custom fetch function to use instead of the default one, for example to use a proxy or edit headers.
|
|
25
25
|
*/
|
|
26
26
|
fetch?: typeof fetch;
|
|
27
|
+
/**
|
|
28
|
+
* Abort Controller signal to use for request interruption.
|
|
29
|
+
*/
|
|
30
|
+
signal?: AbortSignal;
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* (Default: "same-origin"). String | Boolean. Credentials to use for the request. If this is a string, it will be passed straight on. If it's a boolean, true will be "include" and false will not send credentials at all.
|
|
@@ -786,6 +790,10 @@ export type TextGenerationArgs = BaseArgs & {
|
|
|
786
790
|
* (Default: None). Integer. The maximum number of tokens from the input.
|
|
787
791
|
*/
|
|
788
792
|
truncate?: number;
|
|
793
|
+
/**
|
|
794
|
+
* (Default: []) List of strings. The model will stop generating text when one of the strings in the list is generated.
|
|
795
|
+
* **/
|
|
796
|
+
stop_sequences?: string[];
|
|
789
797
|
};
|
|
790
798
|
};
|
|
791
799
|
export interface TextGenerationOutput {
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -48,6 +48,10 @@ export type TextGenerationArgs = BaseArgs & {
|
|
|
48
48
|
* (Default: None). Integer. The maximum number of tokens from the input.
|
|
49
49
|
*/
|
|
50
50
|
truncate?: number;
|
|
51
|
+
/**
|
|
52
|
+
* (Default: []) List of strings. The model will stop generating text when one of the strings in the list is generated.
|
|
53
|
+
* **/
|
|
54
|
+
stop_sequences?: string[];
|
|
51
55
|
};
|
|
52
56
|
};
|
|
53
57
|
|
package/src/types.ts
CHANGED
|
@@ -24,6 +24,10 @@ export interface Options {
|
|
|
24
24
|
* Custom fetch function to use instead of the default one, for example to use a proxy or edit headers.
|
|
25
25
|
*/
|
|
26
26
|
fetch?: typeof fetch;
|
|
27
|
+
/**
|
|
28
|
+
* Abort Controller signal to use for request interruption.
|
|
29
|
+
*/
|
|
30
|
+
signal?: AbortSignal;
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* (Default: "same-origin"). String | Boolean. Credentials to use for the request. If this is a string, it will be passed straight on. If it's a boolean, true will be "include" and false will not send credentials at all.
|