Skip to content

armgit / E2B

Public Imported from GitHub
0

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

rename

Vasek Mlejnsky20e7925c5c1b
diff --git a/api-service/app.py b/api-service/app.py
index 74295e218..d85af650d 100644
--- a/api-service/app.py
+++ b/api-service/app.py
@@ -48,7 +48,6 @@ async def generate():
method = body["method"]
route = body["route"]
-
await db.create_deployment(run_id=run_id, project_id=project_id, route_id=route_id)
playground = None
try:
@@ -64,7 +63,7 @@ async def generate():
human_tools = list(create_human_tools(run_id=run_id, playground=playground))
# Create a new instance of code generator
- cg = Codegen.from_playground_and_database(
+ cg = Codegen.from_tools_and_database(
# The order in which we pass tools HAS an effect on the LLM behaviour.
custom_tools=[
*playground_tools,
diff --git a/api-service/codegen/codegen.py b/api-service/codegen/codegen.py
index 16d04e5c8..47fec4fd8 100644
--- a/api-service/codegen/codegen.py
+++ b/api-service/codegen/codegen.py
@@ -86,7 +86,7 @@ class Codegen(BaseModel):
return [tool.name for tool in self._tools]
@classmethod
- def from_playground_and_database(
+ def from_tools_and_database(
cls,
custom_tools: List[BaseTool],
database: Database,
diff --git a/api-service/codegen/prompt.py b/api-service/codegen/prompt.py
index 7f54da834..d86d88d0f 100644
--- a/api-service/codegen/prompt.py
+++ b/api-service/codegen/prompt.py
@@ -66,6 +66,7 @@ app.listen(port, () => {{
HUMAN_INSTRUCTIONS_SUFFIX = [
"Think about it and plan your work first",
+ "If you are not sure what to do or something is not working and you do not know why, use the tool `AskHuman` to ask for help",
"Always run the code before you submit the answer",
"Generate the full required server code and and make sure it starts without any errors",
"Test that the generated server from the previous step works as required by making mock `curl` requests to the server",