We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 871a994 commit 04a78d5Copy full SHA for 04a78d5
packages/tasks/src/snippets/js.ts
@@ -332,7 +332,10 @@ export const jsSnippets: Partial<
332
"image-segmentation": snippetFile,
333
};
334
335
-export function getJsInferenceSnippet(model: ModelDataMinimal, accessToken: string): InferenceSnippet {
+export function getJsInferenceSnippet(
336
+ model: ModelDataMinimal,
337
+ accessToken: string
338
+): InferenceSnippet | InferenceSnippet[] {
339
return model.pipeline_tag && model.pipeline_tag in jsSnippets
340
? jsSnippets[model.pipeline_tag]?.(model, accessToken) ?? { content: "" }
341
: { content: "" };
0 commit comments