The best way to control Claude Code, Codex and more from any computer or phone

main
ts 37 lines 1.04 KB
Raw
1 import type * as ml from "@distilled.cloud/gcp/ml_v1";
2 import * as Binding from "alchemy/Binding";
3 import type { RuntimeContext } from "alchemy/RuntimeContext";
4 import type * as Effect from "effect/Effect";
5 import type { Model } from "./Model.ts";
6
7 export interface GetModelRequest extends Omit<ml.GetProjectsModelsRequest, "name"> {}
8
9 /**
10 * Runtime binding for AI Platform (legacy ML Engine) `models.get`.
11 *
12 * Bind this operation to a {@link Model} in a Function/Action init
13 * phase. Provide {@link GetModelHttp}.
14 *
15 * ### Reading a Model
16 * **Example:** Get the bound model
17 * ```typescript
18 * const getModel = yield* GCP.ML.GetModel(model);
19 * const live = yield* getModel();
20 * ```
21 *
22 * @binding
23 * @category ML
24 */
25 export interface GetModel extends Binding.Service<
26 GetModel,
27 "GCP.ML.GetModel",
28 (
29 model: Model,
30 ) => Effect.Effect<
31 (
32 request?: GetModelRequest,
33 ) => Effect.Effect<ml.GoogleCloudMlV1__Model, ml.GetProjectsModelsError, RuntimeContext>
34 >
35 > {}
36
37 export const GetModel = Binding.Service<GetModel>("GCP.ML.GetModel");