forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
42 lines (34 loc) · 1011 Bytes
/
Copy pathmodels.py
File metadata and controls
42 lines (34 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
Pydantic models for the Google Calendar Omi plugin.
"""
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel
class ChatToolResponse(BaseModel):
"""Response model for Omi chat tools."""
result: Optional[str] = None
error: Optional[str] = None
class CalendarEvent(BaseModel):
"""Google Calendar event."""
id: str
summary: str
description: Optional[str] = None
location: Optional[str] = None
start: str # ISO datetime or date
end: str # ISO datetime or date
all_day: bool = False
attendees: List[str] = []
html_link: Optional[str] = None
status: str = "confirmed"
class Calendar(BaseModel):
"""Google Calendar."""
id: str
summary: str
description: Optional[str] = None
primary: bool = False
background_color: Optional[str] = None
class GoogleUserInfo(BaseModel):
"""Google user information."""
email: str
name: Optional[str] = None
picture: Optional[str] = None