File size: 2,202 Bytes
f374654
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
WEATHER_FUNCTIONS = [
    {
        "type": "function",
        "function": {
            "name": "get_weather_alerts",
            "description": "Get weather alerts for one or more locations in India. Can search by city, state, district, or region name.",
            "parameters": {
                "type": "object",
                "properties": {
                    "locations": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "List of locations to search for (up to 5). Can be city names, state names, districts, etc.",
                        "maxItems": 5,
                        "minItems": 1
                    },
                    "include_details": {
                        "type": "boolean",
                        "description": "Whether to include detailed alert information like warning messages and coordinates",
                        "default": True
                    }
                },
                "required": ["locations"]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "get_alert_summary",
            "description": "Get a summary of all current weather alerts by severity level",
            "parameters": {
                "type": "object",
                "properties": {},
                "required": []
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "get_available_locations",
            "description": "Get a list of all locations that currently have weather alerts",
            "parameters": {
                "type": "object",
                "properties": {
                    "limit": {
                        "type": "integer",
                        "description": "Maximum number of locations to return",
                        "default": 50,
                        "minimum": 1,
                        "maximum": 200
                    }
                },
                "required": []
            }
        }
    }
]