| 1 | import * as ml from "@distilled.cloud/gcp/ml_v1"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeModelHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { Predict } from "./Predict.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link Predict}. |
| 8 | * |
| 9 | * @layer |
| 10 | * @provides GCP.ML.Predict |
| 11 | */ |
| 12 | export const PredictHttp = Layer.effect( |
| 13 | Predict, |
| 14 | makeModelHttpBinding({ |
| 15 | tag: "GCP.ML.Predict", |
| 16 | operation: ml.predictProjects, |
| 17 | iam: { role: "roles/ml.modelUser", on: "ml.model" }, |
| 18 | }), |
| 19 | ); |