Context
Cookbook recipe: "Codestral with self-correction"
In https://github.com/mistralai/cookbook/blob/main/third_party/langchain/langgraph_code_assistant_mistral.ipynb
Issue
When running the notebook with the predefined !pip install, the following import fails:
from langchain_core.pydantic_v1 import BaseModel, Field
Fix
Replace from langchain_core.pydantic_v1 import BaseModel, Field with the following
from pydantic.v1 import BaseModel, Field
Test
Notebook on Colab run successfully after fix implementation