Skip to content

GenAI upload completion hook needs to more robust JSON encoder #3803

@aabmass

Description

@aabmass

In particular for tool call responses which can have arbitrary types inside of them, the uploader's JSON encoder needs to be more robust. For example, datetime may be returned from an tool.

  • Handle common datatypes like datetime.
  • Have a fallback with repr() so that the JSON doesn't get dropped on the floor
  • Log when the fallback is hit so we know to add support for more types.

It might make sense to consider pydantic for some of these edge cases (maybe as an optional dep), since many agent frameworks return a Pydantic model already that knows how to encode itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gen-aiRelated to generative AI

    Type

    Projects

    Status

    New issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions