Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
hardcode project id for now; update endpoint
Vasek Mlejnsky1d3cfdde7c88
diff --git a/api/generate.py b/api/generate.pyindex af455f971..d1ece5fc6 100644--- a/api/generate.py+++ b/api/generate.py@@ -8,15 +8,16 @@ from code_generator.base import generate_req_handlerclass handler(BaseHTTPRequestHandler):def do_POST(self):- # Extract 'prompt' from the json bodyself.data_string = self.rfile.read(int(self.headers['Content-Length']))data = simplejson.loads(self.data_string)+ project_id = data['projectId']blocks = data['blocks']method = data['method']- final_prompt, js_code = generate_req_handler(blocks, method)+ final_prompt, js_code = generate_req_handler(+ project_id=project_id, blocks=blocks, method=method)self.send_response(200)self.send_header('Content-Type', 'application/json')diff --git a/components/Editor/index.tsx b/components/Editor/index.tsxindex 4abc2b12f..ff84b144f 100644--- a/components/Editor/index.tsx+++ b/components/Editor/index.tsx@@ -34,6 +34,7 @@ async function handlePostGenerate(url: string, { arg }: {return await fetch(url, {method: 'POST',body: JSON.stringify({+ projectId: '460355b3',blocks: arg.blocks.map(b => b.prompt),method: arg.method.toLowerCase(),}),