forked from garylab/serper-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschemas.py
More file actions
64 lines (45 loc) · 3.14 KB
/
Copy pathschemas.py
File metadata and controls
64 lines (45 loc) · 3.14 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from typing import Optional
from pydantic import BaseModel, Field
from .enums import ReviewSortBy
class BaseRequest(BaseModel):
q: str = Field(..., description="The query to search for")
gl: Optional[str] = Field(None, description="The country to search in, e.g. us, uk, ca, au, etc.")
location: Optional[str] = Field(None, description="The location to search in, e.g. San Francisco, CA, USA")
hl: Optional[str] = Field(None, description="The language to search in, e.g. en, es, fr, de, etc.")
page: Optional[int] = Field(1, ge=1, description="The page number to return, first page is 1")
class SearchRequest(BaseRequest):
tbs: Optional[str] = Field(None, description="The time period to search in, e.g. d, w, m, y")
num: int = Field(10, le=100, description="The number of results to return, max is 100")
class AutocorrectRequest(BaseRequest):
autocorrect: Optional[bool] = Field(True, description="Automatically correct")
class MapsRequest(BaseModel):
q: str = Field(..., description="The query to search for")
ll: Optional[str] = Field(None, description="The GPS position & zoom level")
placeId: Optional[str] = Field(None, description="The place ID to search in")
cid: Optional[str] = Field(None, description="The CID to search in")
gl: Optional[str] = Field(None, description="The country to search in, e.g. us, uk, ca, au, etc.")
hl: Optional[str] = Field(None, description="The language to search in, e.g. en, es, fr, de, etc.")
page: Optional[int] = Field(1, ge=1, description="The page number to return, first page is 1")
class ReviewsRequest(BaseModel):
fid: str = Field(..., description="The FID")
cid: Optional[str] = Field(None, description="The CID to search in")
placeId: Optional[str] = Field(None, description="The place ID to search in")
sortBy: Optional[ReviewSortBy] = Field(ReviewSortBy.mostRelevant, description="The sort order to use")
topicId: Optional[str] = Field(None, description="The topic ID to search in")
nextPageToken: Optional[str] = Field(None, description="The next page token to use")
gl: Optional[str] = Field(None, description="The country to search in, e.g. us, uk, ca, au, etc.")
hl: Optional[str] = Field(None, description="The language to search in, e.g. en, es, fr, de, etc.")
class ShoppingRequest(BaseRequest):
autocorrect: Optional[bool] = Field(True, description="Automatically correct")
num: int = Field(10, le=100, description="The number of results to return, max is 100")
class LensRequest(BaseModel):
url: str = Field(..., description="The url to search")
gl: Optional[str] = Field(None, description="The country to search in, e.g. us, uk, ca, au, etc.")
hl: Optional[str] = Field(None, description="The language to search in, e.g. en, es, fr, de, etc.")
class ParentsRequest(BaseModel):
q: str = Field(..., description="The query to search for")
num: int = Field(10, le=100, description="The number of results to return, max is 100")
page: Optional[int] = Field(1, ge=1, description="The page number to return, first page is 1")
class WebpageRequest(BaseModel):
url: str
includeMarkdown: Optional[bool] = False