Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
Javtor committed Dec 20, 2024
1 parent 7d81f9d commit c7d2166
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llama-index-core/llama_index/core/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,8 @@ def custom_model_dump(
) -> Dict[str, Any]:
"""For full backward compatibility with the text field, we customize the model serializer."""
data = super().custom_model_dump(handler, info)
if "text" not in info.exclude:
exclude_set = set(info.exclude or [])
if "text" not in exclude_set:
data["text"] = self.text
return data

Expand Down

0 comments on commit c7d2166

Please sign in to comment.