Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Merge branch 'master' into tools
Tomas Valenta4f878cffa655
diff --cc api-service/codegen/codegen.pyindex e5e14f809,7b644cdef..81112b8b8--- a/api-service/codegen/codegen.py+++ b/api-service/codegen/codegen.py@@@ -24,8 -34,27 +24,8 @@@ from codegen.prompt importHUMAN_INSTRUCTIONS_PREFIX,HUMAN_INSTRUCTIONS_SUFFIX,)- from .callback_handler import CustomCallbackHandler+ from codegen.callbacks.logs import LogsCallbackHandler--class AskHuman(BaseTool):- name = "AskHuman"- description = "You can ask a human for guidance when you think you got stuck or you are not sure what to do next. The input should be a question for the human."-- def _run(self, question: str) -> str:- print(question)- sleep(60)- with open(- "/Users/vasekmlejnsky/Developer/ai-api/api-service/codegen/human_input.txt"- ) as f:- human_input = f.read()- print("human_input:", human_input)- return human_input-- async def _arun(self, question: str) -> str:- return NotImplementedError("AskHuman does not support async")--# class OutputFinalCode(BaseTool):# name = "OutputFinalCode"# description = "This is the last tool you would use. You use it when you know the final server code and you want to output it. The input should be the final server code that does what the user required."