Skip to content

Allow alternative serialization to str when objects are returned #207

Closed
@strawgate

Description

@strawgate

Right now there's a content formatter that gets called when tools return. Anything other than a string basically.

The content formatter just dumps it to JSON

It would be nice if this was customizable. At the moment I have to wrap all my tool return calls in a formatter call to return something other than compressed json

For example, I'd like to return yaml from tool calls as that tends to be readable for humans and for machines or alternatively maybe I'd like to return prettified json

Perhaps a configurable formatting callable that defaults to dumping json?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions