Skip to content

Commit

Permalink
In case the Object type is object
Browse files Browse the repository at this point in the history
  • Loading branch information
Huarong committed Mar 8, 2024
1 parent e303fd9 commit c3e4623
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions langfuse/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def default(self, obj: Any):
if type(obj).__name__ == "StreamingAgentChatResponse":
return str(obj)

# In case the Object type is `object`
if isinstance(obj, object):
return str(obj)

if is_dataclass(obj):
return asdict(obj)
if isinstance(obj, UUID):
Expand Down

0 comments on commit c3e4623

Please sign in to comment.