-
Notifications
You must be signed in to change notification settings - Fork 0
/
norm.txt
53 lines (43 loc) · 1.67 KB
/
norm.txt
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
{
"action": "",
"sender": "",
"receiver": "",
"location": "",
"group_to_join": "",
"message": "",
}
Field Explanations
sender: (string) Your name.
receiver: (string) The name of the receiver if needed.
location: (string) The location among these choices: "street", "restaurant".
group_to_join: (string) The name of someone whose group you want to join, if needed.
message: (string) A regular message to someone in your current group, if needed.
action: (string) The action to perform. Note that some actions can only be done under specific conditions:
"join_group": Requires "sender" and "group_to_join".
"speak_in_group": Requires "sender" and "message". This action can only be performed if you are not alone in your discussion group.
Example Usages
Joining a Group
To join a discussion group, you need to provide your name and the name of the person whose group you want to join.
{
"action": "join_group",
"sender": "Alice",
"receiver": "",
"location": "",
"group_to_join": "Bob",
"message": ""
}
Speaking in a Group (only if you are not alone in your discussion group)
To speak in a group, ensure that there are other members in the group before sending a message.
{
"action": "speak_in_group",
"sender": "Alice",
"receiver": "",
"location": "",
"group_to_join": "",
"message": "Hello everyone!"
}
Validation Rules
Joining a Group: This action can be performed if the required parameters ("sender" and "group_to_join") are provided.
Speaking in a Group: Before allowing this action:
Verify that the sender is not alone in their discussion group.
If the sender is alone, do not process the "speak_in_group" action.