Skip to content

Commit

Permalink
Merge pull request #94 from brnaba-aws/main
Browse files Browse the repository at this point in the history
Added support for sessionState in Agents for Bedrock TS
  • Loading branch information
brnaba-aws authored Nov 21, 2024
2 parents da9563f + efd295e commit 0a9f7cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions typescript/src/agents/amazonBedrockAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ export class AmazonBedrockAgent extends Agent {
userId: string,
sessionId: string,
chatHistory: ConversationMessage[],
additionalParams?: Record<string, string>
additionalParams?: Record<any, any>
): Promise<ConversationMessage> {
// Construct the command to invoke the Amazon Bedrock agent with user input
const command = new InvokeAgentCommand({
agentId: this.agentId,
agentAliasId: this.agentAliasId,
sessionId,
inputText
sessionId: sessionId,
inputText: inputText,
sessionState: additionalParams ? additionalParams.sessionState? additionalParams.sessionState : undefined : undefined,
});

try {
Expand Down
2 changes: 1 addition & 1 deletion typescript/src/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class MultiAgentOrchestrator {
userInput: string,
userId: string,
sessionId: string,
additionalParams: Record<string, string> = {}
additionalParams: Record<any, any> = {}
): Promise<AgentResponse> {
this.executionTimes = new Map();
let classifierResult: ClassifierResult;
Expand Down

0 comments on commit 0a9f7cc

Please sign in to comment.