This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, elish. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The error you encountered seems to be related to a version mismatch or a dependency issue. Would you mind sharing the versions of LangChain, Pinecone, and Pydantic you’re currently using? Also, would you be comfortable updating these libraries to their latest compatible versions? I’m here to help you through this! Sources: uv.lock
The error happens because the module
langchain_core.pydantic_v1
has been removed in the recent versions of
langchain-core
. No worries, though! Here’s how you can fix it: • Try updating your imports to use Pydantic directly. For example, instead of
from langchain_core.pydantic_v1 import BaseModel, Field
, use
from pydantic import BaseModel, Field
. • Make sure your library versions are compatible. The versions that work well together are: ◦
langchain-core==0.3.64
◦
pydantic==2.11.3
◦
langgraph==0.4.8
• To update your dependencies, you can run:
pip install --upgrade langchain-core==0.3.64 pydantic==2.11.3 langgraph==0.4.8
• If you’re still seeing the problem, it might be due to some third-party packages importing
langchain_core.pydantic_v1
. You can check this by searching your environment with:
grep -r "langchain_core.pydantic_v1" /path/to/your/venv/lib/python*/site-packages/
• For a fresh start, consider creating a new virtual environment and installing only the necessary packages with the versions pinned as above. Feel free to reach out if you have any questions or if something else comes up—I’m here to help! Sources: uv.lock | LangChain integration guide | LiveKit Docs