Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix NodeJSExpress template prompt

Tomas Valentad4302a831535
diff --git a/state/template.tsx b/state/template.tsx
index ade619ffc..3b4e51ce5 100644
--- a/state/template.tsx
+++ b/state/template.tsx
@@ -39,7 +39,7 @@ export const templates: {
{
role: 'user',
type: 'prefix',
- content: '<p>The handler you are building should do the following:</p><p>{{Description}}</p><p></p><p>{{#RequestBody}}</p><p>The incoming request body is JSON that looks like this:</p><pre><code>{\n{{RequestBody}}\n}</code></pre><p>{{/RequestBody}}</p><p></p><p>Use this starting template:</p><pre><code>import express from \'express\';\nconst app = express();\nconst port = 3000;\napp.use(express.json())\n\n// TODO: Implement the {{Method}} handler here\n\napp.listen(port, async () =&gt; {\n console.log(`Server listening on port ${ port }`)\n})</code></pre><p>The HTTP request handler is of type {{Method}}.</p><p>The request handler MUST be on the route <code>{{Route}}</code>.</p><p>Do not forget to use async and await.</p><p>Always test that the generated server works without bugs and errors as required by running the code and making mock <code>curl</code> requests to the server.</p><p>Generate the full required server code.</p><p></p><p>{{#Instructions}}</p><p>Here are the required implementation instructions:</p><p>{{Instructions}}</p><p>{{/Instructions}}</p><p></p><p>Thought: Here is the plan of how I will go about solving this:</p>',
+ content: '<p>{{#Routes}}</p><p>The handler you are building should do the following:</p><p>{{Description}}</p><p></p><p>{{#RequestBody}}</p><p>The incoming request body is JSON that looks like this:</p><pre><code>{\n{{RequestBody}}\n}</code></pre><p>{{/RequestBody}}</p><p></p><p>Use this starting template:</p><pre><code>import express from \'express\';\nconst app = express();\nconst port = 3000;\napp.use(express.json())\n\n// TODO: Implement the {{Method}} handler here\n\napp.listen(port, async () =&gt; {\n console.log(`Server listening on port ${ port }`)\n})</code></pre><p>The HTTP request handler is of type {{Method}}.</p><p>The request handler MUST be on the route <code>{{Path}}</code>.</p><p>Do not forget to use async and await.</p><p>Always test that the generated server works without bugs and errors as required by running the code and making mock <code>curl</code> requests to the server.</p><p>Generate the full required server code.</p><p></p><p>{{#Instructions}}</p><p>Here are the required implementation instructions:</p><p>{{Instructions}}</p><p>{{/Instructions}}</p><p>{{/Routes}}</p><p>Thought: Here is the plan of how I will go about solving this:</p>',
},
],
},