[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
from langchain_experimental.llms.ollama_functions import OllamaFunctions
Error Message and Stack Trace (if applicable)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\KALYAN\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain_experimental\llms\ollama_functions.py", line 44, in <module>
from langchain_core.utils.pydantic import is_basemodel_instance, is_basemodel_subclass
ImportError: cannot import name 'is_basemodel_instance' from 'langchain_core.utils.pydantic' (C:\Users\<Profile>\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain_core\utils\pydantic.py)
Description
I'm trying to use langchain for tooling in Ollama, but I'm encountering an ImportError when attempting to initialize the Ollama Functions module. The error states that is_basemodel_instance cannot be imported from langchain_core.utils.pydantic.
System Info
System Information
OS: Windows
OS Version: 10.0.22631
Python Version: 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I'm trying to use langchain for tooling in Ollama, but I'm encountering an ImportError when attempting to initialize the Ollama Functions module. The error states that is_basemodel_instance cannot be imported from langchain_core.utils.pydantic.
System Info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found: