diff --git a/app/ai/agent.py b/app/ai/agent.py index 7725e0f..10d06f2 100644 --- a/app/ai/agent.py +++ b/app/ai/agent.py @@ -13,7 +13,7 @@ from .llm import get_chat_openai from .memory import setup_memory from .prompt import prompt -from .tools import news, today # , google_calendar +from .tools import news, today from .vector import get_pinecone langchain.debug = True @@ -63,9 +63,6 @@ def setup_agent(session_id: str, model: str) -> AgentExecutor: weather = OpenWeatherMapAPIWrapper(openweathermap_api_key=settings.OPENWEATHERAPP_API_KEY) wikipedia = WikipediaQueryRun(api_wrapper=WikipediaAPIWrapper()) - news_tool = news.NewsTool() - # google_calendar_list_event = google_calendar.GoogleCalendarListEventTool() - current_time = today.CurrentTimeTool() tools = [ # Tool( @@ -73,16 +70,8 @@ def setup_agent(session_id: str, model: str) -> AgentExecutor: # func=google_calendar_list_event.run, # description="Useful for when you need to answer questions about events from Google calendar" # ), - Tool( - name="CurrentTime", - func=current_time.run, - description="Useful for when you need to answer questions about current time" - ), - Tool( - name="News", - func=news_tool.run, - description="Useful for when you need to answer questions about current news" - ), + today.CurrentTimeTool(), + news.NewsTool(), Tool( name="Wikipedia", func=wikipedia.run, diff --git a/app/ai/tools/today.py b/app/ai/tools/today.py index 26eec8d..c0dbf2d 100644 --- a/app/ai/tools/today.py +++ b/app/ai/tools/today.py @@ -9,7 +9,7 @@ def get_current_time(): class CurrentTimeTool(BaseTool): name = "current_time_tool" - description = "Useful for when you need to answer questions about current time" + description = "Useful for when you need to answer questions about current date and time" def _to_args_and_kwargs(self, tool_input: Union[str, Dict]) -> Tuple[Tuple, Dict]: return (), {} diff --git a/app/main.py b/app/main.py index 99d11d7..6f2ccc3 100644 --- a/app/main.py +++ b/app/main.py @@ -5,7 +5,7 @@ from config.settings import settings from routers import health, chat, media -from integration.google_auth import get_credentials +# from integration.google_auth import get_credentials # from config.database import engine, Base # Base.metadata.create_all(bind=engine)