-
Notifications
You must be signed in to change notification settings - Fork 8
/
openapi.yaml
100 lines (98 loc) · 2.81 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
openapi: 3.0.1
info:
title: AWS Service Plugin
description: A plugin that allows users to create websites and Lambda functions using ChatGPT.
version: "v1"
servers:
- url: http://localhost:5000
paths:
/uploadToS3:
post:
operationId: uploadToS3
summary: Upload a file to an S3 bucket, any JavaScript code should handle the response body as a JSON object without additional parsing. Also any JavaScript code should use $.ajax() instead of $.post().
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
prefix:
type: string
file_name:
type: string
file_content:
type: string
content_type:
type: string
required:
- prefix
- file_name
- file_content
- content_type
responses:
"200":
description: S3 file uploaded
content:
application/json:
schema:
$ref: "#/components/schemas/UploadToS3Response"
/createLambdaFunction:
post:
operationId: createLambdaFunction
summary: Create an AWS Lambda function using Python 3.9
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
code:
type: string
function_name:
type: string
description:
type: string
has_dependencies:
type: boolean
dependencies:
type: string
required:
- code
- function_name
- description
- has_dependencies
- dependencies
responses:
"200":
description: Lambda Function Created
content:
application/json:
schema:
$ref: "#/components/schemas/CreateLambdaFunctionResponse"
/.well-known/ai-plugin.json:
get:
operationId: serveManifest
summary: Serve the ai-plugin.json file
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
components:
schemas:
UploadToS3Response:
type: object
properties:
message:
type: string
description: A message indicating the result of the upload operation.
CreateLambdaFunctionResponse:
type: object
properties:
Configuration:
type: object
description: The details of the created Lambda function.