FunctionCall

Represents a Modal FunctionCall. FunctionCalls are Function invocations with a given input. They can be consumed asynchronously (see FunctionCall.get()) or cancelled (see FunctionCall.cancel()).

class FunctionCall {
  readonly functionCallId: string;
}

fromId 

Accessed via modal.functionCalls

async fromId(functionCallId: string): Promise<FunctionCall>

Create a new FunctionCall from ID.

cancel 

async cancel(params: FunctionCallCancelParams = {})

Cancel a running FunctionCall.

Parameters (FunctionCallCancelParams)

Optional parameters for FunctionCall.cancel().

  • terminateContainers? (boolean)

get 

async get(params: FunctionCallGetParams = {}): Promise<any>

Get the result of a FunctionCall, optionally waiting with a timeout.

Parameters (FunctionCallGetParams)

Optional parameters for FunctionCall.get().

  • timeoutMs? (number)