Skip to content

Commit

Permalink
fields
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev committed Sep 9, 2024
1 parent ebb71f1 commit 4e44c68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langserve/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def loads(self, s: bytes) -> Any:

def _project_top_level(model: BaseModel) -> Dict[str, Any]:
"""Project the top level of the model as dict."""
return {key: getattr(model, key) for key in model.__fields__}
return {key: getattr(model, key) for key in model.model_fields}


def load_events(events: Any) -> List[Dict[str, Any]]:
Expand Down

0 comments on commit 4e44c68

Please sign in to comment.