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.
MIT No Attribution
56 stars 10 forks source link

Breaking Change to LangChain Caused Error in NLQ Application #32

Closed garystafford-aws closed 11 months ago

garystafford-aws commented 11 months ago

Based on the LangChain Issue: This is likely due to SQLDatabaseChain being migrated over to langchain_experimental package. See related PR: https://github.com/langchain-ai/langchain/pull/8425

The package can now be imported using:

from langchain_experimental.sql import SQLDatabaseChain

Error:

ImportError: cannot import name 'SQLDatabaseChain' from 'langchain.chains'

Reference: See Issue: https://github.com/mlflow/mlflow/issues/9188 See PR: https://github.com/langchain-ai/langchain/pull/8425

garystafford-aws commented 11 months ago

Merge #33 fixed Issue #32.