API reference
API reference
Select your platform
No SDKs available
No versions available

NLPRequest Class

Abstract class for NLP text & audio requests
Meta::Voice::NLPRequest extends Meta::Voice::TranscriptionRequest< TUnityEvent, TOptions, TEvents, TResults >.

Overview

Data Fields

Getter for request input type
TResponseData
Getter for decoded response data
bool
Whether currently decoding a raw response

Object Data

The response decoder used to decode response json & provide vars for response data
bool
Whether or not raw responses should be decoded within this script. Defaults to false

Object Data

NLPRequest
( NLPRequestInputType inputType,
TOptions options,
TEvents newEvents )
Constructor for NLP requests
override void
Sets the NLPRequest object to the given state, but only after being initialized
override void
AppendLogData
( StringBuilder log,
VLogLevel logLevel )
Append NLP request specific data to log
override string
Throw error on text request
override string
Throw error on text request
void
HandleRawResponse
( string rawResponse,
bool final )
Performs callbacks for raw response &
void
OnRawResponse
( string rawResponse )
Called when raw response data has been received
async Task
DecodeRawResponseAsync
( string rawResponse,
bool final )
Decodes asynchronously and then passes into appropriate locations
void
ApplyDecodedResponseData
( TResponseData responseData,
bool final )
void
ApplyResponseData
( TResponseData responseData,
bool final )
Sets response data to the current results object
void
Called when response data has been updated
void
Called when full response has completed
void

Public Member Functions

void
Cancels the current request but handles success immediately if possible

Details

Detailed Description

Others
TUnityEvent
The type of event callback performed by TEvents for all event callbacks
TOptions
The type containing all specific options to be passed to the end service.
TEvents
The type containing all events of TSession to be called throughout the lifecycle of the request.
TResults
The type containing all data that can be returned from the end service.

Fields

NLPRequestInputType Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.InputType
Getter for request input type
TResponseData Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.ResponseData
Getter for decoded response data
virtual bool Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.IsDecoding
Whether currently decoding a raw response

Object Data

virtual INLPRequestResponseDecoder<TResponseData> Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.ResponseDecoder
The response decoder used to decode response json & provide vars for response data
virtual bool Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.DecodeRawResponses
Whether or not raw responses should be decoded within this script. Defaults to false

Object Data

Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.NLPRequest
( NLPRequestInputType inputType,
TOptions options,
TEvents newEvents )
Constructor for NLP requests
Parameters
newInputType
The input type for nlp request transmission
newOptions
The request parameters sent to the backend service
newEvents
The request events to be called throughout it's lifecycle
override void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.SetState
( VoiceRequestState newState )
Sets the NLPRequest object to the given state, but only after being initialized
override void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.AppendLogData
( StringBuilder log,
VLogLevel logLevel )
Append NLP request specific data to log
Parameters
log
Building log
warning
True if this is a warning log
override string Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.GetActivateAudioError ( )
Throw error on text request
override string Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.GetSendError ( )
Throw error on text request
virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.HandleRawResponse
( string rawResponse,
bool final )
Performs callbacks for raw response &
Parameters
rawResponsefinal
virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.OnRawResponse
( string rawResponse )
Called when raw response data has been received
virtual async Task Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.DecodeRawResponseAsync
( string rawResponse,
bool final )
Decodes asynchronously and then passes into appropriate locations
virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.ApplyDecodedResponseData
( TResponseData responseData,
bool final )
No description available.
virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.ApplyResponseData
( TResponseData responseData,
bool final )
Sets response data to the current results object
Parameters
responseData
Parsed json data returned from request
final
Whether or not this response should be considered final
virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.OnPartialResponse ( )
Called when response data has been updated
virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.OnFullResponse ( )
Called when full response has completed
virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.MakeLastResponseFinal ( )
No description available.

Member Functions

virtual void Meta.Voice.NLPRequest< TUnityEvent, TOptions, TEvents, TResults, TResponseData >.CompleteEarly ( )
Cancels the current request but handles success immediately if possible
Did you find this page helpful?
Thumbs up icon
Thumbs down icon