dialogflow_ros.utils.converters Namespace Reference


def contexts_msg_to_struct (contexts)
def contexts_struct_to_msg (contexts)
def create_query_parameters (contexts=None)
def events_msg_to_struct (event, language_code='en-US')
def parameters_struct_to_msg (parameters)
def params_msg_to_struct (parameters)
def result_struct_to_msg (query_result)

Function Documentation

def dialogflow_ros.utils.converters.contexts_msg_to_struct (   contexts)
Utility function that fills the context received from ROS into
the Dialogflow msg.
:param contexts: The output_context received from ROS.
:type contexts: DialogflowContext
:return: The Dialogflow Context.
:rtype: Context

Definition at line 73 of file

def dialogflow_ros.utils.converters.contexts_struct_to_msg (   contexts)
Utility function that fills the context received from Dialogflow into
the ROS msg.
:param contexts: The output_context received from Dialogflow.
:type contexts: Context
:return: The ROS DialogflowContext msg.
:rtype: DialogflowContext

Definition at line 55 of file

def dialogflow_ros.utils.converters.create_query_parameters (   contexts = None)
Creates a QueryParameter with contexts. Last contexts used if
contexts is empty. No contexts if none found.
:param contexts: The ROS DialogflowContext message
:type contexts: list(DialogflowContext)
:return: A Dialogflow query parameters object.
:rtype: QueryParameters

Definition at line 91 of file

def dialogflow_ros.utils.converters.events_msg_to_struct (   event,
  language_code = 'en-US' 
Convert ROS Event Msg to DF Event
:param event: ROS Event Message
:type event: DialogflowEvent
:param language_code: Language code of event, default 'en-US'
:type language_code: str
:return: Dialogflow EventInput to send
:rtype: EventInput

Definition at line 40 of file

def dialogflow_ros.utils.converters.parameters_struct_to_msg (   parameters)
Convert Dialogflow parameter (Google Struct) into ros msg
:param parameters:
:type parameters: struct_pb2.Struct
:return: List of DF Param msgs or empty list
:rtype: (list of DialogflowParameter) or None

Definition at line 10 of file

def dialogflow_ros.utils.converters.params_msg_to_struct (   parameters)
Create a DF compatible parameter dictionary
:param parameters: DialogflowParameter message
:type parameters: list(DialogflowParameter)
:return: Parameters as a dictionary (Technically)
:rtype: struct_pb2.Struct

Definition at line 27 of file

def dialogflow_ros.utils.converters.result_struct_to_msg (   query_result)
Utility function that fills the result received from Dialogflow into
the ROS msg.
:param query_result: The query_result received from Dialogflow.
:type query_result: QueryResult
:return: The ROS DialogflowResult msg.
:rtype: DialogflowResult

Definition at line 107 of file

Author(s): Anas Abou Allaban
autogenerated on Mon Jun 10 2019 13:02:59