pydantic.v1.error_wrappers.ValidationError: 2 validation errors for SQLDatabaseChain __root__ -> llm instance of Runnable expected (type=type_error.arbitrary_type; expected_arbitrary_type=Runnable) #21401
Replies: 1 comment 3 replies
-
The error you're encountering is due to the To fix this, you need to wrap your If you're considering an alternative model, the LangChain library's Here's a brief example of how you might use an OpenAI model with from langchain_experimental.sql import SQLDatabaseChain
from langchain_community.llms import OpenAI, SQLDatabase
db = SQLDatabase(...)
db_chain = SQLDatabaseChain.from_llm(OpenAI(), db) This approach should help you bypass the validation error by ensuring compatibility with the
|
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I am trying to fetch data from sql database using local llm, but while loading local llm it is not working for me. And throwing the below error. please help me know how to fix, or pls suggest which model can i use instead of it and load it, so it work for me
System Info
langchain_experiment - 0.0.57
langchain_community - 0.0.37
Beta Was this translation helpful? Give feedback.
All reactions