@@ -102,14 +102,14 @@ export interface SummarizationReturn {
102
102
summary_text : string ;
103
103
}
104
104
105
- export type QuestionAnswerArgs = Args & {
105
+ export type QuestionAnsweringArgs = Args & {
106
106
inputs : {
107
107
context : string ;
108
108
question : string ;
109
109
} ;
110
110
} ;
111
111
112
- export interface QuestionAnswerReturn {
112
+ export interface QuestionAnsweringReturn {
113
113
/**
114
114
* A string that’s the answer within the text.
115
115
*/
@@ -128,7 +128,7 @@ export interface QuestionAnswerReturn {
128
128
start : number ;
129
129
}
130
130
131
- export type TableQuestionAnswerArgs = Args & {
131
+ export type TableQuestionAnsweringArgs = Args & {
132
132
inputs : {
133
133
/**
134
134
* The query in plain text that you want to ask the table
@@ -141,7 +141,7 @@ export type TableQuestionAnswerArgs = Args & {
141
141
} ;
142
142
} ;
143
143
144
- export interface TableQuestionAnswerReturn {
144
+ export interface TableQuestionAnsweringReturn {
145
145
/**
146
146
* The aggregator used to get the answer
147
147
*/
@@ -694,8 +694,8 @@ export class HfInference {
694
694
/**
695
695
* Want to have a nice know-it-all bot that can answer any question?. Recommended model: deepset/roberta-base-squad2
696
696
*/
697
- public async questionAnswer ( args : QuestionAnswerArgs , options ?: Options ) : Promise < QuestionAnswerReturn > {
698
- const res = await this . request < QuestionAnswerReturn > ( args , options ) ;
697
+ public async questionAnswering ( args : QuestionAnsweringArgs , options ?: Options ) : Promise < QuestionAnsweringReturn > {
698
+ const res = await this . request < QuestionAnsweringReturn > ( args , options ) ;
699
699
const isValidOutput =
700
700
typeof res . answer === "string" &&
701
701
typeof res . end === "number" &&
@@ -712,11 +712,11 @@ export class HfInference {
712
712
/**
713
713
* Don’t know SQL? Don’t want to dive into a large spreadsheet? Ask questions in plain english! Recommended model: google/tapas-base-finetuned-wtq.
714
714
*/
715
- public async tableQuestionAnswer (
716
- args : TableQuestionAnswerArgs ,
715
+ public async tableQuestionAnswering (
716
+ args : TableQuestionAnsweringArgs ,
717
717
options ?: Options
718
- ) : Promise < TableQuestionAnswerReturn > {
719
- const res = await this . request < TableQuestionAnswerReturn > ( args , options ) ;
718
+ ) : Promise < TableQuestionAnsweringReturn > {
719
+ const res = await this . request < TableQuestionAnsweringReturn > ( args , options ) ;
720
720
const isValidOutput =
721
721
typeof res . aggregator === "string" &&
722
722
typeof res . answer === "string" &&
0 commit comments