8000 fixes for core-bot sample. still not running · rsliang/botbuilder-python@8eb3f0d · GitHub
[go: up one dir, main page]

Skip to content

Commit 8eb3f0d

Browse files
committed
fixes for core-bot sample. still not running
1 parent e76ada4 commit 8eb3f0d

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

samples/Core-Bot/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
settings:
2+
LuisAppId: ""
3+
LuisAPIKey: ""
4+
LuisAPIHostName: ""

samples/Core-Bot/dialogs/booking_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, dialog_id: str = None):
1616

1717
]))
1818

19-
self.initial_dialog_id(WaterfallDialog.__name__)
19+
self.initial_dialog_id = WaterfallDialog.__name__
2020

2121
"""
2222
If a destination city has not been provided, prompt for one.

samples/Core-Bot/dialogs/date_resolver_dialog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ def __init__(self, dialog_id: str = None):
99
super(DateResolverDialog, self).__init__(dialog_id or DateResolverDialog.__name__)
1010

1111
self.add_dialog(DateTimePrompt(DateTimePrompt.__name__, DateResolverDialog.datetime_prompt_validator))
12-
self.add_dialog(WaterfallDialog(WaterfallDialog.__name__, [
12+
self.add_dialog(WaterfallDialog(WaterfallDialog.__name__ + '2', [
1313
self.initialStep,
1414
self.finalStep
1515
]))
1616

17-
self.initial_dialog_id(WaterfallDialog.__name__)
17+
self.initial_dialog_id = WaterfallDialog.__name__ + '2'
1818

1919
async def initialStep(self,step_context: WaterfallStepContext) -> DialogTurnResult:
2020
timex = step_context.options.date

samples/Core-Bot/dialogs/main_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, configuration: dict, dialog_id: str = None):
1616

1717
self.add_dialog(TextPrompt(TextPrompt.__name__))
1818
self.add_dialog(BookingDialog())
19-
self.add_dialog(WaterfallDialog(WaterfallDialog.__name__, [
19+
self.add_dialog(WaterfallDialog('WFDialog', [
2020

2121
]))
2222

samples/Core-Bot/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ async def messages(req: web.Request) -> web.Response:
3434
body = await req.json()
3535
activity = Activity().deserialize(body)
3636
auth_header = req.headers['Authorization'] if 'Authorization' in req.headers else ''
37+
async def aux_func(turn_context):
38+
await bot.on_turn(turn_context)
39+
3740
try:
38-
return await ADAPTER.process_activity(activity, auth_header, lambda turn_context: await bot.on_turn(turn_context))
41+
return await ADAPTER.process_activity(activity, auth_header, aux_func)
3942
except Exception as e:
4043
raise e
4144

0 commit comments

Comments
 (0)
0