File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
storage/framework/.stacks/core/cloud/src/cloud Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-new */
2
2
import { Duration , CfnOutput as Output , aws_iam as iam , aws_lambda as lambda } from 'aws-cdk-lib'
3
- import { AuthorizationType , LambdaIntegration , Resource , RestApi } from 'aws-cdk-lib/aws-apigateway'
3
+ import { AuthorizationType , LambdaIntegration , RestApi } from 'aws-cdk-lib/aws-apigateway'
4
4
import type { Construct } from 'constructs'
5
5
import { config } from '@stacksjs/config'
6
6
import type { NestedCloudProps } from '../types'
@@ -69,6 +69,14 @@ export class AiStack {
69
69
authorizationType : AuthorizationType . NONE ,
70
70
} )
71
71
72
+ // alias to ask
73
+ const promptResource = api . root . addResource ( 'prompt' )
74
+ const promptIntegration = new LambdaIntegration ( askLambda )
75
+ promptResource . addMethod ( 'POST' , promptIntegration , {
76
+ operationName : 'Stacks AI Ask' ,
77
+ authorizationType : AuthorizationType . NONE ,
78
+ } )
79
+
72
80
const summarizeResource = api . root . addResource ( 'summarize' )
73
81
const summarizeIntegration = new LambdaIntegration ( summarizeLambda )
74
82
summarizeResource . addMethod ( 'POST' , summarizeIntegration , {
You can’t perform that action at this time.
0 commit comments