ConduitDispatcher
(
manifestLoader
, instanceResolver
)
|
Signature
Meta.Conduit.ConduitDispatcher.ConduitDispatcher(IManifestLoader manifestLoader, IInstanceResolver instanceResolver) Parameters manifestLoader: IManifestLoaderinstanceResolver: IInstanceResolver |
Manifest
: Manifest
[Get] |
The Conduit manifest which captures the structure of the voice-enabled methods.
Signature
Manifest Meta.Conduit.ConduitDispatcher.Manifest |
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 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: stringexception: ExceptionReturns bool |
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 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.
|
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 > |