mindmeld.components.request module

class mindmeld.components.request.FrozenParams(*, allowed_intents=NOTHING, allow_nlp=NOTHING, deny_nlp=NOTHING, target_dialogue_state=None, time_zone=None, timestamp=None, language=None, locale=None, dynamic_resource=immutables.Map({}))[source]

Bases: mindmeld.components.request.Params

An immutable version of the Params object.

allowed_intents

list, str -- A list of intents that you can set to force the language processor to choose from.

target_dialogue_state

str -- The name of the dialogue handler that you want to reach in the next turn.

time_zone

str -- The name of an IANA time zone, such as 'America/Los_Angeles', or 'Asia/Kolkata'.

language

str -- The language code representing ISO 639-1/2 language codes

locale

str, optional -- The locale representing the ISO 639-1/2 language code and ISO3166 alpha 2 country code separated by an underscore character.

timestamp

long -- A unix time stamp for the request accurate to the nearest second.

dynamic_resource

dict -- A dictionary containing data used to influence the language classifiers by adding resource data for the given turn.

class mindmeld.components.request.Params(*, allowed_intents=NOTHING, allow_nlp=NOTHING, deny_nlp=NOTHING, target_dialogue_state=None, time_zone=None, timestamp=None, language=None, locale=None, dynamic_resource=NOTHING)[source]

Bases: object

A class that contains parameters that modify how the user query is parsed.

allowed_intents

list, str -- A list of intents that you can set to force the language processor to choose from.

target_dialogue_state

str -- The name of the dialogue handler that you want to reach in the next turn.

time_zone

str -- The name of an IANA time zone, such as 'America/Los_Angeles', or 'Asia/Kolkata'.

timestamp

long -- A unix time stamp for the request accurate to the nearest second.

locale

str, optional -- The locale representing the ISO 639-1/2 language code and ISO3166 alpha 2 country code separated by an underscore character.

language

str, optional -- The language code representing ISO 639-1/2 language codes.

dynamic_resource

dict -- A dictionary containing data used to influence the language classifiers by adding resource data for the given turn.

class mindmeld.components.request.Request(*, domain=None, intent=None, entities=NOTHING, history=NOTHING, text=None, frame=immutables.Map({}), params=FrozenParams(allowed_intents=(), allow_nlp=(), deny_nlp=(), target_dialogue_state=None, time_zone=None, timestamp=None, language=None, locale=None, dynamic_resource=immutables.Map({})), context=immutables.Map({}), confidences=immutables.Map({}), nbest_transcripts_text=NOTHING, nbest_transcripts_entities=NOTHING, nbest_aligned_entities=NOTHING, form=NOTHING)[source]

Bases: object

The Request is an object passed in through the Dialogue Manager and contains all the information provided by the application client for the dialogue handler to act on. Note: the Request object is read-only since it represents the client state, which should not be mutated.

domains

str -- Domain of the current query.

intent

str -- Intent of the current query.

entities

list of dicts -- A list of entities in the current query.

history

list of dicts -- List of previous and current responder objects (de-serialized) up to the current conversation.

text

str -- The query text.

frame

Immutables Map of stored data across multiple dialogue turns.

params

Params -- An object that modifies how MindMeld process the current turn.

context

dict -- Immutables Map containing front-end client state that is passed to the application from the client in the request.

confidences

dict -- Immutables Map of keys domains, intents, entities and roles containing confidence probabilities across all labels for each classifier.

nbest_transcripts_text

tuple -- List of alternate n-best transcripts from an ASR system

nbest_transcripts_entities

tuple -- List of lists of extracted entities for each of the n-best transcripts.

nbest_aligned_entities

tuple -- List of lists of aligned entities for each of the n-best transcripts.

mindmeld.components.request.deserialize_to_list_immutable_maps(value)[source]

Custom attrs converter. Converts a list of elements into a list of immutables.Map objects.

mindmeld.components.request.deserialize_to_lists_of_list_of_immutable_maps(values)[source]

Custom attrs converter. Converts a list of elements into a list of immutables.Map objects.