Skip to content

Servertest 003 : Chatbot <-> Flask Web server#5

Open
khc196 wants to merge 2 commits intomasterfrom
servertest-003
Open

Servertest 003 : Chatbot <-> Flask Web server#5
khc196 wants to merge 2 commits intomasterfrom
servertest-003

Conversation

@khc196
Copy link

@khc196 khc196 commented Jan 5, 2018

No description provided.

@khc196 khc196 requested review from a team, chloesw and harrydrippin January 5, 2018 05:58
import json
import os

from flask import Flask
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it's possible to group 'from's together? and maybe alphabetical order?

# Flask app should start in global layout
app = Flask(__name__)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line

r = make_response(res)
r.headers['Content-Type'] = 'application/json'
return r

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line


res = processRequest(req)
res = json.dumps(res, indent=4)
print(res)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is for debugging purpose, please remove before merging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is necessary, please add your justification as a comment

res = makeWebhookResult(testdata)
return res


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line

# "data": data,
# "contextOut": [],
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line

return {
"speech": speech,
"displayText": speech,
# "data": data,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if these are not used, remove

Copy link
Contributor

@shberry shberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants