Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev committed Nov 17, 2023
1 parent 6d6ffc6 commit f9600fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
7 changes: 6 additions & 1 deletion langserve/pydantic_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@

try:
# F401: imported but unused
from pydantic.v1 import BaseModel, Field, ValidationError, create_model # noqa: F401
from pydantic.v1 import ( # noqa: F401
BaseModel,
Field,
ValidationError,
create_model,
)
except ImportError:
from pydantic import BaseModel, Field, ValidationError, create_model # noqa: F401

Expand Down
11 changes: 8 additions & 3 deletions langserve/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@
from langsmith.utils import tracing_is_enabled
from typing_extensions import Annotated

from langserve.pydantic_v1 import BaseModel, Field, ValidationError, create_model

from langserve.callbacks import AsyncEventAggregatorCallback, CallbackEventDict
from langserve.lzstring import LZString
from langserve.playground import serve_playground
from langserve.pydantic_v1 import _PYDANTIC_MAJOR_VERSION, PYDANTIC_VERSION
from langserve.pydantic_v1 import (
_PYDANTIC_MAJOR_VERSION,
PYDANTIC_VERSION,
BaseModel,
Field,
ValidationError,
create_model,
)
from langserve.schema import (
BatchResponseMetadata,
CustomUserType,
Expand Down

0 comments on commit f9600fe

Please sign in to comment.