From f72bc4b8a2a1e4684aaf2cb95f6f126c44ff1c50 Mon Sep 17 00:00:00 2001 From: Rihards Gravis Date: Tue, 12 Dec 2023 12:36:36 +0200 Subject: [PATCH] Reduce code --- .../langchain/agents/agent_toolkits/robocorp/toolkit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/langchain/langchain/agents/agent_toolkits/robocorp/toolkit.py b/libs/langchain/langchain/agents/agent_toolkits/robocorp/toolkit.py index bf5acfc71f0a5..2dbb731247421 100644 --- a/libs/langchain/langchain/agents/agent_toolkits/robocorp/toolkit.py +++ b/libs/langchain/langchain/agents/agent_toolkits/robocorp/toolkit.py @@ -111,7 +111,8 @@ class Config: def get_tools(self) -> List[BaseTool]: # Fetch and format the API spec - response = requests.get(f"{self.url}/openapi.json") + response = requests.get(self.url) + api_spec = reduce_openapi_spec(self.url, response.json()) # Prepare request tools