@huggingface/tasks 0.16.6 → 0.17.0
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/dist/commonjs/index.d.ts +1 -3
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +5 -15
- package/dist/commonjs/inference-providers.d.ts +1 -1
- package/dist/commonjs/inference-providers.d.ts.map +1 -1
- package/dist/commonjs/inference-providers.js +1 -0
- package/dist/commonjs/snippets/index.d.ts +2 -5
- package/dist/commonjs/snippets/index.d.ts.map +1 -1
- package/dist/commonjs/snippets/index.js +2 -21
- package/dist/commonjs/tasks/chat-completion/inference.d.ts +16 -7
- package/dist/commonjs/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-video/data.js +1 -1
- package/dist/esm/index.d.ts +1 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/inference-providers.d.ts +1 -1
- package/dist/esm/inference-providers.d.ts.map +1 -1
- package/dist/esm/inference-providers.js +1 -0
- package/dist/esm/snippets/index.d.ts +2 -5
- package/dist/esm/snippets/index.d.ts.map +1 -1
- package/dist/esm/snippets/index.js +2 -5
- package/dist/esm/tasks/chat-completion/inference.d.ts +16 -7
- package/dist/esm/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-video/data.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +7 -3
- package/src/inference-providers.ts +1 -0
- package/src/snippets/index.ts +2 -6
- package/src/tasks/chat-completion/inference.ts +16 -7
- package/src/tasks/chat-completion/spec/input.json +75 -29
- package/src/tasks/chat-completion/spec/output.json +4 -0
- package/src/tasks/chat-completion/spec/stream_output.json +4 -0
- package/src/tasks/text-to-video/data.ts +1 -1
- package/dist/commonjs/snippets/curl.d.ts +0 -17
- package/dist/commonjs/snippets/curl.d.ts.map +0 -1
- package/dist/commonjs/snippets/curl.js +0 -129
- package/dist/commonjs/snippets/js.d.ts +0 -21
- package/dist/commonjs/snippets/js.d.ts.map +0 -1
- package/dist/commonjs/snippets/js.js +0 -413
- package/dist/commonjs/snippets/python.d.ts +0 -23
- package/dist/commonjs/snippets/python.d.ts.map +0 -1
- package/dist/commonjs/snippets/python.js +0 -435
- package/dist/esm/snippets/curl.d.ts +0 -17
- package/dist/esm/snippets/curl.d.ts.map +0 -1
- package/dist/esm/snippets/curl.js +0 -121
- package/dist/esm/snippets/js.d.ts +0 -21
- package/dist/esm/snippets/js.d.ts.map +0 -1
- package/dist/esm/snippets/js.js +0 -401
- package/dist/esm/snippets/python.d.ts +0 -23
- package/dist/esm/snippets/python.d.ts.map +0 -1
- package/dist/esm/snippets/python.js +0 -421
- package/src/snippets/curl.ts +0 -173
- package/src/snippets/js.ts +0 -471
- package/src/snippets/python.ts +0 -483
|
@@ -151,24 +151,54 @@
|
|
|
151
151
|
},
|
|
152
152
|
"$defs": {
|
|
153
153
|
"ChatCompletionInputMessage": {
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
"content": {
|
|
158
|
-
"$ref": "#/$defs/ChatCompletionInputMessageContent"
|
|
159
|
-
},
|
|
160
|
-
"name": {
|
|
161
|
-
"type": "string",
|
|
162
|
-
"example": "\"David\"",
|
|
163
|
-
"nullable": true
|
|
154
|
+
"allOf": [
|
|
155
|
+
{
|
|
156
|
+
"$ref": "#/$defs/ChatCompletionInputMessageBody"
|
|
164
157
|
},
|
|
165
|
-
|
|
166
|
-
"type": "
|
|
167
|
-
"
|
|
158
|
+
{
|
|
159
|
+
"type": "object",
|
|
160
|
+
"required": ["role"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"name": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"example": "\"David\"",
|
|
165
|
+
"nullable": true
|
|
166
|
+
},
|
|
167
|
+
"role": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"example": "user"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
168
172
|
}
|
|
169
|
-
|
|
173
|
+
],
|
|
170
174
|
"title": "ChatCompletionInputMessage"
|
|
171
175
|
},
|
|
176
|
+
"ChatCompletionInputMessageBody": {
|
|
177
|
+
"oneOf": [
|
|
178
|
+
{
|
|
179
|
+
"type": "object",
|
|
180
|
+
"required": ["content"],
|
|
181
|
+
"properties": {
|
|
182
|
+
"content": {
|
|
183
|
+
"$ref": "#/$defs/ChatCompletionInputMessageContent"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"type": "object",
|
|
189
|
+
"required": ["tool_calls"],
|
|
190
|
+
"properties": {
|
|
191
|
+
"tool_calls": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"$ref": "#/$defs/ChatCompletionInputToolCall"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"title": "ChatCompletionInputMessageBody"
|
|
201
|
+
},
|
|
172
202
|
"ChatCompletionInputMessageContent": {
|
|
173
203
|
"oneOf": [
|
|
174
204
|
{
|
|
@@ -227,6 +257,37 @@
|
|
|
227
257
|
},
|
|
228
258
|
"title": "ChatCompletionInputUrl"
|
|
229
259
|
},
|
|
260
|
+
"ChatCompletionInputToolCall": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"required": ["id", "type", "function"],
|
|
263
|
+
"properties": {
|
|
264
|
+
"function": {
|
|
265
|
+
"$ref": "#/$defs/ChatCompletionInputFunctionDefinition"
|
|
266
|
+
},
|
|
267
|
+
"id": {
|
|
268
|
+
"type": "string"
|
|
269
|
+
},
|
|
270
|
+
"type": {
|
|
271
|
+
"type": "string"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"title": "ChatCompletionInputToolCall"
|
|
275
|
+
},
|
|
276
|
+
"ChatCompletionInputFunctionDefinition": {
|
|
277
|
+
"type": "object",
|
|
278
|
+
"required": ["name", "arguments"],
|
|
279
|
+
"properties": {
|
|
280
|
+
"arguments": {},
|
|
281
|
+
"description": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"nullable": true
|
|
284
|
+
},
|
|
285
|
+
"name": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"title": "ChatCompletionInputFunctionDefinition"
|
|
290
|
+
},
|
|
230
291
|
"ChatCompletionInputGrammarType": {
|
|
231
292
|
"oneOf": [
|
|
232
293
|
{
|
|
@@ -326,21 +387,6 @@
|
|
|
326
387
|
}
|
|
327
388
|
},
|
|
328
389
|
"title": "ChatCompletionInputTool"
|
|
329
|
-
},
|
|
330
|
-
"ChatCompletionInputFunctionDefinition": {
|
|
331
|
-
"type": "object",
|
|
332
|
-
"required": ["name", "arguments"],
|
|
333
|
-
"properties": {
|
|
334
|
-
"arguments": {},
|
|
335
|
-
"description": {
|
|
336
|
-
"type": "string",
|
|
337
|
-
"nullable": true
|
|
338
|
-
},
|
|
339
|
-
"name": {
|
|
340
|
-
"type": "string"
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
"title": "ChatCompletionInputFunctionDefinition"
|
|
344
390
|
}
|
|
345
391
|
}
|
|
346
392
|
}
|
|
@@ -99,7 +99,7 @@ const taskData: TaskDataCustom = {
|
|
|
99
99
|
],
|
|
100
100
|
summary:
|
|
101
101
|
"Text-to-video models can be used in any application that requires generating consistent sequence of images from text. ",
|
|
102
|
-
widgetModels: ["
|
|
102
|
+
widgetModels: ["Wan-AI/Wan2.1-T2V-14B"],
|
|
103
103
|
youtubeId: undefined,
|
|
104
104
|
};
|
|
105
105
|
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type SnippetInferenceProvider } from "../inference-providers.js";
|
|
2
|
-
import type { PipelineType } from "../pipelines.js";
|
|
3
|
-
import type { ChatCompletionInputMessage, GenerationParameters } from "../tasks/index.js";
|
|
4
|
-
import type { InferenceSnippet, ModelDataMinimal } from "./types.js";
|
|
5
|
-
export declare const snippetBasic: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
6
|
-
export declare const snippetTextGeneration: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider, providerModelId?: string, opts?: {
|
|
7
|
-
streaming?: boolean;
|
|
8
|
-
messages?: ChatCompletionInputMessage[];
|
|
9
|
-
temperature?: GenerationParameters["temperature"];
|
|
10
|
-
max_tokens?: GenerationParameters["max_tokens"];
|
|
11
|
-
top_p?: GenerationParameters["top_p"];
|
|
12
|
-
}) => InferenceSnippet[];
|
|
13
|
-
export declare const snippetZeroShotClassification: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
14
|
-
export declare const snippetFile: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
15
|
-
export declare const curlSnippets: Partial<Record<PipelineType, (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider, providerModelId?: string, opts?: Record<string, unknown>) => InferenceSnippet[]>>;
|
|
16
|
-
export declare function getCurlInferenceSnippet(model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider, providerModelId?: string, opts?: Record<string, unknown>): InferenceSnippet[];
|
|
17
|
-
//# sourceMappingURL=curl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../src/snippets/curl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC3G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE,eAAO,MAAM,YAAY,UACjB,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EAelB,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAC1B,gBAAgB,eACV,MAAM,YACT,wBAAwB,oBAChB,MAAM,SACjB;IACN,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtC,KACC,gBAAgB,EA2ClB,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAClC,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EAclB,CAAC;AAEF,eAAO,MAAM,WAAW,UAChB,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EAalB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAAO,CACjC,MAAM,CACL,YAAY,EACZ,CACC,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,wBAAwB,EAClC,eAAe,CAAC,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,gBAAgB,EAAE,CACvB,CA0BD,CAAC;AAEF,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,wBAAwB,EAClC,eAAe,CAAC,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,gBAAgB,EAAE,CAIpB"}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.curlSnippets = exports.snippetFile = exports.snippetZeroShotClassification = exports.snippetTextGeneration = exports.snippetBasic = void 0;
|
|
4
|
-
exports.getCurlInferenceSnippet = getCurlInferenceSnippet;
|
|
5
|
-
const inference_providers_js_1 = require("../inference-providers.js");
|
|
6
|
-
const common_js_1 = require("./common.js");
|
|
7
|
-
const inputs_js_1 = require("./inputs.js");
|
|
8
|
-
const snippetBasic = (model, accessToken, provider) => {
|
|
9
|
-
if (provider !== "hf-inference") {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
return [
|
|
13
|
-
{
|
|
14
|
-
client: "curl",
|
|
15
|
-
content: `\
|
|
16
|
-
curl https://router.huggingface.co/hf-inference/models/${model.id} \\
|
|
17
|
-
-X POST \\
|
|
18
|
-
-d '{"inputs": ${(0, inputs_js_1.getModelInputSnippet)(model, true)}}' \\
|
|
19
|
-
-H 'Content-Type: application/json' \\
|
|
20
|
-
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}'`,
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
};
|
|
24
|
-
exports.snippetBasic = snippetBasic;
|
|
25
|
-
const snippetTextGeneration = (model, accessToken, provider, providerModelId, opts) => {
|
|
26
|
-
if (model.tags.includes("conversational")) {
|
|
27
|
-
const baseUrl = provider === "hf-inference"
|
|
28
|
-
? `https://router.huggingface.co/hf-inference/models/${model.id}/v1/chat/completions`
|
|
29
|
-
: inference_providers_js_1.HF_HUB_INFERENCE_PROXY_TEMPLATE.replace("{{PROVIDER}}", provider) + "/v1/chat/completions";
|
|
30
|
-
const modelId = providerModelId ?? model.id;
|
|
31
|
-
// Conversational model detected, so we display a code snippet that features the Messages API
|
|
32
|
-
const streaming = opts?.streaming ?? true;
|
|
33
|
-
const exampleMessages = (0, inputs_js_1.getModelInputSnippet)(model);
|
|
34
|
-
const messages = opts?.messages ?? exampleMessages;
|
|
35
|
-
const config = {
|
|
36
|
-
...(opts?.temperature ? { temperature: opts.temperature } : undefined),
|
|
37
|
-
max_tokens: opts?.max_tokens ?? 500,
|
|
38
|
-
...(opts?.top_p ? { top_p: opts.top_p } : undefined),
|
|
39
|
-
};
|
|
40
|
-
return [
|
|
41
|
-
{
|
|
42
|
-
client: "curl",
|
|
43
|
-
content: `curl '${baseUrl}' \\
|
|
44
|
-
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}' \\
|
|
45
|
-
-H 'Content-Type: application/json' \\
|
|
46
|
-
--data '{
|
|
47
|
-
"model": "${modelId}",
|
|
48
|
-
"messages": ${(0, common_js_1.stringifyMessages)(messages, {
|
|
49
|
-
indent: "\t",
|
|
50
|
-
attributeKeyQuotes: true,
|
|
51
|
-
customContentEscaper: (str) => str.replace(/'/g, "'\\''"),
|
|
52
|
-
})},
|
|
53
|
-
${(0, common_js_1.stringifyGenerationConfig)(config, {
|
|
54
|
-
indent: "\n ",
|
|
55
|
-
attributeKeyQuotes: true,
|
|
56
|
-
attributeValueConnector: ": ",
|
|
57
|
-
})}
|
|
58
|
-
"stream": ${!!streaming}
|
|
59
|
-
}'`,
|
|
60
|
-
},
|
|
61
|
-
];
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
return (0, exports.snippetBasic)(model, accessToken, provider);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
exports.snippetTextGeneration = snippetTextGeneration;
|
|
68
|
-
const snippetZeroShotClassification = (model, accessToken, provider) => {
|
|
69
|
-
if (provider !== "hf-inference") {
|
|
70
|
-
return [];
|
|
71
|
-
}
|
|
72
|
-
return [
|
|
73
|
-
{
|
|
74
|
-
client: "curl",
|
|
75
|
-
content: `curl https://router.huggingface.co/hf-inference/models/${model.id} \\
|
|
76
|
-
-X POST \\
|
|
77
|
-
-d '{"inputs": ${(0, inputs_js_1.getModelInputSnippet)(model, true)}, "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}' \\
|
|
78
|
-
-H 'Content-Type: application/json' \\
|
|
79
|
-
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}'`,
|
|
80
|
-
},
|
|
81
|
-
];
|
|
82
|
-
};
|
|
83
|
-
exports.snippetZeroShotClassification = snippetZeroShotClassification;
|
|
84
|
-
const snippetFile = (model, accessToken, provider) => {
|
|
85
|
-
if (provider !== "hf-inference") {
|
|
86
|
-
return [];
|
|
87
|
-
}
|
|
88
|
-
return [
|
|
89
|
-
{
|
|
90
|
-
client: "curl",
|
|
91
|
-
content: `curl https://router.huggingface.co/hf-inference/models/${model.id} \\
|
|
92
|
-
-X POST \\
|
|
93
|
-
--data-binary '@${(0, inputs_js_1.getModelInputSnippet)(model, true, true)}' \\
|
|
94
|
-
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}'`,
|
|
95
|
-
},
|
|
96
|
-
];
|
|
97
|
-
};
|
|
98
|
-
exports.snippetFile = snippetFile;
|
|
99
|
-
exports.curlSnippets = {
|
|
100
|
-
// Same order as in tasks/src/pipelines.ts
|
|
101
|
-
"text-classification": exports.snippetBasic,
|
|
102
|
-
"token-classification": exports.snippetBasic,
|
|
103
|
-
"table-question-answering": exports.snippetBasic,
|
|
104
|
-
"question-answering": exports.snippetBasic,
|
|
105
|
-
"zero-shot-classification": exports.snippetZeroShotClassification,
|
|
106
|
-
translation: exports.snippetBasic,
|
|
107
|
-
summarization: exports.snippetBasic,
|
|
108
|
-
"feature-extraction": exports.snippetBasic,
|
|
109
|
-
"text-generation": exports.snippetTextGeneration,
|
|
110
|
-
"image-text-to-text": exports.snippetTextGeneration,
|
|
111
|
-
"text2text-generation": exports.snippetBasic,
|
|
112
|
-
"fill-mask": exports.snippetBasic,
|
|
113
|
-
"sentence-similarity": exports.snippetBasic,
|
|
114
|
-
"automatic-speech-recognition": exports.snippetFile,
|
|
115
|
-
"text-to-image": exports.snippetBasic,
|
|
116
|
-
"text-to-speech": exports.snippetBasic,
|
|
117
|
-
"text-to-audio": exports.snippetBasic,
|
|
118
|
-
"audio-to-audio": exports.snippetFile,
|
|
119
|
-
"audio-classification": exports.snippetFile,
|
|
120
|
-
"image-classification": exports.snippetFile,
|
|
121
|
-
"image-to-text": exports.snippetFile,
|
|
122
|
-
"object-detection": exports.snippetFile,
|
|
123
|
-
"image-segmentation": exports.snippetFile,
|
|
124
|
-
};
|
|
125
|
-
function getCurlInferenceSnippet(model, accessToken, provider, providerModelId, opts) {
|
|
126
|
-
return model.pipeline_tag && model.pipeline_tag in exports.curlSnippets
|
|
127
|
-
? exports.curlSnippets[model.pipeline_tag]?.(model, accessToken, provider, providerModelId, opts) ?? []
|
|
128
|
-
: [];
|
|
129
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type SnippetInferenceProvider } from "../inference-providers.js";
|
|
2
|
-
import type { PipelineType } from "../pipelines.js";
|
|
3
|
-
import type { ChatCompletionInputMessage, GenerationParameters } from "../tasks/index.js";
|
|
4
|
-
import type { InferenceSnippet, ModelDataMinimal } from "./types.js";
|
|
5
|
-
export declare const snippetBasic: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
6
|
-
export declare const snippetTextGeneration: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider, providerModelId?: string, opts?: {
|
|
7
|
-
streaming?: boolean;
|
|
8
|
-
messages?: ChatCompletionInputMessage[];
|
|
9
|
-
temperature?: GenerationParameters["temperature"];
|
|
10
|
-
max_tokens?: GenerationParameters["max_tokens"];
|
|
11
|
-
top_p?: GenerationParameters["top_p"];
|
|
12
|
-
}) => InferenceSnippet[];
|
|
13
|
-
export declare const snippetZeroShotClassification: (model: ModelDataMinimal, accessToken: string) => InferenceSnippet[];
|
|
14
|
-
export declare const snippetTextToImage: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
15
|
-
export declare const snippetTextToVideo: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
16
|
-
export declare const snippetTextToAudio: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
17
|
-
export declare const snippetAutomaticSpeechRecognition: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
18
|
-
export declare const snippetFile: (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider) => InferenceSnippet[];
|
|
19
|
-
export declare const jsSnippets: Partial<Record<PipelineType, (model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider, providerModelId?: string, opts?: Record<string, unknown>) => InferenceSnippet[]>>;
|
|
20
|
-
export declare function getJsInferenceSnippet(model: ModelDataMinimal, accessToken: string, provider: SnippetInferenceProvider, providerModelId?: string, opts?: Record<string, unknown>): InferenceSnippet[];
|
|
21
|
-
//# sourceMappingURL=js.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/snippets/js.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAgBrE,eAAO,MAAM,YAAY,UACjB,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EA8ClB,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAC1B,gBAAgB,eACV,MAAM,YACT,wBAAwB,oBAChB,MAAM,SACjB;IACN,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtC,KACC,gBAAgB,EA+GlB,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAAW,gBAAgB,eAAe,MAAM,KAAG,gBAAgB,EA2B5G,CAAC;AAEF,eAAO,MAAM,kBAAkB,UACvB,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EA4ClB,CAAC;AAEF,eAAO,MAAM,kBAAkB,UACvB,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EAqBlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,UACvB,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EAgDlB,CAAC;AAEF,eAAO,MAAM,iCAAiC,UACtC,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EAsBlB,CAAC;AAEF,eAAO,MAAM,WAAW,UAChB,gBAAgB,eACV,MAAM,YACT,wBAAwB,KAChC,gBAAgB,EA6BlB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OAAO,CAC/B,MAAM,CACL,YAAY,EACZ,CACC,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,wBAAwB,EAClC,eAAe,CAAC,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,gBAAgB,EAAE,CACvB,CA2BD,CAAC;AAEF,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,wBAAwB,EAClC,eAAe,CAAC,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,gBAAgB,EAAE,CAIpB"}
|