Skip to content

Commit 809e56a

Browse files
committed
fix: remove await
1 parent d827bc9 commit 809e56a

File tree

1 file changed

+11
-11
lines changed
  • extensions/firestore-huggingface-inference-api/functions/src

1 file changed

+11
-11
lines changed

extensions/firestore-huggingface-inference-api/functions/src/inference.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,34 +46,34 @@ export async function runInference(
4646
): Promise<InferenceOutput> {
4747
switch (task) {
4848
case TaskId.fillMask: {
49-
return await tasks.fillMask(snapshot, inference);
49+
return tasks.fillMask(snapshot, inference);
5050
}
5151

5252
case TaskId.summarization: {
53-
return await tasks.summarization(snapshot, inference);
53+
return tasks.summarization(snapshot, inference);
5454
}
5555

5656
case TaskId.questionAnswering: {
57-
return await tasks.questionAnswering(snapshot, inference);
57+
return tasks.questionAnswering(snapshot, inference);
5858
}
5959

6060
case TaskId.tableQuestionAnswering: {
61-
return await tasks.tableQuestionAnswering(snapshot, inference);
61+
return tasks.tableQuestionAnswering(snapshot, inference);
6262
}
6363

6464
case TaskId.sentenceSimilarity: {
65-
return await tasks.sentenceSimilarity(snapshot, inference);
65+
return tasks.sentenceSimilarity(snapshot, inference);
6666
}
6767

6868
case TaskId.textClassification: {
69-
return await tasks.textClassification(snapshot, inference);
69+
return tasks.textClassification(snapshot, inference);
7070
}
7171

7272
// Text generation and text2text are currently the same.
7373
// See https://huggingface.co/docs/api-inference/detailed_parameters#text2text-generation-task
7474
case TaskId.textGeneration:
7575
case TaskId.text2textGeneration: {
76-
return await tasks.textGeneration(snapshot, inference);
76+
return tasks.textGeneration(snapshot, inference);
7777
}
7878

7979
// Token Classification and Named Entity Recognition are currently the same.
@@ -84,17 +84,17 @@ export async function runInference(
8484
}
8585

8686
case TaskId.translation: {
87-
return await tasks.translation(snapshot, inference);
87+
return tasks.translation(snapshot, inference);
8888
}
8989

9090
case TaskId.zeroShotClassification: {
91-
return await tasks.zeroShotClassification(snapshot, inference);
91+
return tasks.zeroShotClassification(snapshot, inference);
9292
}
9393
case TaskId.conversational: {
94-
return await tasks.conversational(snapshot, inference);
94+
return tasks.conversational(snapshot, inference);
9595
}
9696
case TaskId.featureExtraction: {
97-
return await tasks.featureExtraction(snapshot, inference);
97+
return tasks.featureExtraction(snapshot, inference);
9898
}
9999
}
100100
}

0 commit comments

Comments
 (0)