### Description

Fix: #14159

Use `from pydantic.v1 import BaseModel, Field` instead of `from pydantic
import BaseModel, Field`

### [lin_bob57617](https://twitter.com/lin_bob57617)
pull/14252/head
Bob Lin 10 months ago committed by GitHub
parent 641e401ba8
commit 702a6d7044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,7 +58,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 1,
"id": "bafb496a", "id": "bafb496a",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -77,7 +77,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 2,
"id": "39f3ce3e", "id": "39f3ce3e",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -98,7 +98,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 4,
"id": "5509b6a6", "id": "5509b6a6",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -108,7 +108,7 @@
"{'sentiment': 'positive', 'language': 'Spanish'}" "{'sentiment': 'positive', 'language': 'Spanish'}"
] ]
}, },
"execution_count": 5, "execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -120,7 +120,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 5,
"id": "9154474c", "id": "9154474c",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -130,7 +130,7 @@
"{'sentiment': 'enojado', 'aggressiveness': 1, 'language': 'es'}" "{'sentiment': 'enojado', 'aggressiveness': 1, 'language': 'es'}"
] ]
}, },
"execution_count": 6, "execution_count": 5,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -178,7 +178,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 6,
"id": "6a5f7961", "id": "6a5f7961",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -201,7 +201,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 7,
"id": "e5a5881f", "id": "e5a5881f",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -318,17 +318,17 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": 5,
"id": "bf1f367e", "id": "bf1f367e",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"from pydantic import BaseModel, Field" "from langchain.pydantic_v1 import BaseModel, Field"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": 7,
"id": "83a2e826", "id": "83a2e826",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -347,7 +347,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": 8,
"id": "6e404892", "id": "6e404892",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -357,7 +357,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": 9,
"id": "b5fc43c4", "id": "b5fc43c4",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -368,7 +368,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 17, "execution_count": 10,
"id": "5074bcc3", "id": "5074bcc3",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -378,7 +378,7 @@
"Tags(sentiment='sad', aggressiveness=5, language='spanish')" "Tags(sentiment='sad', aggressiveness=5, language='spanish')"
] ]
}, },
"execution_count": 17, "execution_count": 10,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -415,7 +415,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.1" "version": "3.11.5"
} }
}, },
"nbformat": 4, "nbformat": 4,

Loading…
Cancel
Save