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

ConduitDispatcher Class

Extends Meta.Conduit.IConduitDispatcher
The dispatcher is responsible for deciding which method to invoke when a request is received as well as parsing the parameters and passing them to the handling method.

Constructors

ConduitDispatcher ( manifestLoader , instanceResolver )
Signature
Meta.Conduit.ConduitDispatcher.ConduitDispatcher(IManifestLoader manifestLoader, IInstanceResolver instanceResolver)
Parameters
manifestLoader: IManifestLoader
instanceResolver: IInstanceResolver

Properties

Manifest : Manifest
[Get]
The Conduit manifest which captures the structure of the voice-enabled methods.
Signature
Manifest Meta.Conduit.ConduitDispatcher.Manifest

Methods

Initialize ( manifestFilePath )
Parses the manifest provided and registers its callbacks for dispatching.
Signature
async Task Meta.Conduit.ConduitDispatcher.Initialize(string manifestFilePath)
Parameters
manifestFilePath: string  The path to the manifest file.
Returns
async Task
InvokeAction ( parameterProvider , actionId , relaxed , confidence , partial )
Invokes the method matching the specified action ID. This should NOT be called before the dispatcher is initialized. The parameters must be populated in the parameter provider before calling this method.
Signature
bool Meta.Conduit.ConduitDispatcher.InvokeAction(IParameterProvider parameterProvider, string actionId, bool relaxed, float confidence=1f, bool partial=false)
Parameters
parameterProvider: IParameterProvider  The parameter provider.
actionId: string  The action ID (which is also the intent name).
relaxed: bool  When set to true, will allow matching parameters by type when the names mismatch.
confidence: float  The confidence level (between 0-1) of the intent that's invoking the action.
partial: bool  Whether partial responses should be accepted or not
Returns
bool  True if all invocations succeeded. False if at least one failed or no callbacks were found.
InvokeError ( actionId , exception )
Signature
bool Meta.Conduit.ConduitDispatcher.InvokeError(string actionId, Exception exception)
Parameters
actionId: string
exception: Exception
Returns
bool

Inner Class

InvocationContextFilter Class

Filters possible invocation context for an invocation request.

Constructors

InvocationContextFilter ( parameterProvider , actionContexts , relaxed )
Initializes the filter for a given action.
Signature
Meta.Conduit.ConduitDispatcher.InvocationContextFilter.InvocationContextFilter(IParameterProvider parameterProvider, List< InvocationContext > actionContexts, bool relaxed=false)
Parameters
parameterProvider: IParameterProvider  The parameter provider.
actionContexts: List< InvocationContext >  All the invocation contexts for the action we want to invoke. This typically comes from the manifest.
relaxed: bool  When true, will allow matching by type alone when name doesn't match.

Methods

ResolveInvocationContexts ( actionId , confidence , partial )
Finds invocation contexts that are applicable to the given action and supplied parameter set.
Signature
List<InvocationContext> Meta.Conduit.ConduitDispatcher.InvocationContextFilter.ResolveInvocationContexts(string actionId, float confidence, bool partial)
Parameters
actionId: string  The action ID.
confidence: float  The confidence level between 0 and 1.
partial: bool  Whether this is a partial invocation.
Returns
List< InvocationContext >