Skip to content

Commit

Permalink
Bugfix - date format
Browse files Browse the repository at this point in the history
  • Loading branch information
DEENUU1 committed Jan 28, 2024
1 parent 0dba7e6 commit 349b057
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/ai/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def setup_agent(session_id: str, model: str) -> AgentExecutor:

tools = [
google_calendar.GoogleCalendarCreateEventTool(),
google_calendar.GoogleCalendarListEventTool(),
notion.NotionNoteCreateTool(),
today.CurrentTimeTool(),
news.NewsTool(),
Expand Down
8 changes: 4 additions & 4 deletions app/ai/tools/google_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class GoogleCalendarCreateEventInput(BaseModel):
)
event_name: str = Field(description="Name of the event")
all_day: bool = Field(description="If event is all day")
start_date: str = Field(description="Start date of the event in format 'YYYY-MM-DD HH:MM' or 'YYYY-MM-DD'")
end_date: Optional[str] = Field(description="End date of the event in format 'YYYY-MM-DD HH:MM' or 'YYYY-MM-DD'")
start_date: str = Field(description="Start date of the event in format 'YYYY/MM/DD HH:MM' or 'YYYY/MM/DD'")
end_date: Optional[str] = Field(description="End date of the event in format 'YYYY/MM/DD HH:MM' or 'YYYY/MM/DD'")
duration: Optional[str] = Field(
description="Duration of the event in format HH:mm use only when user gives use duration of an event"
)


class GoogleCalendarListEventInput(BaseModel):
start_date: str = Field(description="Start date of the event in format 'YYYY-MM-DD'")
start_date: str = Field(description="Start date of the event in format 'YYYY/MM/DD'")


class GoogleCalendarCreateEventTool(BaseTool):
Expand Down Expand Up @@ -87,7 +87,7 @@ def get_events_from_all_calendars(start_date: str) -> List:
"operation": "list" # Hard coded value based on routing in make.com,
}
)
result.append(response.json())
result.append(response.text)

return result

0 comments on commit 349b057

Please sign in to comment.