Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

khc196
Copy link

@khc196 khc196 commented Jan 5, 2018

No description provided.

@khc196 khc196 requested review from harrydrippin, chloesw and a team 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