Skip to content
Merged
Show file tree
Hide file tree
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
Deprecate stream parameter for predictions.create
  • Loading branch information
mattt committed Jul 19, 2024
commit 896c13a5f3e921d658e8bac6e457077a0b02dc49
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ declare module "replicate" {
model?: string;
version?: string;
input: object;
/** @deprecated */
stream?: boolean;
webhook?: string;
webhook_events_filter?: WebhookEventType[];
Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,11 @@ class Replicate {
prediction = await this.predictions.create({
...data,
version: identifier.version,
stream: true,
});
} else if (identifier.owner && identifier.name) {
prediction = await this.predictions.create({
...data,
model: `${identifier.owner}/${identifier.name}`,
stream: true,
});
} else {
throw new Error("Invalid model version identifier");
Expand Down
Loading