-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput_draft.json
More file actions
57 lines (57 loc) · 2.88 KB
/
output_draft.json
File metadata and controls
57 lines (57 loc) · 2.88 KB
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
{
"steps": [
{
"key": "find_user",
"promptTemplate": "string",
"inputs": [{ "name": "userId", "in": "query", "required": true }],
"outputs": { "userId": "user._id","username": "user.username", "success": "success" },
"inputBindings": { "userId": "workflow.username" }
},
{
"key": "find_channel",
"promptTemplate": "string",
"inputs": [{ "name": "roomName", "in": "query", "required": true }],
"outputs": { "channelId": "channel._id","channelName": "channel.name", "success": "success" },
"inputBindings": { "roomName": "workflow.channel_name" }
},
{
"key": "generate_welcome_message",
"promptTemplate": "Generate a short welcome message for a new user named {{username}} joining the channel {{channel_name}}. Make it friendly and concise.",
"inputs": [{ "name": "username", "in": "virtual", "required": true }, { "name": "channel_name", "in": "virtual", "required": true }],
"outputs": { "message_text": "message" },
"inputBindings": { "username": "workflow.username", "channel_name": "workflow.channel_name" }
},
{
"key": "create_user_if_missing",
"promptTemplate": "string",
"inputs": [{ "name": "name", "in": "body", "required": true }, { "name": "email", "in": "body", "required": true }, { "name": "password", "in": "body", "required": true }, { "name": "username", "in": "body", "required": true }],
"outputs": { "userId": "user._id","username": "user.username", "success": "success" },
"inputBindings": { "name": "workflow.username", "email": "workflow.username + '@example.com'", "password": "'generated_password'", "username": "workflow.username" }
},
{
"key": "create_channel_if_missing",
"promptTemplate": "string",
"inputs": [{ "name": "name", "in": "body", "required": true }],
"outputs": { "channelId": "channel._id","channelName": "channel.name", "success": "success" },
"inputBindings": { "name": "workflow.channel_name" }
},
{
"key": "add_user_to_channel",
"promptTemplate": "string",
"inputs": [{ "name": "roomId", "in": "body", "required": true }, { "name": "userId", "in": "body", "required": true }],
"outputs": { "channelId": "channel._id", "success": "success" },
"inputBindings": { "roomId": "steps.find_channel.channelId ?? steps.create_channel_if_missing.channelId", "userId": "steps.find_user.userId ?? steps.create_user_if_missing.userId" }
},
{
"key": "send_welcome_message",
"promptTemplate": "string",
"inputs": [{ "name": "roomId", "in": "body", "required": true }, { "name": "text", "in": "body", "required": true }],
"outputs": { "messageId": "message._id", "success": "success" },
"inputBindings": { "roomId": "steps.add_user_to_channel.channelId", "text": "steps.generate_welcome_message.message_text" }
}
],
"notes": [
"X-Auth-Token and X-User-Id are assumed to be provided by the system context for all runtime_tool steps.",
"For create_user_if_missing, a dummy email and password are used as they are not available in the workflow input. This might need to be addressed if real user creation is intended."
]
}