Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:@coderabbitai #41

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="deploymentOwner"></param>
/// <param name="deploymentName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -47,7 +49,9 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="deploymentOwner"></param>
/// <param name="deploymentName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="input">
/// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.<br/>
/// Files should be passed as HTTP URLs or data URLs.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -47,7 +49,9 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="input">
/// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.<br/>
/// Files should be passed as HTTP URLs or data URLs.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public partial interface IReplicateApi
/// The request will wait up to 60 seconds for the model to run. If this time is exceeded the prediction will be returned in a `"starting"` state and need to be retrieved using the `predictions.get` endpiont.<br/>
/// For a complete overview of the `predictions.create` API check out our documentation on [creating a prediction](https://replicate.com/docs/topics/predictions/create-a-prediction) which covers a variety of use cases.
/// </summary>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -41,7 +43,9 @@ public partial interface IReplicateApi
/// The request will wait up to 60 seconds for the model to run. If this time is exceeded the prediction will be returned in a `"starting"` state and need to be retrieved using the `predictions.get` endpiont.<br/>
/// For a complete overview of the `predictions.create` API check out our documentation on [creating a prediction](https://replicate.com/docs/topics/predictions/create-a-prediction) which covers a variety of use cases.
/// </summary>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="input">
/// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.<br/>
/// Files should be passed as HTTP URLs or data URLs.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ partial void ProcessDeploymentsPredictionsCreateResponse(
/// </summary>
/// <param name="deploymentOwner"></param>
/// <param name="deploymentName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand Down Expand Up @@ -137,7 +139,9 @@ partial void ProcessDeploymentsPredictionsCreateResponse(
/// </summary>
/// <param name="deploymentOwner"></param>
/// <param name="deploymentName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="input">
/// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.<br/>
/// Files should be passed as HTTP URLs or data URLs.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ partial void ProcessModelsPredictionsCreateResponseContent(
/// </summary>
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand Down Expand Up @@ -165,7 +167,9 @@ partial void ProcessModelsPredictionsCreateResponseContent(
/// </summary>
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="input">
/// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.<br/>
/// Files should be passed as HTTP URLs or data URLs.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ partial void ProcessPredictionsCreateResponse(
/// The request will wait up to 60 seconds for the model to run. If this time is exceeded the prediction will be returned in a `"starting"` state and need to be retrieved using the `predictions.get` endpiont.<br/>
/// For a complete overview of the `predictions.create` API check out our documentation on [creating a prediction](https://replicate.com/docs/topics/predictions/create-a-prediction) which covers a variety of use cases.
/// </summary>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand Down Expand Up @@ -123,7 +125,9 @@ partial void ProcessPredictionsCreateResponse(
/// The request will wait up to 60 seconds for the model to run. If this time is exceeded the prediction will be returned in a `"starting"` state and need to be retrieved using the `predictions.get` endpiont.<br/>
/// For a complete overview of the `predictions.create` API check out our documentation on [creating a prediction](https://replicate.com/docs/topics/predictions/create-a-prediction) which covers a variety of use cases.
/// </summary>
/// <param name="prefer"></param>
/// <param name="prefer">
/// Example: wait=5
/// </param>
/// <param name="input">
/// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.<br/>
/// Files should be passed as HTTP URLs or data URLs.<br/>
Expand Down
4 changes: 3 additions & 1 deletion src/libs/Replicate/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1001,9 +1001,11 @@ components:
prefer_header:
name: Prefer
in: header
description: "When you provide the `Prefer: wait` header, the request will block and wait up to 60 seconds for the model to finish generating output. The output will be included in the `output` field of the prediction response, so you don't need to use webhooks or polling to retrieve it.\n\nYou can specify a shorter timeout duration if needed. For example, `Prefer: wait=5` will wait for 5 seconds instead of the default 60 seconds.\n\nIf the model doesn't finish within the specified duration, the request will return the incomplete prediction object with status set to `starting` or `processing`. You can then fetch the prediction again via the URL provided in the `Location` header, or the `urls.get` field in the JSON response. Even if the timeout is exceeded, the prediction will continue processing in the background.\n\nThe `Prefer` header is not enabled by default. If you don't include this header in your request, the response will immediately return the prediction in a `starting` state.\n"
description: "Leave the request open and wait for the model to finish generating output. Set to `wait=n` where n is a number of seconds between 1 and 60.\n\nSee https://replicate.com/docs/topics/predictions/create-a-prediction#sync-mode for more information."
schema:
pattern: '^wait(=([1-9]|[1-9][0-9]|60))?$'
type: string
example: wait=5
securitySchemes:
bearerAuth:
type: http
Expand Down