forked from DjangoPeng/openai-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
64 lines (64 loc) · 1.74 KB
/
openapi.yaml
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
openapi: 3.0.1
info:
title: Weather Forecast
description: A Plugin that allows the user to forecast current or future weather using ChatGPT. Ask for clarification if a user request is ambiguous.
version: 'v1'
servers:
- url: http://localhost:5002
paths:
/weather/current:
get:
operationId: getCurrentWeather
summary: Get the current weather of the city
parameters:
- in: query
name: city
schema:
type: string
required: true
description: The city and state, e.g. San Francisco, CA.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/getCurrentWeather'
/weather/forecast:
get:
operationId: getNDayWeatherForecast
summary: Forecast the weather of the city in a few days
parameters:
- in: query
name: num_days
schema:
type: integer
required: true
description: The number of days to forecast, e.g. 5
- in: query
name: city
schema:
type: string
required: true
description: The city and state, e.g. San Francisco, CA.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/getNDayWeatherForecast'
components:
schemas:
getCurrentWeather:
type: object
properties:
weather:
type: string
description: The current weather of the city.
getNDayWeatherForecast:
type: object
properties:
weather:
type: string
description: The weather of the city in a few days.