mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +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": [
|
"source": [
|
||||||
"from typing import Optional, List\n",
|
"from typing import Optional\n",
|
||||||
"from pydantic import BaseModel, Field\n",
|
"from langchain.pydantic_v1 import BaseModel\n",
|
||||||
"from langchain.chains import create_extraction_chain_pydantic\n",
|
"from langchain.chains import create_extraction_chain_pydantic\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Pydantic data class\n",
|
"# Pydantic data class\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user