8000 Merge pull request #178 from microsoft/daveta-flask-fix · zigri2612/botbuilder-python@c41dd5a · GitHub
[go: up one dir, main page]

Skip to content

Commit c41dd5a

Browse files
authored
Merge pull request microsoft#178 from microsoft/daveta-flask-fix
Fix references to Timex library, comment for sample
2 parents 51be326 + 1744393 commit c41dd5a

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

samples/python-flask/13.core-bot/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
# Copyright (c) Microsoft Corporation. All rights reserved.
23
# Licensed under the MIT License.
34

samples/python-flask/13.core-bot/dialogs/booking_dialog.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
from botbuilder.core import MessageFactory
77
from .cancel_and_help_dialog import CancelAndHelpDialog
88
from .date_resolver_dialog import DateResolverDialog
9-
10-
from datatypes_timex_expression.timex import Timex
9+
from datatypes_date_time.timex import Timex
1110

1211
class BookingDialog(CancelAndHelpDialog):
1312

samples/python-flask/13.core-bot/dialogs/date_resolver_dialog.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
from botbuilder.dialogs import WaterfallDialog, DialogTurnResult, WaterfallStepContext
66
from botbuilder.dialogs.prompts import DateTimePrompt, PromptValidatorContext, PromptOptions, DateTimeResolution
77
from .cancel_and_help_dialog import CancelAndHelpDialog
8-
9-
from datatypes_timex_expression.timex import Timex
10-
8+
from datatypes_date_time.timex import Timex
119
class DateResolverDialog(CancelAndHelpDialog):
1210

1311
def __init__(self, dialog_id: str = None):

samples/python-flask/13.core-bot/dialogs/main_dialog.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
from botbuilder.dialogs import ComponentDialog, DialogSet, DialogTurnStatus, WaterfallDialog, WaterfallStepContext, DialogTurnResult
66
from botbuilder.dialogs.prompts import TextPrompt, ConfirmPrompt, PromptOptions
77
from botbuilder.core import MessageFactory
8-
98
from .booking_dialog import BookingDialog
109
from booking_details import BookingDetails
1110
from helpers.luis_helper import LuisHelper
12-
from datatypes_timex_expression.timex import Timex
11+
from datatypes_date_time.timex import Timex
1312

1413
class MainDialog(ComponentDialog):
1514

samples/python-flask/13.core-bot/main.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
#!/usr/bin/env python3ex
12
# Copyright (c) Microsoft Corporation. All rights reserved.
23
# Licensed under the MIT License.
34

45
"""
5-
This sample shows how to create a simple EchoBot with state.
6+
This sample shows how to create a bot that demonstrates the following:
7+
- Use [LUIS](https://www.luis.ai) to implement core AI capabilities.
8+
- Implement a multi-turn conversation using Dialogs.
9+
- Handle user interruptions for such things as `Help` or `Cancel`.
10+
- Prompt for and validate requests for information from the user.
11+
gi
612
"""
713
from functools import wraps
814
import json
@@ -52,8 +58,9 @@ async def aux_func(turn_context):
5258
except Exception as e:
5359
raise e
5460

55-
try:
56-
app.run(debug=True, port=app.config["PORT"])
57-
except Exception as e:
58-
raise e
61+
if __name__ == "__main__" :
62+
try:
63+
app.run(debug=True, port=app.config["PORT"])
64+
except Exception as e:
65+
raise e
5966

0 commit comments

Comments
 (0)
0