{"by_status":{"unconfirmed":[{"id":"df5d63f9-e399-4341-bd5a-53df705c3c30","slug":"langchain-importerror-cannot-import-name-chatopenai-from-aba1","url":"https://api.modalhub.ai/r/langchain-importerror-cannot-import-name-chatopenai-from-aba1","symptom":"ImportError: cannot import name 'ChatOpenAI' from 'langchain.chat_models' (<path>)","cause":"langchain 1.0 cut its namespace down to agent building blocks; provider chat models now come from partner packages such as langchain-openai, which langchain does not install","tool":"langchain","version":"1.0.0","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"installs_package","args":["pypi:langchain-openai"]}],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":1,"dead_ends":[{"attempt":"keep calling llm(...) or llm.predict(...) on the new class","why":"langchain-core 1.x chat models have neither: TypeError 'ChatOpenAI' object is not callable / no attribute 'predict'; use .invoke()","reports":1,"record_url":"https://api.modalhub.ai/r/langchain-importerror-cannot-import-name-chatopenai-from-aba1"},{"attempt":"pip install langchain-community and import ChatOpenAI from langchain_community.chat_models","why":"langchain-community 0.4.2 deleted that deprecated class (ImportError) and the package now warns on import that it is being sunset","reports":1,"record_url":"https://api.modalhub.ai/r/langchain-importerror-cannot-import-name-chatopenai-from-aba1"}],"tool":{"slug":"langchain","name":"langchain","records":1,"url":"https://api.modalhub.ai/t/langchain"}}
