Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
commit
Vasek Mlejnsky43f5afa15caa
diff --git a/api-service/poetry.lock b/api-service/poetry.lockindex 829c00e4d..8e4bd3115 100644--- a/api-service/poetry.lock+++ b/api-service/poetry.lock@@ -1006,14 +1006,14 @@ testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-chec[[package]]name = "langchain"-version = "0.0.111"+version = "0.0.112"description = "Building applications with LLMs through composability"category = "main"optional = falsepython-versions = ">=3.8.1,<4.0"files = [- {file = "langchain-0.0.111-py3-none-any.whl", hash = "sha256:ba034d254c8050bab4a8315311d5e3bd99fde717357a7d275343e5115ca47ac7"},- {file = "langchain-0.0.111.tar.gz", hash = "sha256:1ada5e4c46942f21b244d4c88d0af5ffb9db083f4e54b6edf121f316175105b3"},+ {file = "langchain-0.0.112-py3-none-any.whl", hash = "sha256:3e55e9e767ee22e1f7a3dd423a52e714c444bd2207932f88b80db75ba481ff1f"},+ {file = "langchain-0.0.112.tar.gz", hash = "sha256:554fdb8544b8e6bed600c95f3ced58b3f51035ccd625d786b6445efd4171953b"},][package.dependencies]@@ -2230,4 +2230,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more[metadata]lock-version = "2.0"python-versions = ">=3.8.1,<4.0"-content-hash = "a83f1d86e3a088d619e34c90652058fa9a5289ab677ecb934ebd32c3356b2708"+content-hash = "140f35b6df2ed2cee0eed9eb3aceded6095ced61b5c5916a5a96a7d91010c8dd"diff --git a/api-service/pyproject.toml b/api-service/pyproject.tomlindex c80cadf1e..7a0ce6672 100644--- a/api-service/pyproject.toml+++ b/api-service/pyproject.toml@@ -9,7 +9,7 @@ python = ">=3.8.1,<4.0"flask = "^2.2.3"gunicorn = "^20.1.0"openai = "^0.27.0"-langchain = "^0.0.111"+langchain = "^0.0.112"supabase = "^1.0.1"flask-cors = "^3.0.10"python-dateutil = "^2.8.2"diff --git a/api-service/test.py b/api-service/test.pyindex d00ef3c37..722b7bb44 100644--- a/api-service/test.py+++ b/api-service/test.py@@ -5,6 +5,8 @@ from langchain.chat_models import ChatOpenAIfrom langchain.callbacks.base import CallbackManagerfrom langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandlerfrom langchain.prompts.chat import (+ ChatPromptTemplate,+ SystemMessagePromptTemplate,HumanMessagePromptTemplate,)from langchain.schema import HumanMessage@@ -12,8 +14,22 @@ from langchain.schema import HumanMessagefrom codegen.tools.playground import create_playground_tools+def create_prompt() -> ChatPromptTemplate:+ pass++OPENAI_API_KEY = "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"+PREFIX = """You are an AI programming assistant.++++You have access to the following tools:"""++FORMAT_INSTRUCTIONS = """"""++##########+PREFIX = """You are a senior JavaScript/Nodejs developer. You are building an Express server that handles your REST API and you are required to complete the code function `handle{method}Request` based on the provided instructions from your boss. You have access to the following tools:You are starting with the following code snippet.```@@ -33,7 +49,10 @@ app.{method}('/', handle{method}Request);// Start the serverapp.listen(3000, () => console.log('Listening on port 3000'));-```"""+```++Please follow the template by including the above snippet with escaped new lines in your answers.+"""FORMAT_INSTRUCTIONS = """"The way you use the tools is by specifying a json blob.Specifically, this json should have a `action` key (with the name of the tool to use) and a `action_input` key (with the input to the tool going here).@@ -98,6 +117,7 @@ prompt = ChatAgent.create_prompt(input_variables=input_variables,)+# Create agent and it's executoragent = ChatAgent.from_llm_and_tools(llm=chat,