From b05f9e14be26617415000fa8f80efc60eba03de1 Mon Sep 17 00:00:00 2001 From: "Carlos D. Escobar-Valbuena" Date: Mon, 4 Mar 2024 10:23:09 -0500 Subject: [PATCH] fix: temporary disable of sql tools until more robust guardrails can be implemented --- vortex/ai/agents/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vortex/ai/agents/__init__.py b/vortex/ai/agents/__init__.py index c89735a..da2fd3e 100644 --- a/vortex/ai/agents/__init__.py +++ b/vortex/ai/agents/__init__.py @@ -8,14 +8,14 @@ from typing import Dict from langchain.agents import AgentExecutor, load_tools -from langchain.agents.format_scratchpad.openai_tools import ( - format_to_openai_tool_messages, -) - +from langchain.agents.format_scratchpad.openai_tools import \ + format_to_openai_tool_messages # from langchain.agents.output_parsers.openai_functions import OpenAIFunctionsAgentOutputParser -from langchain.agents.output_parsers.openai_tools import OpenAIToolsAgentOutputParser +from langchain.agents.output_parsers.openai_tools import \ + OpenAIToolsAgentOutputParser from langchain.sql_database import SQLDatabase -from langchain_community.agent_toolkits import FileManagementToolkit, SQLDatabaseToolkit +from langchain_community.agent_toolkits import (FileManagementToolkit, + SQLDatabaseToolkit) from langchain_core.messages import AIMessage, HumanMessage from sqlalchemy.dialects.postgresql import insert @@ -83,7 +83,7 @@ def __init__( llm=self.llm, ) self.agent_tools = ( - self.tools + self.sql_tools + self.bare_tools + self.file_system_tools + self.tools + self.bare_tools #+ self.sql_tools + self.file_system_tools ) self.llm_with_tools = self.llm.bind_tools(self.agent_tools) # self.llm_with_functions = self.llm.bind_functions(self.tools + self.sql_tools)