Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix type definitions for predictions.create methods
  • Loading branch information
mattt authored and aron committed Oct 1, 2024
commit 9fb521302e1d0401f51b8d20836f6ebd3ae5828a
10 changes: 5 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ declare module "replicate" {
signal?: AbortSignal;
},
progress?: (prediction: Prediction) => void
): Promise<object>;
): Promise<Prediction | any>;

stream(
identifier: `${string}/${string}` | `${string}/${string}:${string}`,
Expand Down Expand Up @@ -215,9 +215,9 @@ declare module "replicate" {
stream?: boolean;
webhook?: string;
webhook_events_filter?: WebhookEventType[];
block?: boolean;
wait?: boolean | number | { mode?: "poll"; interval?: number };
}
): Promise<Prediction>;
): Promise<Prediction | any>;
};
get(
deployment_owner: string,
Expand Down Expand Up @@ -304,9 +304,9 @@ declare module "replicate" {
stream?: boolean;
webhook?: string;
webhook_events_filter?: WebhookEventType[];
block?: boolean;
wait?: boolean | number | { mode?: "poll"; interval?: number };
} & ({ version: string } | { model: string })
): Promise<Prediction>;
): Promise<Prediction | any>;
get(prediction_id: string): Promise<Prediction>;
cancel(prediction_id: string): Promise<Prediction>;
list(): Promise<Page<Prediction>>;
Expand Down