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

Properties

The endpoint being used
Whether or not this request should consider an end of transcription as the end of the request

Events

Callback one or more times when a chunk of json is decoded

Member Functions

Constructor for request that generates a WitResponseClass to be posted
Parameters
externalPostData
The data used exernally for the request
requestId
A unique id to be used for the request
clientUserId
A unique id that can be used to determine the interacting client user
operationId
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
Whether or not this request should consider an end of transcription as the end of the request
Constructor for request that generates a WitResponseClass to be posted
Parameters
endpoint
The endpoint to be used for the request
parameters
All additional data required for the request
requestId
A unique id to be used for the request
clientUserId
A unique id that can be used to determine the interacting client user
endWithFullTranscription
Whether or not this request should consider an end of transcription as the end of the request
Logs the currently used endpoint
Called multiple times as partial responses are received.
Parameters
jsonData
Decoded json data object.
binaryData
Decoded binary data chunk which may be null or empty.

Static Member Functions

Generates a json node with specified endpoint & parameters
Parameters
endpoint
Endpoint to be used
parameters
Parameters for the endpoint
Returns
Json class for upload

Protected Functions

Returns true if 'is_final' is within the response
Perform callback following response data setting
Did you find this page helpful?
Thumbs up icon
Thumbs down icon