Skip to content

Feature request: Allow a type for cog.Input to be any cog.BaseModel #470

Description

@dashstander

Lots of models have relatively complicated json/yaml configs as input. Right now we either hardcode the options (reasonable a lot of the time), make a separate input parameter for each member of the config (tedious, error prone, probably not fun for the user), or ask the user to input a json as string and deserialize it ourselves on the backend (Lovecraftian horror, probably a security risk, I absolutely refuse).

What I would like is to be able to just make a model/dataclass sort of class as an input, that has access to all the parameters as members.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions