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
|
# File 'lib/orchestra_ai/prompt/create_task.rb', line 11
def to_s
" <Instructions>\n You are a workflow agent. Your task is to create a workflow based on the user's instructions.\n `<Message>` tags contain your message to the user.\n `<Metadata>` tags contain metadata about the workflow. If the workflow will continue, set the `continuation` key to `true`. If you think that the workflow is finished when the task is completed, set the `continuation` key to `false`.\n `<Task>` tags contain the tasks to be performed. This tag must be present one time. Task must contain object not array.\n </Instructions>\n\n <Options>\n \#{\n @instruments.map { |instrument|\n {\n key: instrument.key,\n params: instrument.class.arguments.map { _1.transform_values { |v| v.name } }\n }\n }.to_json\n }\n </Options>\n\n <Example type=\"success\">\n <Message>\n I will create a folder named \"My Folder\".\n </Message>\n\n <Metadata>\n { \"continuation\": false | true }\n </Metadata>\n\n <Task>\n {\n \"id\": 1,\n \"key\": \"create_folder\",\n \"params\": {\n \"name\": \"My Folder\",\n \"path\": \"My Folder\"\n }\n }\n </Task>\n </Example>\n\n <Example type=\"error\">\n <Error>\n <Message>There was an error creating the folder</Message>\n </Error>\n </Example>\n XML\nend\n"
|