FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ProgramAB/ProgramAB.py at master · MyRobotLab/ProgramAB · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
MyRobotLab
/
ProgramAB
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
1
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ProgramAB
/
ProgramAB.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (22 loc) · 775 Bytes
Breadcrumbs
ProgramAB
/
ProgramAB.py
Copy path
File metadata and controls
26 lines (22 loc) · 775 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#########################################
# ProgramAB.py
# more info @: http://myrobotlab.org/service/ProgramAB
#########################################
# create a ProgramAB service and start a session
alice
=
Runtime
.
start
(
"alice"
,
"ProgramAB"
)
# supported language list : https://github.com/MyRobotLab/aiml/tree/master/bots
alice
.
startSession
(
"username"
,
"Alice"
)
print
alice
.
getResponse
(
"How are you?"
)
# create a Speech service
mouth
=
Runtime
.
start
(
"mouth"
,
"MarySpeech"
)
# create a route which sends published Responses to the
# mouth.speak(String) method
alice
.
attach
(
mouth
)
alice
.
getResponse
(
u"What is new?"
)
sleep
(
3
)
alice
.
getResponse
(
u"Tell me a joke?"
)
sleep
(
3
)
alice
.
getResponse
(
u"What time is it?"
)
sleep
(
3
)
# UTF8 test
alice
.
getResponse
(
u"こんにちは"
)
Back
|
FazBrowse Home
|
New Git URL