Skip to content

Update default handler in Langfuse Tracer to serialize ToolCallResult properly #1664

@sjrl

Description

@sjrl

In the example shown below we can see that tool_messages isn't a JSON dict but a string due to it not being JSON serializable.

This is most likely due to State not having a to_dict method. A to_dict method should be added to State so the tool_messages can be represented as a dict in Langfuse.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions