Skip to content

[RFC][Platform] Renaming Response to Result #141

@chr-hertel

Description

@chr-hertel

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): ResultPromise

I 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?

Metadata

Metadata

Assignees

Labels

PlatformIssues & PRs about the AI Platform componentRFCRFC = Request For Comments (proposals about features that you want to be discussed)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions