Skip to content

Commit

Permalink
fixed fulfillment messages error
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmarex committed Jan 11, 2020
1 parent c6fe566 commit c46798e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pydialogflow_fulfillment/dialogflow_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ def __init__(self, fulfillment_message="", webhook_source="webhook"):
self.expect_user_response = True
self.output_contexts = []
self.dialogflow_response["fulfillmentText"] = fulfillment_message
self.dialogflow_response["fulfillmentMessages"] = self.fulfillment_messages
self.dialogflow_response["source"] = webhook_source

def __str__(self):
self.response_payload["google"] = self.google_payload
self.dialogflow_response["fulfillmentText"] = self.fulfillment_messages
self.dialogflow_response["fulfillmentMessages"] = self.fulfillment_messages
self.dialogflow_response["outputContexts"] = self.output_contexts
self.dialogflow_response["payload"] = self.response_payload
return json.dumps(self.dialogflow_response)

def get_final_response(self):
self.response_payload["google"] = self.google_payload
self.dialogflow_response["fulfillmentText"] = self.fulfillment_messages
self.dialogflow_response["fulfillmentMessages"] = self.fulfillment_messages
self.dialogflow_response["outputContexts"] = self.output_contexts
self.dialogflow_response["payload"] = self.response_payload
return json.dumps(self.dialogflow_response)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='pydialogflow_fulfillment',
version='0.1.2',
version='0.1.3',
author="Tairu Oluwafemi Emmanuel",
author_email="developer.emmarex@gmail.com",
description="This Library makes creating fulfillment for Dialogflow v2 agents with Django or Flask easy and simple",
Expand Down

0 comments on commit c46798e

Please sign in to comment.