@huggingface/inference
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -26,3 +26,3 @@ var __defProp = Object.defineProperty; | ||
// src/utils.ts | ||
// src/utils/to-array.ts | ||
function toArray(obj) { | ||
@@ -29,0 +29,0 @@ if (Array.isArray(obj)) { |
{ | ||
"name": "@huggingface/inference", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Tim Mikeladze <tim.mikeladze@gmail.com>", |
@@ -1,2 +0,2 @@ | ||
import { toArray } from "./utils"; | ||
import { toArray } from "./utils/to-array"; | ||
@@ -529,3 +529,3 @@ export interface Options { | ||
public async summarization(args: SummarizationArgs, options?: Options): Promise<SummarizationReturn> { | ||
return (await this.request(args, options))?.[0]; | ||
return (await this.request<SummarizationReturn[]>(args, options))?.[0]; | ||
} | ||
@@ -554,3 +554,3 @@ | ||
public async textClassification(args: TextClassificationArgs, options?: Options): Promise<TextClassificationReturn> { | ||
return (await this.request(args, options))?.[0]; | ||
return (await this.request<TextClassificationReturn[]>(args, options))?.[0]; | ||
} | ||
@@ -562,3 +562,3 @@ | ||
public async textGeneration(args: TextGenerationArgs, options?: Options): Promise<TextGenerationReturn> { | ||
return (await this.request(args, options))?.[0]; | ||
return (await this.request<TextGenerationReturn[]>(args, options))?.[0]; | ||
} | ||
@@ -580,3 +580,3 @@ | ||
public async translation(args: TranslationArgs, options?: Options): Promise<TranslationReturn> { | ||
return (await this.request(args, options))?.[0]; | ||
return (await this.request<TranslationReturn[]>(args, options))?.[0]; | ||
} | ||
@@ -583,0 +583,0 @@ |
Sorry, the diff of this file is not supported yet
67492
10
1656