JavaScript SDK (v0.55.0)Reference
CreateWaitOptions
Options for customizing wait behaviour when creating a prediction.
Interface: CreateWaitOptions
Options for customizing wait behaviour when creating a prediction.
Extends
Properties
duration?
optionalduration:number
Max seconds the server holds the connection open while waiting for the prediction to finish. If not set, the server's default is used.
onPoll()?
optionalonPoll: (prediction) =>Promise<void>
Optional callback that receives the latest prediction after each poll.
Parameters
prediction
Returns
Promise<void>
Inherited from
poll
poll:
boolean
If the prediction isn't finished when the server responds, keep polling until it reaches a terminal state. If false, return it as is, which may not be terminal.
pollInterval
pollInterval:
number
Time in milliseconds between polling attempts to check the prediction status.