You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/event-handler/src/bedrock-agent/BedrockFunctionResponse.ts
+10-15Lines changed: 10 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -12,16 +12,6 @@ import type { BedrockAgentFunctionResolver } from './BedrockAgentFunctionResolve
12
12
* when you return anything from your function handler other than an instance of this class.
13
13
*/
14
14
classBedrockFunctionResponse{
15
-
/**
16
-
* The name of the action group, this comes from the `event.actionGroup` field
17
-
* in the Bedrock agent function event.
18
-
*/
19
-
readonlyactionGroup: string;
20
-
/**
21
-
* The name of the function returning the response, this comes from the `event.function` field
22
-
* in the Bedrock agent function event.
23
-
*/
24
-
readonlyfunc: string;
25
15
/**
26
16
* The response object that defines the response from execution of the function.
27
17
*/
@@ -60,8 +50,6 @@ class BedrockFunctionResponse {
60
50
sessionAttributes?: Record<string,string>;
61
51
promptSessionAttributes?: Record<string,string>;
62
52
}){
63
-
this.actionGroup=actionGroup;
64
-
this.func=func;
65
53
this.body=body;
66
54
this.responseState=responseState;
67
55
this.sessionAttributes=sessionAttributes;
@@ -70,13 +58,20 @@ class BedrockFunctionResponse {
70
58
71
59
/**
72
60
* Builds the Bedrock function response object according to the Bedrock agent function {@link https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html#agents-lambda-response | response format}.
61
+
*
62
+
* @param options - The options for building the response.
63
+
* @param options.actionGroup - The action group of the function, this comes from the `event.actionGroup` field in the Bedrock agent function event.
64
+
* @param options.func - The name of the function being invoked by the agent, this comes from the `event.function` field in the Bedrock agent function event.
0 commit comments