-
-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Originally the Platform component only focused on wrapping around HTTP calls, and therefore it was quite logical for me to make an interface like Platform->request($model, $input, $options): Response, but with integrations like TransformersPHP or Bedrock it became obvious that a) close coupling to HttpClient's ResponseInterface was not ideal and b) also the HTTP-based terminology is not always correct. After introducing the decoupled ResponsePromise it is now easier to refactor to a more HTTP-independent approach, and I want to use that timing, to propose a new contract for the Platform:
Platform->execute($model, $input, $options): ResultPromiseI feel execute is more natural with $model and $input - and the model execution returns a result. still pretty vague, but sounds more intuitive to me than requesting and model.
What do you think?