- Newest
- Most votes
- Most comments
As you mentioned, the Langchain documentation suggests using the source code from the Langchain GitHub repository. To use this in your Lambda function, you can:
- Clone the repository locally.
- Make any necessary changes or ensure you are on the correct version that doesn't use the deprecated methods internally.
- Package the Langchain library with your Lambda deployment package. This means including the Langchain directory in your deployment zip file, so it gets uploaded with your code to Lambda.
As for whether AWS Cloud9 can help solve this issue, Cloud9 is an integrated development environment (IDE) that can make it easier to write, run, and debug your code. However, it doesn't inherently solve package distribution issues or deprecated function usage.
You need to update your code to replace the deprecated call method with the invoke method as suggested by the deprecation warning. This change should be made in the part of your codebase where LangChain is being utilized.
Ensure that you are pointing to the correct package repository and that the package name and version are correctly specified. If you're using a requirements file or a package manager, ensure that it's properly formatted and the dependencies are correctly listed.
If this has resolved your issue or was helpful, accepting the answer would be greatly appreciated. Thank you!
Appreciate the fast reply, Mina!
My code does't have the call method. The invoke method is under the hood of the chat() method. The Langchain documentation suggests to use the source code by using Langchain Github repo and set it up locally. However, I wanted to deploy my lambda function. Not sure how to proceed. Any advice would be appreciated, Mina!
Lin
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 17 days ago
Thank you for checking into this, Mina! Appreciate the insights!
Lin