updated summary prompt on code response rules
Browse files
app.py
CHANGED
@@ -724,7 +724,6 @@ class CodeGeneratorAgent:
|
|
724 |
- Finish the prompt by *repeating* the most important style rule.
|
725 |
- Never include backticks or the word "python" in the response.
|
726 |
- Return only the actual code as a string without any additional text.
|
727 |
-
|
728 |
"""
|
729 |
|
730 |
@with_performance_tracking("code_generation")
|
@@ -1395,9 +1394,9 @@ class OrchestratorAgent:
|
|
1395 |
|
1396 |
During the orchestration, you generated the following code: {code_string}
|
1397 |
|
1398 |
-
The code was executed in a secure sandbox environment, and the output was {execution_output}
|
1399 |
|
1400 |
-
If there was no
|
1401 |
State that the code you are giving them has not been executed, and that they should run it in their own environment.
|
1402 |
|
1403 |
Please provide a short and concise summary of the code that you wrote, including the user request, the summaries provided and the code generated.
|
@@ -1415,6 +1414,15 @@ class OrchestratorAgent:
|
|
1415 |
Note, if appropriate, indicate how the code can be modified to include human input etc. as this is a banned keyword in the sandbox.
|
1416 |
|
1417 |
The response should be directed at the user, in a friendly and helpful manner, as if you were a human assistant helping the user with their request.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1418 |
"""
|
1419 |
|
1420 |
messages = [{"role": "user",
|
|
|
724 |
- Finish the prompt by *repeating* the most important style rule.
|
725 |
- Never include backticks or the word "python" in the response.
|
726 |
- Return only the actual code as a string without any additional text.
|
|
|
727 |
"""
|
728 |
|
729 |
@with_performance_tracking("code_generation")
|
|
|
1394 |
|
1395 |
During the orchestration, you generated the following code: {code_string}
|
1396 |
|
1397 |
+
The code was executed in a secure sandbox environment, and the output was <executed_code>{execution_output}</executed_code>.
|
1398 |
|
1399 |
+
If there was no output in the executed_code tags, please state how to answer the user's request showing the code required.
|
1400 |
State that the code you are giving them has not been executed, and that they should run it in their own environment.
|
1401 |
|
1402 |
Please provide a short and concise summary of the code that you wrote, including the user request, the summaries provided and the code generated.
|
|
|
1414 |
Note, if appropriate, indicate how the code can be modified to include human input etc. as this is a banned keyword in the sandbox.
|
1415 |
|
1416 |
The response should be directed at the user, in a friendly and helpful manner, as if you were a human assistant helping the user with their request.
|
1417 |
+
|
1418 |
+
**Summary Requirements:**
|
1419 |
+
|
1420 |
+
- The summary should be concise, no more than 500 words.
|
1421 |
+
- It should clearly explain how the code addresses the user's request.
|
1422 |
+
- It should only include code if there was no execution output, and then it should be in a code block. (if there is executed_code, this will be returned by
|
1423 |
+
another process and therefor you dont need to do it here)
|
1424 |
+
- The summary should be written in a friendly and helpful tone, as if you were a human assistant helping the user with their request.
|
1425 |
+
|
1426 |
"""
|
1427 |
|
1428 |
messages = [{"role": "user",
|