Skip to content

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

Open
khc196 wants to merge 2 commits into
masterfrom
servertest-003
Open

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

Conversation

@khc196
Copy link
Copy Markdown

@khc196 khc196 commented Jan 5, 2018

No description provided.

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

from flask import Flask
Copy link
Copy Markdown
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?

Comment thread app.py
# Flask app should start in global layout
app = Flask(__name__)


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove extra line

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove extra line

Comment thread app.py

res = processRequest(req)
res = json.dumps(res, indent=4)
print(res)
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread app.py
res = makeWebhookResult(testdata)
return res


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove extra line

Comment thread app.py
# "data": data,
# "contextOut": [],
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove extra line

Comment thread app.py
return {
"speech": speech,
"displayText": speech,
# "data": data,
Copy link
Copy Markdown
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
Copy Markdown
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