-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
42 lines (38 loc) · 1003 Bytes
/
serverless.yml
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
service: ai-poc-serverless
provider:
name: aws
runtime: nodejs20.x
timeout: 300 #This should be reduced.
environment:
GOOGLE_APPLICATION_CREDENTIALS: ${env:GOOGLE_APPLICATION_CREDENTIALS}
OPENAI_API_KEY: ${env:OPENAI_API_KEY}
custom:
documentation:
summary: 'Send files and process them with AI'
description: 'Send files (mp3, pdf, mp4) and create a summary using AI'
requestBody:
description: 'File to upload'
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
methodResponses:
- statusCode: 200
responseBody:
description: 'File uploaded successfully'
functions:
summarize:
handler: handler.summarizeFile
events:
- http:
path: /
method: post
cors: false
plugins:
- serverless-dotenv-plugin
- serverless-offline
- serverless-aws-documentation