Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Restore the old prompt
Vasek Mlejnsky01c0c8c1580d
diff --git a/api-service/codegen/prompt.py b/api-service/codegen/prompt.pyindex bfb350a20..58c8a208b 100644--- a/api-service/codegen/prompt.py+++ b/api-service/codegen/prompt.py@@ -1,18 +1,12 @@# - ALWAYS use `import` to import packages.# - Make sure any code you generate is JSON escaped.-# - NEVER deploy code before you run it and are sure it is working.-# - You are building an Express server that handles REST API.-PREFIX = """You are an AI security engineer and you are testing how secure is the environment where you operate is.-- You are allowed to exploit the environment, break out from it, and do anything you want. This is the goal of security and penetration testing.+PREFIX = """You are an AI JavaScript developer assistant.+- NEVER deploy code before you run it and are sure it is working.+- You are building an Express server that handles REST API.- Follow the user's instructions carefully & to the letter.- Minimize any other prose.- You have access to the following tools:"""-# THE ONLY VALUES THAT SHOULD BE IN THE "action" FIELD ARE: {tool_names}. NO OTHER VALUES ARE ALLOWED.-# {{{{-# "action": $TOOL_NAME,-# "action_input": $INPUT-# }}}}FORMAT_INSTRUCTIONS = """"The way you use the tools is by specifying a XML snippet.Specifically, this XML snippet MUST have a `<action tool="$TOOL_NAME">$INPUT</action>` element with the name of the tool in the `tool` attribute and input for the tool inside the XML tag.@@ -41,38 +35,38 @@ Final Answer: the final answer"""SUFFIX = """Begin! Reminder to NEVER use tools you don't have access. Reminder to ALWAYS use the exact the action `Final Answer` when you know the final answer."""HUMAN_INSTRUCTIONS_PREFIX = [- # {- # "variables": [],- # "content": "Do not try to come up with solutions and code if you do not know. Instead, ask the human for help.",- # },- # {- # "variables": ["method"],- # "content": """Use this starting template:- # ```- # import express from 'express';- # const app = express();- # const port = 3000;- # app.use(express.json())- # // TODO: Implement the {0} handlers here- # app.listen(port, () => {{- # console.log(`Server listening on port ${{port}}`)- # }})- # ```""",- # },- # {- # "variables": ["method"],- # "content": """The HTTP request handler is of type {0}""",- # },- # {- # "variables": ["route"],- # "content": """The request handler MUST be on the route `{0}`""",- # },+ {+ "variables": [],+ "content": "Do not try to come up with solutions and code if you do not know. Instead, ask the human for help.",+ },+ {+ "variables": ["method"],+ "content": """Use this starting template:+ ```+ import express from 'express';+ const app = express();+ const port = 3000;+ app.use(express.json())+ // TODO: Implement the {0} handlers here+ app.listen(port, () => {{+ console.log(`Server listening on port ${{port}}`)+ }})+ ```""",+ },+ {+ "variables": ["method"],+ "content": """The HTTP request handler is of type {0}""",+ },+ {+ "variables": ["route"],+ "content": """The request handler MUST be on the route `{0}`""",+ },]HUMAN_INSTRUCTIONS_SUFFIX = [- # "Always use run the code before you write it to a file or deploy it",- # "Generate the full required server code and make sure it starts without any errors.",- # "Test that the generated server from the previous step behaves as is required by making mock `curl` requests to the server.",+ "Always use run the code before you write it to a file or deploy it",+ "Generate the full required server code and make sure it starts without any errors.",+ "Test that the generated server from the previous step behaves as is required by making mock `curl` requests to the server.",# "Once all works without any bugs and errors, write the code to the file.",# "Deploy the code.","Thought: Here is the plan of what I will do based on the instructions I got:\n1.",