Skip to content

Commit

Permalink
Disable google calendar in agent
Browse files Browse the repository at this point in the history
  • Loading branch information
DEENUU1 committed Jan 24, 2024
1 parent 3b58455 commit 639a560
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
14 changes: 7 additions & 7 deletions app/ai/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from langchain_community.utilities.openweathermap import OpenWeatherMapAPIWrapper
from langchain.tools import WikipediaQueryRun
from langchain_community.utilities import WikipediaAPIWrapper
from .tools import news, google_calendar
from .tools import news #, google_calendar

langchain.debug = True

Expand Down Expand Up @@ -64,14 +64,14 @@ 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()
# google_calendar_list_event = google_calendar.GoogleCalendarListEventTool()

tools = [
Tool(
name="GoogleCalendarListEvent",
func=google_calendar_list_event.run,
description="Useful for when you need to answer questions about events from Google calendar"
),
# Tool(
# name="GoogleCalendarListEvent",
# func=google_calendar_list_event.run,
# description="Useful for when you need to answer questions about events from Google calendar"
# ),
Tool(
name="News",
func=news_tool.run,
Expand Down
9 changes: 0 additions & 9 deletions app/routers/health.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from fastapi import APIRouter
from ai.integration.google_calendar import Calendar


router = APIRouter(
Expand All @@ -11,11 +10,3 @@
@router.get("/health", tags=["health"])
def health():
return {"status": "okk"}


@router.get("/calendar", tags=["calendar"])
def calendar():
c = Calendar()
c.get_all_events()

return {"status": "okk"}

0 comments on commit 639a560

Please sign in to comment.