Skip to content

Feature Request: make B13\Aim\AiRequestBuilder serializable #31

Description

@foppelfb

Usecase

A developer might want to build a request using the AiRequestBilder class to prepare a request, but not send it immediately.

A use case (my use case) would be to have potentially long running requests deferred to a MessageBus handler, have it handled by the message bus and the result being returned to the System for further usage. Image generation or editing comes to mind.

Right now one would have to create a DTO Class that mimmicks the interface of AiRequestBilder and have the actual building done in the MessageBus Handler

What needs to be done

2 Options:

  1. AiRequestBilder would need to implement the \ Serializable interface and the serialize/unserialize methods. unserialize would need to instantiate the services from the constructor.
  2. Different route: add toArray and fromArray methods, which will dump the settings, which can be simply serialized, and later loaded in a fresh instance with the fromArray method.

If you think this has merrit I would volunter to implement the feature

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions