Skip to main content

functions.data_map

ai.SWAIG.functions.data_map is an object that defines the data_map for the SWAIG function. The data_map is used to define either a output, expressions, or webhooks object that will be used to process the input data of the SWAIG function and either return a response or perform an action. The data_map options will be prioritized in the following order: output, expressions, and webhooks. If one is present, the others will be ignored.

NameTypeDefaultDescription
data_mapOptionalobject-An object that contains the data_map Parameters.

data_map Parameters

Name
oneOf
TypeDefaultDescription
outputRequiredobject-An object that defines the output of the SWAIG function.
expressionsRequiredobject[]-An array of objects that define patterns and corresponding actions.
webhooksRequiredobject[]-An array of objects that define external API calls.

Examples:

  1. Executing SWML from a SWAIG function