aws-solutions-library-samples / guidance-for-natural-language-queries-of-relational-databases-on-aws

Demonstration of Natural Language Query (NLQ) of an Amazon RDS for PostgreSQL database, using SageMaker JumpStart, Amazon Bedrock, LangChain, Streamlit, and Chroma.
https://aws.amazon.com/solutions/guidance/natural-language-queries-of-relational-databases-on-aws/
MIT No Attribution
58 stars 10 forks source link

Update the application code to reflect changes to the LangChain base class #53

Closed garystafford-aws closed 10 months ago

garystafford-aws commented 10 months ago

Issue #, if available: 52

Description of changes: Update the application code to reflect changes to the LangChain base class:

from langchain import FewShotPromptTemplate, PromptTemplate, SQLDatabase

to

from langchain.sql_database import SQLDatabase
from langchain.prompts import FewShotPromptTemplate, PromptTemplate

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.