Xweather OpenAI Plugin

Vand ID: vand-81baf6ec-82e2-442b-9e90-abf8c6ac9e03

Learn how to easily use the Xweather OpenAI Plugin tool with the OpenAI API.

This API Provides 3 public endpoints: /weather/summary/{location} : The current weather in a user specified location /weather/forecast/{location} : The next 4 days of weather forecasts in a user specified location /radar/{location} : The current weather radar image in a user specified location For any of these, location required and should be user specified - ask the user for a city if they haven't specified one. Valid location formats include 'city name, state', 'city name, country','latitude, longitude', 'zip code', or 'airport code'. Never provide a default location of New York. For /weather/forecast, the reply is the weather forecast for next 4 days, including the following information: date, maximum temperature, minimum temperature, wind direction, wind speed, precipitation, snow, weather conditions, warnings, and UV index. The API returns the next 4 days of weather forecasts. If the user asks for more than 4 days, return the next 4 days with a message showing that's all that's available. By default, return 4 days of weather forecast as a paragraph of text. For /weather/summary, the reply is the current weather, including the following information: date, temperature, what the temperature feels like to a person (feelsLike), wind direction, wind speed, maximum gust wind speed, precipitation, snow, weather conditions, active weather alerts, and UV index. If the user hasn't specificed an output format, return the data as a paragraph of text. For /weather/forecast, and /weather/summary, provide local units: If the user specified location is in the United States, show only fahrenheit, inches and MPH. If the location is in the UK, show only celsius, mm, and MPH. If the location is in any other country, use celsius, mm, and KPH. Do not show units in other formats unless requested by the user. /radar returns a current radar image as markdown. Provide the images in Markdown format so the user can see it. Do not add links, only images

OpenAI function calls:

{
  "name": "get_summary_weather_summary__location__get",
  "description": "Get the current weather conditions, air quality, and active weather alerts. Requires a user-provided location.",
  "parameters": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "title": "Location",
        "description": "A Valid AerisWeather API Location. The location may be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027"
      }
    },
    "required": [
      "location"
    ]
  }
}
{
  "name": "get_forecast_weather_forecast__location__get",
  "description": "Get the weather forecast, including warnings, for the next 4 days. Requires a user-provided location.",
  "parameters": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "title": "Location",
        "description": "The location must be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027"
      }
    },
    "required": [
      "location"
    ]
  }
}
{
  "name": "get_radar_radar__location__get",
  "description": "Returns markdown for current weather radar image.  Requires a user-provided location.",
  "parameters": {
    "path_params": {
      "type": "object",
      "properties": {
        "location": {
          "type": "string",
          "title": "Location",
          "description": "A Valid AerisWeather API Location. The location may be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027"
        }
      },
      "required": [
        "location"
      ]
    },
    "type": "object",
    "properties": {
      "zoom": {
        "type": "integer",
        "title": "Zoom",
        "description": "A map zoom level between 0 and 15. The default is 7.",
        "default": 7
      }
    },
    "required": []
  }
}
{
  "name": "version_version_get",
  "description": "Version",
  "parameters": {}
}
{
  "name": "heartbeat__get",
  "description": "Heartbeat",
  "parameters": {}
}

Auth Type

none

Servers

https://openai-plugin.xweather.com

OpenAPI:

{
  "openapi": "3.0.2",
  "info": {
    "title": "Xweather OpenAI Plugin",
    "description": " \nThis API Provides 3 public endpoints:\n/weather/summary/{location} : The current weather in a user specified location\n/weather/forecast/{location} :  The next 4 days of weather forecasts in a user specified location \n/radar/{location} : The current weather radar image in a user specified location\n\nFor any of these, location required and should be user specified - ask the user for a city if they haven\u0027t specified one. \nValid location formats include \u0027city name, state\u0027, \u0027city name, country\u0027,\u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027. Never provide a default location of New York.\n\nFor /weather/forecast, the reply is the weather forecast for next 4 days, including the following information:  date, maximum temperature, minimum temperature, wind direction, wind speed, precipitation, snow, weather conditions, warnings, and UV index.  The API returns the next 4 days of weather forecasts. If the user asks for more than 4 days, return the next 4 days with a message showing that\u0027s all that\u0027s available.  By default, return 4 days of weather forecast as a paragraph of text.\n\nFor /weather/summary, the reply is the current weather, including the following information:  date, temperature, what the temperature feels like to a person (feelsLike), wind direction, wind speed, maximum gust wind speed, precipitation, snow, weather conditions, active weather alerts, and UV index.  If the user hasn\u0027t specificed an output format, return the data as a paragraph of text.\n\n\nFor /weather/forecast, and /weather/summary, provide local units: If the user specified location is in the United States, show only fahrenheit, inches and MPH.  If the location is in the UK, show only celsius, mm, and MPH.  If the location is in any other country, use celsius, mm, and KPH.  Do not show units in other formats unless requested by the user.\n\n/radar returns a current radar image as markdown. Provide the images in Markdown format so the user can see it. Do not add links, only images\n",
    "version": "0.2.0"
  },
  "paths": {
    "/weather/summary/{location}": {
      "get": {
        "summary": "Weather Conditions",
        "description": "Get the current weather conditions, air quality, and active weather alerts. Requires a user-provided location.",
        "operationId": "get_summary_weather_summary__location__get",
        "parameters": [
          {
            "description": "A Valid AerisWeather API Location. The location may be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027",
            "required": true,
            "schema": {
              "title": "Location",
              "type": "string",
              "description": "A Valid AerisWeather API Location. The location may be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027"
            },
            "name": "location",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeatherConditionsOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/weather/forecast/{location}": {
      "get": {
        "summary": "Weather Forecast for the next 4 days",
        "description": "Get the weather forecast, including warnings, for the next 4 days. Requires a user-provided location.",
        "operationId": "get_forecast_weather_forecast__location__get",
        "parameters": [
          {
            "description": "The location must be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027",
            "required": true,
            "schema": {
              "title": "Location",
              "type": "string",
              "description": "The location must be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027"
            },
            "name": "location",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeatherForecastsOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/radar/{location}": {
      "get": {
        "summary": "Precipitation Radar",
        "description": "Returns markdown for current weather radar image.  Requires a user-provided location.",
        "operationId": "get_radar_radar__location__get",
        "parameters": [
          {
            "description": "A Valid AerisWeather API Location. The location may be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027",
            "required": true,
            "schema": {
              "title": "Location",
              "type": "string",
              "description": "A Valid AerisWeather API Location. The location may be a \u0027city name, state\u0027, \u0027city name, country\u0027, \u0027latitude, longitude\u0027, \u0027zip code\u0027, or \u0027airport code\u0027"
            },
            "name": "location",
            "in": "path"
          },
          {
            "description": "A map zoom level between 0 and 15. The default is 7.",
            "required": false,
            "schema": {
              "title": "Zoom",
              "type": "integer",
              "description": "A map zoom level between 0 and 15. The default is 7.",
              "default": 7
            },
            "name": "zoom",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeatherRadar"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "summary": "Version",
        "operationId": "version_version_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "summary": "Heartbeat",
        "operationId": "heartbeat__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "NotFoundError": {
        "title": "NotFoundError",
        "required": [
          "code",
          "detail"
        ],
        "type": "object",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        }
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      },
      "WeatherAlerts": {
        "title": "WeatherAlerts",
        "required": [
          "name",
          "beginDateTime",
          "expireDateTIme"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "description": "The name of the alert"
          },
          "beginDateTime": {
            "title": "Begindatetime",
            "type": "string",
            "description": "The date and time that the alert begins in ISO 8601 format"
          },
          "expireDateTIme": {
            "title": "Expiredatetime",
            "type": "string",
            "description": "The date and time that the alert expires in ISO 8601 format"
          }
        }
      },
      "WeatherConditions": {
        "title": "WeatherConditions",
        "required": [
          "dateTimeISO",
          "tempC",
          "tempF",
          "feelsLikeC",
          "feelsLikeF",
          "windDir",
          "windSpeedMPH",
          "windSpeedKPH",
          "windGustMPH",
          "windGustKPH",
          "precipRateMM",
          "precipRateIN",
          "weather",
          "uvi",
          "aqi",
          "aqiCategory",
          "aqiDominantPollutant"
        ],
        "type": "object",
        "properties": {
          "dateTimeISO": {
            "title": "Datetimeiso",
            "type": "string",
            "description": "The date and time of the forecast in ISO 8601 format"
          },
          "tempC": {
            "title": "Tempc",
            "type": "number",
            "description": "The temperature in degrees Celsius"
          },
          "tempF": {
            "title": "Tempf",
            "type": "number",
            "description": "The temperature in degrees Fahrenheit"
          },
          "feelsLikeC": {
            "title": "Feelslikec",
            "type": "number",
            "description": "The temperature that it feels like in degrees Celsius"
          },
          "feelsLikeF": {
            "title": "Feelslikef",
            "type": "number",
            "description": "The temperature that it feels like in degrees Fahrenheit"
          },
          "windDir": {
            "title": "Winddir",
            "type": "string",
            "description": "The direction of the wind in degrees"
          },
          "windSpeedMPH": {
            "title": "Windspeedmph",
            "type": "number",
            "description": "The wind speed in miles per hour"
          },
          "windSpeedKPH": {
            "title": "Windspeedkph",
            "type": "number",
            "description": "The wind speed in kilometers per hour"
          },
          "windGustMPH": {
            "title": "Windgustmph",
            "type": "number",
            "description": "The wind gust speed in miles per hour"
          },
          "windGustKPH": {
            "title": "Windgustkph",
            "type": "number",
            "description": "The wind gust speed in kilometers per hour"
          },
          "precipRateMM": {
            "title": "Precipratemm",
            "type": "number",
            "description": "The precipitation rate in millimeters per hour"
          },
          "precipRateIN": {
            "title": "Precipratein",
            "type": "number",
            "description": "The precipitation rate in inches per hour"
          },
          "weather": {
            "title": "Weather",
            "type": "string",
            "description": "The weather conditions"
          },
          "uvi": {
            "title": "Uvi",
            "type": "integer",
            "description": "The UV index"
          },
          "aqi": {
            "title": "Aqi",
            "type": "integer",
            "description": "The Air Quality index"
          },
          "aqiCategory": {
            "title": "Aqicategory",
            "type": "string",
            "description": "The Air Quality index AirNow Category"
          },
          "aqiDominantPollutant": {
            "title": "Aqidominantpollutant",
            "type": "string",
            "description": "The Air Quality index primary pollutant"
          }
        }
      },
      "WeatherConditionsOutput": {
        "title": "WeatherConditionsOutput",
        "required": [
          "alerts",
          "conditions"
        ],
        "type": "object",
        "properties": {
          "alerts": {
            "title": "Alerts",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeatherAlerts"
            },
            "description": "A list of active weather warnings, watches and advisories."
          },
          "conditions": {
            "title": "Conditions",
            "allOf": [
              {
                "$ref": "#/components/schemas/WeatherConditions"
              }
            ],
            "description": "The current weather conditions"
          }
        }
      },
      "WeatherForecast": {
        "title": "WeatherForecast",
        "required": [
          "dateTimeISO",
          "maxTempC",
          "maxTempF",
          "minTempC",
          "minTempF",
          "windDir",
          "windSpeedKPH",
          "windSpeedMPH",
          "precipMM",
          "precipIN",
          "snowCM",
          "snowIN",
          "weather",
          "uvi"
        ],
        "type": "object",
        "properties": {
          "dateTimeISO": {
            "title": "Datetimeiso",
            "type": "string",
            "description": "The date and time of the forecast in ISO 8601 format"
          },
          "maxTempC": {
            "title": "Maxtempc",
            "type": "integer",
            "description": "The maximum temperature in degrees Celsius"
          },
          "maxTempF": {
            "title": "Maxtempf",
            "type": "integer",
            "description": "The maximum temperature in degrees Fahrenheit"
          },
          "minTempC": {
            "title": "Mintempc",
            "type": "integer",
            "description": "The minimum temperature in degrees Celsius"
          },
          "minTempF": {
            "title": "Mintempf",
            "type": "integer",
            "description": "The minimum temperature in degrees Fahrenheit"
          },
          "windDir": {
            "title": "Winddir",
            "type": "string",
            "description": "The direction of the wind in degrees"
          },
          "windSpeedKPH": {
            "title": "Windspeedkph",
            "type": "integer",
            "description": "The wind speed in kilometers per hour"
          },
          "windSpeedMPH": {
            "title": "Windspeedmph",
            "type": "integer",
            "description": "The wind speed in miles per hour"
          },
          "precipMM": {
            "title": "Precipmm",
            "type": "number",
            "description": "The amount of precipitation in millimeters"
          },
          "precipIN": {
            "title": "Precipin",
            "type": "number",
            "description": "The amount of precipitation in inches"
          },
          "snowCM": {
            "title": "Snowcm",
            "type": "number",
            "description": "The amount of snow in centimeters"
          },
          "snowIN": {
            "title": "Snowin",
            "type": "number",
            "description": "The amount of snow in inches"
          },
          "weather": {
            "title": "Weather",
            "type": "string",
            "description": "The weather conditions"
          },
          "uvi": {
            "title": "Uvi",
            "type": "integer",
            "description": "The UV index"
          }
        }
      },
      "WeatherForecastsOutput": {
        "title": "WeatherForecastsOutput",
        "required": [
          "forecasts"
        ],
        "type": "object",
        "properties": {
          "forecasts": {
            "title": "Forecasts",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeatherForecast"
            }
          }
        }
      },
      "WeatherRadar": {
        "title": "WeatherRadar",
        "required": [
          "radar",
          "zoom"
        ],
        "type": "object",
        "properties": {
          "radar": {
            "title": "Radar",
            "type": "string",
            "description": "The URL of the radar image"
          },
          "zoom": {
            "title": "Zoom",
            "type": "integer",
            "description": "The map zoom level of the radar image"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://openai-plugin.xweather.com"
    }
  ]
}