-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlanAiStudioCode.js
134 lines (123 loc) · 2.8 KB
/
AlanAiStudioCode.js
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//uncomment and copy paste this code to alan ai studio code editor
//const genres = [
//{
//id: 28,
//name: 'Action',
//},
//{
//id: 12,
//name: 'Adventure',
//},
//{
//id: 16,
//name: 'Animation',
//},
//{
//id: 35,
//name: 'Comedy',
//},
//{
//id: 80,
//name: 'Crime',
//},
//{
//id: 99,
//name: 'Documentary',
//},
//{
//id: 18,
//name: 'Drama',
//},
//{
//id: 10751,
//name: 'Family',
//},
//{
//id: 14,
//name: 'Fantasy',
//},
//{
//id: 36,
//name: 'History',
//},
//{
//id: 27,
//name: 'Horror',
//},
//{
//id: 10402,
//name: 'Music',
//},
//{
//id: 9648,
//name: 'Mystery',
//},
//{
//id: 10749,
//name: 'Romance',
//},
//{
//id: 878,
//name: 'Science Fiction',
//},
//{
//id: 10770,
//name: 'TV Movie',
//},
//{
//id: 53,
//name: 'Thriller',
//},
//{
//id: 10752,
//name: 'War',
//},
//{
//id: 37,
//name: 'Western',
//},
//];
//const stringifiedGenres = genres.map(({ name }) => name.toLowerCase()).join('|');
//intent(['What does this app do ?', 'What can i do here?', 'What is this app about?'], (p) => {
//p.play(`This is CINEHOOD, an app where you can find the movies you love,
//Try saying:'Go to Comedy','Surprise me','Search for Superman','Make it dark','Login'`);
//});
//intent('Make it dark', (p) => {
//p.play({ command: 'changeMode', mode: 'dark' });
//p.play('Batman likes this, I hope you will as well.');
//});
//intent('Make it light', (p) => {
//p.play({ command: 'changeMode', mode: 'light' });
//p.play('Ahh, my eyes hurt. Looks good though.');
//});
//intent(['Log in', 'Login'], (p) => {
//p.play('Logging you in.');
//p.play({ command: 'login' });
//});
//intent(['Log out', 'Logout'], (p) => {
//p.play('Logging you out.');
//p.play({ command: 'logout' });
//});
//intent(`go to $(GENRE ${stringifiedGenres}|top rated|popular|upcoming)`, (p) => {
//p.play(`Going to ${p.GENRE.value} category.`);
//p.play({ command: 'chooseGenreOrCategory', genreOrCategory: p.GENRE.value, genres });
//});
//intent('Search for $(QUERY* (.*))', (p) => {
//p.play(`Searching for ${p.QUERY.value}`);
//p.play({ command: 'search', query: p.QUERY.value });
//});
////*Easter Egg:
//intent(["It's Halloween.", 'I want to get scared'], (p) => {
//p.play({ command: 'chooseGenre', genreOrCategory: 'Horror', genres });
//p.play('Ok Horror it is');
//});
//intent(['Give me something funny', 'I want to laugh'], (p) => {
//p.play({ command: 'chooseGenre', genreOrCategory: 'Comedy', genres });
//p.play('Comedy it is. Enjoy!');
//});
////*Surprise Me
//intent('Surprise me', (p) => {
//const selectedCategory = genres[Math.floor(Math.random() * genres.length)].name;
//p.play(`Sounds good. Enjoy some ${selectedCategory} movies.`);
//p.play({ command: 'chooseGenre', genreOrCategory: selectedCategory, genres });
//});