use utter_message as recommended
@@ -57,11 +57,11 @@ class ActionQueryKnowledgeBase(Action):
"""
if attribute_value:
dispatcher.utter_message(
- f"'{object_name}' has the value '{attribute_value}' for attribute '{attribute_name}'."
+ text=f"'{object_name}' has the value '{attribute_value}' for attribute '{attribute_name}'."
)
else:
dispatcher.utter_message(
- f"Did not find a valid value for attribute '{attribute_name}' for object '{object_name}'."
+ text=f"Did not find a valid value for attribute '{attribute_name}' for object '{object_name}'."
)
def utter_objects(
@@ -80,17 +80,17 @@ class ActionQueryKnowledgeBase(Action):
"""
if objects:
dispatcher.utter_message(
- f"Found the following objects of type '{object_type}':"
+ text=f"Found the following objects of type '{object_type}':"
)
repr_function = self.knowledge_base.get_representation_function_of_object(
object_type
)
for i, obj in enumerate(objects, 1):
- dispatcher.utter_message(f"{i}: {repr_function(obj)}")
+ dispatcher.utter_message(text=f"{i}: {repr_function(obj)}")
else:
dispatcher.utter_message(
- f"I could not find any objects of type '{object_type}'."
+ text=f"I could not find any objects of type '{object_type}'."
)
def run(
