Skip to content

Commit

Permalink
Update langserve/server.py
Browse files Browse the repository at this point in the history
Co-authored-by: Erick Friis <[email protected]>
  • Loading branch information
eyurtsev and efriis authored Oct 17, 2023
1 parent 1dbe49e commit 9568c7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions langserve/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ def _rename_pydantic_model(model: Type[BaseModel], name: str) -> Type[BaseModel]
name,
__config__=model.__config__,
**{
name: (
fieldname: (
field.annotation,
Field(
field.default,
title=name,
title=fieldname,
description=field.field_info.description,
),
)
for name, field in model.__fields__.items()
for fieldname, field in model.__fields__.items()
},
)

Expand Down

0 comments on commit 9568c7c

Please sign in to comment.