/* tslint:disable */ /* eslint-disable */ /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import { HTTPValidationError, HTTPValidationErrorFromJSON, HTTPValidationErrorToJSON, RobertaEmotionResponse, RobertaEmotionResponseFromJSON, RobertaEmotionResponseToJSON, RobertaHateResponse, RobertaHateResponseFromJSON, RobertaHateResponseToJSON, RobertaIronyResponse, RobertaIronyResponseFromJSON, RobertaIronyResponseToJSON, RobertaOffensiveResponse, RobertaOffensiveResponseFromJSON, RobertaOffensiveResponseToJSON, RobertaSentimentResponse, RobertaSentimentResponseFromJSON, RobertaSentimentResponseToJSON, } from '../models'; export interface GetContinuationDialogContinuationGetRequest { text: string; } export interface GetEmotionsRobertaEmotionGetRequest { text: string; } export interface GetHateRobertaHateGetRequest { text: string; } export interface GetIronyRobertaIronyGetRequest { text: string; } export interface GetOffensiveRobertaOffensiveGetRequest { text: string; } export interface GetSentimentRobertaSentimentGetRequest { text: string; } /** * */ export class DefaultApi extends runtime.BaseAPI { /** * Get Continuation */ async getContinuationDialogContinuationGetRaw(requestParameters: GetContinuationDialogContinuationGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise> { if (requestParameters.text === null || requestParameters.text === undefined) { throw new runtime.RequiredError('text','Required parameter requestParameters.text was null or undefined when calling getContinuationDialogContinuationGet.'); } const queryParameters: any = {}; if (requestParameters.text !== undefined) { queryParameters['text'] = requestParameters.text; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ path: `/dialog/continuation`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.TextApiResponse(response) as any; } /** * Get Continuation */ async getContinuationDialogContinuationGet(requestParameters: GetContinuationDialogContinuationGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise { const response = await this.getContinuationDialogContinuationGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Get Emotions */ async getEmotionsRobertaEmotionGetRaw(requestParameters: GetEmotionsRobertaEmotionGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise> { if (requestParameters.text === null || requestParameters.text === undefined) { throw new runtime.RequiredError('text','Required parameter requestParameters.text was null or undefined when calling getEmotionsRobertaEmotionGet.'); } const queryParameters: any = {}; if (requestParameters.text !== undefined) { queryParameters['text'] = requestParameters.text; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ path: `/roberta/emotion`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RobertaEmotionResponseFromJSON(jsonValue)); } /** * Get Emotions */ async getEmotionsRobertaEmotionGet(requestParameters: GetEmotionsRobertaEmotionGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise { const response = await this.getEmotionsRobertaEmotionGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Get Hate */ async getHateRobertaHateGetRaw(requestParameters: GetHateRobertaHateGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise> { if (requestParameters.text === null || requestParameters.text === undefined) { throw new runtime.RequiredError('text','Required parameter requestParameters.text was null or undefined when calling getHateRobertaHateGet.'); } const queryParameters: any = {}; if (requestParameters.text !== undefined) { queryParameters['text'] = requestParameters.text; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ path: `/roberta/hate`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RobertaHateResponseFromJSON(jsonValue)); } /** * Get Hate */ async getHateRobertaHateGet(requestParameters: GetHateRobertaHateGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise { const response = await this.getHateRobertaHateGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Get Irony */ async getIronyRobertaIronyGetRaw(requestParameters: GetIronyRobertaIronyGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise> { if (requestParameters.text === null || requestParameters.text === undefined) { throw new runtime.RequiredError('text','Required parameter requestParameters.text was null or undefined when calling getIronyRobertaIronyGet.'); } const queryParameters: any = {}; if (requestParameters.text !== undefined) { queryParameters['text'] = requestParameters.text; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ path: `/roberta/irony`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RobertaIronyResponseFromJSON(jsonValue)); } /** * Get Irony */ async getIronyRobertaIronyGet(requestParameters: GetIronyRobertaIronyGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise { const response = await this.getIronyRobertaIronyGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Get Offensive */ async getOffensiveRobertaOffensiveGetRaw(requestParameters: GetOffensiveRobertaOffensiveGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise> { if (requestParameters.text === null || requestParameters.text === undefined) { throw new runtime.RequiredError('text','Required parameter requestParameters.text was null or undefined when calling getOffensiveRobertaOffensiveGet.'); } const queryParameters: any = {}; if (requestParameters.text !== undefined) { queryParameters['text'] = requestParameters.text; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ path: `/roberta/offensive`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RobertaOffensiveResponseFromJSON(jsonValue)); } /** * Get Offensive */ async getOffensiveRobertaOffensiveGet(requestParameters: GetOffensiveRobertaOffensiveGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise { const response = await this.getOffensiveRobertaOffensiveGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Get Sentiment */ async getSentimentRobertaSentimentGetRaw(requestParameters: GetSentimentRobertaSentimentGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise> { if (requestParameters.text === null || requestParameters.text === undefined) { throw new runtime.RequiredError('text','Required parameter requestParameters.text was null or undefined when calling getSentimentRobertaSentimentGet.'); } const queryParameters: any = {}; if (requestParameters.text !== undefined) { queryParameters['text'] = requestParameters.text; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ path: `/roberta/sentiment`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RobertaSentimentResponseFromJSON(jsonValue)); } /** * Get Sentiment */ async getSentimentRobertaSentimentGet(requestParameters: GetSentimentRobertaSentimentGetRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise { const response = await this.getSentimentRobertaSentimentGetRaw(requestParameters, initOverrides); return await response.value(); } }