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

WitWebSocketMessageRequest Class

Performs a request that transmits a single json chunk and receives one or more responses

Constructors

WitWebSocketMessageRequest ( externalPostData , requestId , clientUserId , operationId , endWithFullTranscription )
Constructor for request that generates a WitResponseClass to be posted
Signature
Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.WitWebSocketMessageRequest(WitResponseNode externalPostData, string requestId, string clientUserId, string operationId, bool endWithFullTranscription=false)
Parameters
externalPostData: WitResponseNode  The data used exernally for the request
requestId: string  A unique id to be used for the request
clientUserId: string  A unique id that can be used to determine the interacting client user
operationId: string  A unique id used to trace the data through an entire set of transactions for a larger purpose (e.g. user to LLM conversation)
endWithFullTranscription: bool  Whether or not this request should consider an end of transcription as the end of the request
WitWebSocketMessageRequest ( endpoint , parameters , requestId , clientUserId , operationId , endWithFullTranscription )
Constructor for request that generates a WitResponseClass to be posted
Signature
Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.WitWebSocketMessageRequest(string endpoint, Dictionary< string, string > parameters, string requestId=null, string clientUserId=null, string operationId=null, bool endWithFullTranscription=false)
Parameters
endpoint: string  The endpoint to be used for the request
parameters: Dictionary< string, string >  All additional data required for the request
requestId: string  A unique id to be used for the request
clientUserId: string  A unique id that can be used to determine the interacting client user
operationId: string
endWithFullTranscription: bool  Whether or not this request should consider an end of transcription as the end of the request

Properties

Endpoint : string
[Get]
The endpoint being used
Signature
string Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.Endpoint
EndWithFullTranscription : bool
[Get]
Whether or not this request should consider an end of transcription as the end of the request
Signature
bool Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.EndWithFullTranscription

Events

OnDecodedResponse : Action< WitResponseNode >
Callback one or more times when a chunk of json is decoded
Signature
Action<WitResponseNode> Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.OnDecodedResponse

Protected Methods

IsEndOfStream ( responseData )
Returns true if 'is_final' is within the response
Signature
virtual bool Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.IsEndOfStream(WitResponseNode responseData)
Parameters
responseData: WitResponseNode
Returns
bool
SetResponseData ( newResponseData )
Perform callback following response data setting
Signature
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.SetResponseData(WitResponseNode newResponseData)
Parameters
newResponseData: WitResponseNode
Returns
override void

Methods

HandleDownload ( jsonString , jsonData , binaryData )
Called multiple times as partial responses are received.
Signature
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.HandleDownload(string jsonString, WitResponseNode jsonData, byte[] binaryData)
Parameters
jsonString: string
jsonData: WitResponseNode  Decoded json data object.
binaryData: byte []  Decoded binary data chunk which may be null or empty.
Returns
override void
ToString ()
Logs the currently used endpoint
Signature
override string Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.ToString()
Returns
override string

Static Methods

GetPostData ( endpoint , parameters )
Generates a json node with specified endpoint & parameters
Signature
static WitResponseClass Meta.Voice.Net.WebSockets.Requests.WitWebSocketMessageRequest.GetPostData(string endpoint, Dictionary< string, string > parameters)
Parameters
endpoint: string  Endpoint to be used
parameters: Dictionary< string, string >  Parameters for the endpoint
Returns
WitResponseClass  Json class for upload