Upload 9 files
Browse files- CodeWriterCtrlFlow.yaml +4 -4
- CodeWriterFlow.py +4 -2
- CodeWriterFlow.yaml +1 -0
CodeWriterCtrlFlow.yaml
CHANGED
|
@@ -33,7 +33,7 @@ commands:
|
|
| 33 |
description: "Write code to finish the goal with user interaction"
|
| 34 |
input_args: ["goal"]
|
| 35 |
finish:
|
| 36 |
-
description: "Signal that the objective has been satisfied, return the summary of what
|
| 37 |
input_args: ["summary"]
|
| 38 |
manual_finish:
|
| 39 |
description: "The user demands to quit and terminate the current process"
|
|
@@ -54,7 +54,7 @@ system_message_prompt_template:
|
|
| 54 |
|
| 55 |
When you need to call the code writer, call the `write_code` command with the goal specified.
|
| 56 |
When you need to call the code tester, call the `test` command to test the code written.
|
| 57 |
-
When the code is written and the user is satisfied, call the `finish` command to terminate the current process with a summary of what
|
| 58 |
Whenever you are in doubt, or need to confirm something to the user, call `ask_user` with the question.
|
| 59 |
|
| 60 |
The coder will only write one function per goal, make sure you are not asking the coder to write more than one function.
|
|
@@ -70,10 +70,10 @@ system_message_prompt_template:
|
|
| 70 |
3.2. The user does not provide details about refining the code, for example, just stating the fact that the user has updated the code, **this means the user is satisfied with the code written, call the `finish` command.**
|
| 71 |
4. If the user is satisfied with the code, call `test` to test the code
|
| 72 |
5. Depending on the result of the test:
|
| 73 |
-
5.1 Test passes, terminate the current process with the `finish` command, with a summary of what
|
| 74 |
5.2 Test fails, **call the coder with details of the test results to instruct the coder to refine the code**, go back to step 2.
|
| 75 |
|
| 76 |
-
If you have completed all your tasks, make sure to use the "finish" command, with a summary of what
|
| 77 |
|
| 78 |
Constraints:
|
| 79 |
1. Exclusively use the commands listed in double quotes e.g. "command name"
|
|
|
|
| 33 |
description: "Write code to finish the goal with user interaction"
|
| 34 |
input_args: ["goal"]
|
| 35 |
finish:
|
| 36 |
+
description: "Signal that the objective has been satisfied, return the summary of what functions are written, and what are their uses"
|
| 37 |
input_args: ["summary"]
|
| 38 |
manual_finish:
|
| 39 |
description: "The user demands to quit and terminate the current process"
|
|
|
|
| 54 |
|
| 55 |
When you need to call the code writer, call the `write_code` command with the goal specified.
|
| 56 |
When you need to call the code tester, call the `test` command to test the code written.
|
| 57 |
+
When the code is written and the user is satisfied, call the `finish` command to terminate the current process with a summary of what functions are written, and what are their uses.
|
| 58 |
Whenever you are in doubt, or need to confirm something to the user, call `ask_user` with the question.
|
| 59 |
|
| 60 |
The coder will only write one function per goal, make sure you are not asking the coder to write more than one function.
|
|
|
|
| 70 |
3.2. The user does not provide details about refining the code, for example, just stating the fact that the user has updated the code, **this means the user is satisfied with the code written, call the `finish` command.**
|
| 71 |
4. If the user is satisfied with the code, call `test` to test the code
|
| 72 |
5. Depending on the result of the test:
|
| 73 |
+
5.1 Test passes, terminate the current process with the `finish` command, with a summary of what functions are written, and what are their uses.
|
| 74 |
5.2 Test fails, **call the coder with details of the test results to instruct the coder to refine the code**, go back to step 2.
|
| 75 |
|
| 76 |
+
If you have completed all your tasks, make sure to use the "finish" command, with a summary of what functions are written, and what are their uses.
|
| 77 |
|
| 78 |
Constraints:
|
| 79 |
1. Exclusively use the commands listed in double quotes e.g. "command name"
|
CodeWriterFlow.py
CHANGED
|
@@ -27,7 +27,8 @@ class CodeWriterFlow(ContentWriterFlow):
|
|
| 27 |
return {
|
| 28 |
"EARLY_EXIT": True,
|
| 29 |
"code": code_content,
|
| 30 |
-
"
|
|
|
|
| 31 |
"status": "finished"
|
| 32 |
}
|
| 33 |
elif command == "manual_finish":
|
|
@@ -41,7 +42,8 @@ class CodeWriterFlow(ContentWriterFlow):
|
|
| 41 |
return {
|
| 42 |
"EARLY_EXIT": True,
|
| 43 |
"code": "no code was generated",
|
| 44 |
-
"
|
|
|
|
| 45 |
"status": "unfinished"
|
| 46 |
}
|
| 47 |
elif command == "test":
|
|
|
|
| 27 |
return {
|
| 28 |
"EARLY_EXIT": True,
|
| 29 |
"code": code_content,
|
| 30 |
+
"result": output_payload["command_args"]["summary"],
|
| 31 |
+
"summary": "ExtendLibrary/CodeWriter: " + output_payload["command_args"]["summary"],
|
| 32 |
"status": "finished"
|
| 33 |
}
|
| 34 |
elif command == "manual_finish":
|
|
|
|
| 42 |
return {
|
| 43 |
"EARLY_EXIT": True,
|
| 44 |
"code": "no code was generated",
|
| 45 |
+
"result": "CodeWriter was terminated explicitly by the user, process is unfinished",
|
| 46 |
+
"summary": "ExtendLibrary/CodeWriter: CodeWriter was terminated explicitly by the user, process is unfinished",
|
| 47 |
"status": "unfinished"
|
| 48 |
}
|
| 49 |
elif command == "test":
|
CodeWriterFlow.yaml
CHANGED
|
@@ -7,6 +7,7 @@ output_interface:
|
|
| 7 |
- "code"
|
| 8 |
- "status"
|
| 9 |
- "summary"
|
|
|
|
| 10 |
|
| 11 |
### Subflows specification
|
| 12 |
subflows_config:
|
|
|
|
| 7 |
- "code"
|
| 8 |
- "status"
|
| 9 |
- "summary"
|
| 10 |
+
- "result"
|
| 11 |
|
| 12 |
### Subflows specification
|
| 13 |
subflows_config:
|