Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion langfuse/_client/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ def create_generation_attributes(


def _serialize(obj: Any) -> Optional[str]:
return json.dumps(obj, cls=EventSerializer) if obj is not None else None
if obj is None or isinstance(obj, str):
return obj

return json.dumps(obj, cls=EventSerializer)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure_ascii here should be False



def _flatten_and_serialize_metadata(
Expand Down
Loading