mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-08 06:00:41 +00:00
Make example work during pydantic transition (#11498)
**Description:** Make the example extraction code on https://python.langchain.com/docs/use_cases/extraction work again by importing the langchain.pydantic_v1 lib instead of the v2. **Issue:** Solves issue https://github.com/langchain-ai/langchain/issues/11468 Co-authored-by: Martin van Hensbergen <martin@mvhensbergen.com> Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
a477ddda45
commit
629d9b78fa
@ -379,8 +379,8 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from typing import Optional, List\n",
|
||||
"from pydantic import BaseModel, Field\n",
|
||||
"from typing import Optional\n",
|
||||
"from langchain.pydantic_v1 import BaseModel\n",
|
||||
"from langchain.chains import create_extraction_chain_pydantic\n",
|
||||
"\n",
|
||||
"# Pydantic data class\n",
|
||||
|
Loading…
Reference in New Issue
Block a user