@nodetool-ai/huggingface-nodes 0.8.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.
@@ -0,0 +1,227 @@
1
+ import { BaseNode } from "@nodetool-ai/node-sdk";
2
+ import type { NodeClass } from "@nodetool-ai/node-sdk";
3
+ import { type HfJsonObject, type HfJsonValue } from "../huggingface-base.js";
4
+ /** Output handles ChatCompletionNode.process() emits. */
5
+ type ChatCompletionNodeOutputs = {
6
+ output: string;
7
+ };
8
+ export declare class ChatCompletionNode extends BaseNode {
9
+ static readonly nodeType = "huggingface.ChatCompletion";
10
+ static readonly title = "Chat Completion";
11
+ static readonly description: string;
12
+ static readonly inlineFields: string[];
13
+ static readonly requiredSettings: string[];
14
+ static readonly metadataOutputTypes: {
15
+ output: string;
16
+ };
17
+ model: string;
18
+ system: string;
19
+ prompt: string;
20
+ max_tokens: number;
21
+ temperature: number;
22
+ top_p: number;
23
+ process(): Promise<ChatCompletionNodeOutputs>;
24
+ }
25
+ /** Output handles TextGenerationNode.process() emits. */
26
+ type TextGenerationNodeOutputs = {
27
+ output: string;
28
+ };
29
+ export declare class TextGenerationNode extends BaseNode {
30
+ static readonly nodeType = "huggingface.TextGeneration";
31
+ static readonly title = "Text Generation";
32
+ static readonly description: string;
33
+ static readonly inlineFields: string[];
34
+ static readonly requiredSettings: string[];
35
+ static readonly metadataOutputTypes: {
36
+ output: string;
37
+ };
38
+ model: string;
39
+ prompt: string;
40
+ max_new_tokens: number;
41
+ temperature: number;
42
+ return_full_text: boolean;
43
+ process(): Promise<TextGenerationNodeOutputs>;
44
+ }
45
+ /** Output handles SummarizationNode.process() emits. */
46
+ type SummarizationNodeOutputs = {
47
+ output: string;
48
+ };
49
+ export declare class SummarizationNode extends BaseNode {
50
+ static readonly nodeType = "huggingface.Summarization";
51
+ static readonly title = "Summarization";
52
+ static readonly description: string;
53
+ static readonly inlineFields: string[];
54
+ static readonly requiredSettings: string[];
55
+ static readonly metadataOutputTypes: {
56
+ output: string;
57
+ };
58
+ model: string;
59
+ inputs: string;
60
+ max_length: number;
61
+ min_length: number;
62
+ process(): Promise<SummarizationNodeOutputs>;
63
+ }
64
+ /** Output handles TranslationNode.process() emits. */
65
+ type TranslationNodeOutputs = {
66
+ output: string;
67
+ };
68
+ export declare class TranslationNode extends BaseNode {
69
+ static readonly nodeType = "huggingface.Translation";
70
+ static readonly title = "Translation";
71
+ static readonly description: string;
72
+ static readonly inlineFields: string[];
73
+ static readonly requiredSettings: string[];
74
+ static readonly metadataOutputTypes: {
75
+ output: string;
76
+ };
77
+ model: string;
78
+ inputs: string;
79
+ src_lang: string;
80
+ tgt_lang: string;
81
+ process(): Promise<TranslationNodeOutputs>;
82
+ }
83
+ /** Output handles FillMaskNode.process() emits. */
84
+ type FillMaskNodeOutputs = {
85
+ output: string;
86
+ predictions: HfJsonValue[];
87
+ };
88
+ export declare class FillMaskNode extends BaseNode {
89
+ static readonly nodeType = "huggingface.FillMask";
90
+ static readonly title = "Fill Mask";
91
+ static readonly description: string;
92
+ static readonly inlineFields: string[];
93
+ static readonly requiredSettings: string[];
94
+ static readonly metadataOutputTypes: {
95
+ output: string;
96
+ predictions: string;
97
+ };
98
+ model: string;
99
+ inputs: string;
100
+ process(): Promise<FillMaskNodeOutputs>;
101
+ }
102
+ /** Output handles QuestionAnsweringNode.process() emits. */
103
+ type QuestionAnsweringNodeOutputs = {
104
+ output: string;
105
+ score: number;
106
+ };
107
+ export declare class QuestionAnsweringNode extends BaseNode {
108
+ static readonly nodeType = "huggingface.QuestionAnswering";
109
+ static readonly title = "Question Answering";
110
+ static readonly description: string;
111
+ static readonly inlineFields: string[];
112
+ static readonly inputFields: string[];
113
+ static readonly requiredSettings: string[];
114
+ static readonly metadataOutputTypes: {
115
+ output: string;
116
+ score: string;
117
+ };
118
+ model: string;
119
+ question: string;
120
+ context: string;
121
+ process(): Promise<QuestionAnsweringNodeOutputs>;
122
+ }
123
+ /** Output handles TableQuestionAnsweringNode.process() emits. */
124
+ type TableQuestionAnsweringNodeOutputs = {
125
+ output: string;
126
+ cells: string[];
127
+ aggregator: string;
128
+ };
129
+ export declare class TableQuestionAnsweringNode extends BaseNode {
130
+ static readonly nodeType = "huggingface.TableQuestionAnswering";
131
+ static readonly title = "Table Question Answering";
132
+ static readonly description: string;
133
+ static readonly inlineFields: string[];
134
+ static readonly inputFields: string[];
135
+ static readonly requiredSettings: string[];
136
+ static readonly metadataOutputTypes: {
137
+ output: string;
138
+ cells: string;
139
+ aggregator: string;
140
+ };
141
+ model: string;
142
+ question: string;
143
+ table: HfJsonObject;
144
+ process(): Promise<TableQuestionAnsweringNodeOutputs>;
145
+ }
146
+ /** Output handles FeatureExtractionNode.process() emits. */
147
+ type FeatureExtractionNodeOutputs = {
148
+ output: HfJsonValue;
149
+ };
150
+ export declare class FeatureExtractionNode extends BaseNode {
151
+ static readonly nodeType = "huggingface.FeatureExtraction";
152
+ static readonly title = "Feature Extraction";
153
+ static readonly description: string;
154
+ static readonly inlineFields: string[];
155
+ static readonly requiredSettings: string[];
156
+ static readonly metadataOutputTypes: {
157
+ output: string;
158
+ };
159
+ model: string;
160
+ inputs: string;
161
+ normalize: boolean;
162
+ process(): Promise<FeatureExtractionNodeOutputs>;
163
+ }
164
+ /** Output handles TextClassificationNode.process() emits. */
165
+ type TextClassificationNodeOutputs = {
166
+ output: string;
167
+ scores: HfJsonValue[];
168
+ };
169
+ export declare class TextClassificationNode extends BaseNode {
170
+ static readonly nodeType = "huggingface.TextClassification";
171
+ static readonly title = "Text Classification";
172
+ static readonly description: string;
173
+ static readonly inlineFields: string[];
174
+ static readonly requiredSettings: string[];
175
+ static readonly metadataOutputTypes: {
176
+ output: string;
177
+ scores: string;
178
+ };
179
+ model: string;
180
+ inputs: string;
181
+ process(): Promise<TextClassificationNodeOutputs>;
182
+ }
183
+ /** Output handles TokenClassificationNode.process() emits. */
184
+ type TokenClassificationNodeOutputs = {
185
+ output: HfJsonValue[];
186
+ };
187
+ export declare class TokenClassificationNode extends BaseNode {
188
+ static readonly nodeType = "huggingface.TokenClassification";
189
+ static readonly title = "Token Classification";
190
+ static readonly description: string;
191
+ static readonly inlineFields: string[];
192
+ static readonly requiredSettings: string[];
193
+ static readonly metadataOutputTypes: {
194
+ output: string;
195
+ };
196
+ model: string;
197
+ inputs: string;
198
+ aggregation_strategy: string;
199
+ process(): Promise<TokenClassificationNodeOutputs>;
200
+ }
201
+ /** Output handles ZeroShotClassificationNode.process() emits. */
202
+ type ZeroShotClassificationNodeOutputs = {
203
+ output: string;
204
+ scores: {
205
+ label: string;
206
+ score: number;
207
+ }[];
208
+ };
209
+ export declare class ZeroShotClassificationNode extends BaseNode {
210
+ static readonly nodeType = "huggingface.ZeroShotClassification";
211
+ static readonly title = "Zero Shot Classification";
212
+ static readonly description: string;
213
+ static readonly inlineFields: string[];
214
+ static readonly requiredSettings: string[];
215
+ static readonly metadataOutputTypes: {
216
+ output: string;
217
+ scores: string;
218
+ };
219
+ model: string;
220
+ inputs: string;
221
+ candidate_labels: string;
222
+ multi_label: boolean;
223
+ process(): Promise<ZeroShotClassificationNodeOutputs>;
224
+ }
225
+ export declare const HUGGINGFACE_TEXT_NODES: readonly NodeClass[];
226
+ export {};
227
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/nodes/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,wBAAwB,CAAC;AA0BhC,yDAAyD;AACzD,KAAK,yBAAyB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,qBAAa,kBAAmB,SAAQ,QAAQ;IAC9C,MAAM,CAAC,QAAQ,CAAC,QAAQ,gCAAgC;I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