Skip to content

Commit bc84fca

Browse files
committed
fix: inputs validation
1 parent 60db90f commit bc84fca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extensions/firestore-huggingface-inference-api/functions/src/tasks/text-classification.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export function textClassification(
2626
return inference.request<TextClassificationOutput>(options);
2727
}
2828

29-
function validateInput(inputs: any) {
29+
function validateInput(data: any) {
30+
const { inputs } = data;
31+
3032
if (!inputs || typeof inputs !== 'string') {
3133
throw new Error('Field `inputs` must be provided and must be a string');
3234
}

0 commit comments

Comments
 (0)