Skip to content

Commit

Permalink
fixed langchain version changes, updated imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Jahn committed Nov 1, 2024
1 parent 059eab1 commit 1278b45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion appsync-bedrock-subscriptions-cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@aws-sdk/protocol-http": "^3.374.0",
"@aws-sdk/signature-v4": "^3.374.0",
"@types/aws-lambda": "^8.10.125",
"@types/jest": "^29.5.14",
"@types/node": "18.14.6",
"aws-cdk": "2.70.0",
"jest": "^29.5.0",
Expand All @@ -25,6 +26,7 @@
},
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.431.0",
"@langchain/community": "^0.3.11",
"@smithy/eventstream-codec": "^2.0.12",
"@smithy/protocol-http": "^3.0.8",
"@smithy/signature-v4": "^2.0.12",
Expand All @@ -34,4 +36,4 @@
"constructs": "^10.0.0",
"langchain": "^0.3.5"
}
}
}
10 changes: 5 additions & 5 deletions appsync-bedrock-subscriptions-cdk/src/ask.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AppSyncResolverEvent } from 'aws-lambda'
import { ChatBedrock } from 'langchain/chat_models/bedrock'
import { AppSyncRequestIAM } from "./appsyncRequest"
import { StringOutputParser } from "langchain/schema/output_parser";
import { AppSyncResolverEvent } from "aws-lambda";
import { ChatBedrock } from "@langchain/community/chat_models/bedrock";
import { AppSyncRequestIAM } from "./appsyncRequest";
import { StringOutputParser } from "@langchain/core/output_parsers";
const GRAPHQL_URL = process.env.GRAPHQL_URL || "";
const REGION = process.env.REGION || 'us-east-1';

Expand Down Expand Up @@ -39,4 +39,4 @@ exports.handler = async (event: AppSyncResolverEvent<{ chatId: string, prompt: s
}
})
}
}
}

0 comments on commit 1278b45

Please sign in to comment.