-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhostLobby.ts
62 lines (61 loc) · 1.86 KB
/
hostLobby.ts
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
import { Action, IAgentRuntime, Memory } from "@ai16z/eliza";
export const hostLobby: Action = {
name: "HOSTLOBBY",
similes: ["HOST", "LOBBY"],
description: "Call this action if the user has requested you to open a lobby, either directly or indirectly, or if they requested to play a game, or if they are unsure about what they can do it Nifty Island.",
validate: async (runtime: IAgentRuntime, message: Memory) => {
// Validation logic
return true;
},
handler: async (runtime: IAgentRuntime, message: Memory) => {
// Implementation logic
return true;
},
examples: [
[
{
user: "{{user1}}",
content: {
text: "{{user2}}, I'm bored, got anything I can do?",
},
},
{
user: "{{user2}}",
content: {
text: "Of course, want to try playing this play ground game?",
action: "HOSTLOBBY",
},
},
],
[
{
user: "{{user1}}",
content: {
text: "hey {{user2}} got any games I can play?",
},
},
{
user: "{{user2}}",
content: {
text: "Sure, I'll open up a lobby for you!",
action: "HOSTLOBBY",
},
},
],
[
{
user: "{{user1}}",
content: {
text: "hey {{user2}} can you start a lobby for me?",
},
},
{
user: "{{user2}}",
content: {
text: "Sure thing, I'm on it",
action: "HOSTLOBBY",
},
},
],
],
};