unitycatalog / unitycatalog/unitycatalog

Not compatible with langchain-core>=0.3.79

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
3.5k
Forks
672
Avg merge
6d 16h
Merged PRs (30d)
30

Description

Error message:
ModuleNotFoundError: No module named 'langchain_core.pydantic_v1'

Fix was to downgrade to langchain-core==0.3.79

Invoked by from databricks_langchain import ChatDatabricks
Stack trace:

     17 from databricks.sdk import WorkspaceClient
     18 from pydantic import BaseModel
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-90c00629-c40f-4608-96d6-3c5713086415/lib/python3.12/site-packages/databricks_langchain/__init__.py:18
     16 from unitycatalog.ai.core.base import set_uc_function_client
     17 from unitycatalog.ai.core.databricks import DatabricksFunctionClient
---> 18 from unitycatalog.ai.langchain.toolkit import UCFunctionToolkit, UnityCatalogTool
     20 from databricks_langchain.chat_models import ChatDatabricks
     21 from databricks_langchain.embeddings import DatabricksEmbeddings
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-90c00629-c40f-4608-96d6-3c5713086415/lib/python3.12/site-packages/unitycatalog/ai/langchain/toolkit.py:13
      6 from langchain_core._api.deprecation import LangChainDeprecationWarning
      8 warnings.filterwarnings(
      9     "ignore",
     10     message=r".*As of langchain-core 0\.3\.0, LangChain uses pydantic v2 internally.*",
     11     category=LangChainDeprecationWarning,
     12 )
---> 13 from langchain_core.pydantic_v1 import BaseModel, Field, root_validator
     14 from langchain_core.tools import StructuredTool
     16 from unitycatalog.ai.core.base import BaseFunctionClient

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with databricks_langchain/init.py and the import path through unitycatalog/ai/langchain/toolkit.py when importing ChatDatabricks. Check the langchain-core compatibility around version 0.3.79 and the pydantic_v1 import, then verify that ChatDatabricks imports successfully with langchain-core >=0.3.79.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.