Skip to content
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
111 changes: 111 additions & 0 deletions src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsUpdate.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#nullable enable

namespace Replicate
{
public partial interface IReplicateApi
{
/// <summary>
/// Update metadata for a model<br/>
/// Update select properties of an existing model.<br/>
/// You can update the following properties:<br/>
/// - `description` - Model description<br/>
/// - `readme` - Model README content<br/>
/// - `github_url` - GitHub repository URL<br/>
/// - `paper_url` - Research paper URL<br/>
/// - `weights_url` - Model weights URL<br/>
/// - `license_url` - License URL<br/>
/// Example cURL request:<br/>
/// ```console<br/>
/// curl -X PATCH \<br/>
/// https://api.replicate.com/v1/models/your-username/your-model-name \<br/>
/// -H "Authorization: Token $REPLICATE_API_TOKEN" \<br/>
/// -H "Content-Type: application/json" \<br/>
/// -d '{<br/>
/// "description": "Detect hot dogs in images",<br/>
/// "readme": "# Hot Dog Detector\n\n🌭 Ketchup, mustard, and onions...",<br/>
/// "github_url": "https://github.com/alice/hot-dog-detector",<br/>
/// "paper_url": "https://arxiv.org/abs/2504.17639",<br/>
/// "weights_url": "https://huggingface.co/alice/hot-dog-detector",<br/>
/// "license_url": "https://choosealicense.com/licenses/mit/"<br/>
/// }'<br/>
/// ```<br/>
/// The response will be the updated model object with all of its properties.
/// </summary>
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.SchemasModelResponse> ModelsUpdateAsync(
string modelOwner,
string modelName,
global::Replicate.ModelsUpdateRequest request,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Update metadata for a model<br/>
/// Update select properties of an existing model.<br/>
/// You can update the following properties:<br/>
/// - `description` - Model description<br/>
/// - `readme` - Model README content<br/>
/// - `github_url` - GitHub repository URL<br/>
/// - `paper_url` - Research paper URL<br/>
/// - `weights_url` - Model weights URL<br/>
/// - `license_url` - License URL<br/>
/// Example cURL request:<br/>
/// ```console<br/>
/// curl -X PATCH \<br/>
/// https://api.replicate.com/v1/models/your-username/your-model-name \<br/>
/// -H "Authorization: Token $REPLICATE_API_TOKEN" \<br/>
/// -H "Content-Type: application/json" \<br/>
/// -d '{<br/>
/// "description": "Detect hot dogs in images",<br/>
/// "readme": "# Hot Dog Detector\n\n🌭 Ketchup, mustard, and onions...",<br/>
/// "github_url": "https://github.com/alice/hot-dog-detector",<br/>
/// "paper_url": "https://arxiv.org/abs/2504.17639",<br/>
/// "weights_url": "https://huggingface.co/alice/hot-dog-detector",<br/>
/// "license_url": "https://choosealicense.com/licenses/mit/"<br/>
/// }'<br/>
/// ```<br/>
/// The response will be the updated model object with all of its properties.
/// </summary>
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="description">
/// A description of the model.<br/>
/// Example: Detect hot dogs in images
/// </param>
/// <param name="githubUrl">
/// A URL for the model's source code on GitHub.<br/>
/// Example: https://github.com/alice/hot-dog-detector
/// </param>
/// <param name="licenseUrl">
/// A URL for the model's license.
/// </param>
/// <param name="paperUrl">
/// A URL for the model's paper.<br/>
/// Example: https://arxiv.org/abs/2504.17639
/// </param>
/// <param name="readme">
/// The README content of the model.<br/>
/// Example: # Updated README<br/>
/// New content here
/// </param>
/// <param name="weightsUrl">
/// A URL for the model's weights.<br/>
/// Example: https://huggingface.co/alice/hot-dog-detector
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.SchemasModelResponse> ModelsUpdateAsync(
string modelOwner,
string modelName,
string? description = default,
string? githubUrl = default,
string? licenseUrl = default,
string? paperUrl = default,
string? readme = default,
string? weightsUrl = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public partial interface IReplicateApi
/// - `canceled`: the prediction was canceled by its creator.<br/>
/// In the case of success, `output` will be an object containing the output of the model. Any files will be represented as HTTPS URLs. You'll need to pass the `Authorization` header to request them.<br/>
/// In the case of failure, `error` will contain the error encountered during the prediction.<br/>
/// Terminated predictions (with a status of `succeeded`, `failed`, or `canceled`) will include a `metrics` object with a `predict_time` property showing the amount of CPU or GPU time, in seconds, that the prediction used while running. It won't include time waiting for the prediction to start.<br/>
/// Terminated predictions (with a status of `succeeded`, `failed`, or `canceled`) will include a `metrics` object with a `predict_time` property showing the amount of CPU or GPU time, in seconds, that the prediction used while running. It won't include time waiting for the prediction to start. The `metrics` object will also include a `total_time` property showing the total time, in seconds, that the prediction took to complete.<br/>
/// All input parameters, output values, and logs are automatically removed after an hour, by default, for predictions created through the API.<br/>
/// You must save a copy of any data or files in the output if you'd like to continue using them. The `output` key will still be present, but it's value will be `null` after the output has been removed.<br/>
/// Output files are served by `replicate.delivery` and its subdomains. If you use an allow list of external domains for your assets, add `replicate.delivery` and `*.replicate.delivery` to it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public partial interface IReplicateApi
/// - `canceled`: the training was canceled by its creator.<br/>
/// In the case of success, `output` will be an object containing the output of the model. Any files will be represented as HTTPS URLs. You'll need to pass the `Authorization` header to request them.<br/>
/// In the case of failure, `error` will contain the error encountered during the training.<br/>
/// Terminated trainings (with a status of `succeeded`, `failed`, or `canceled`) will include a `metrics` object with a `predict_time` property showing the amount of CPU or GPU time, in seconds, that the training used while running. It won't include time waiting for the training to start.
/// Terminated trainings (with a status of `succeeded`, `failed`, or `canceled`) will include a `metrics` object with a `predict_time` property showing the amount of CPU or GPU time, in seconds, that the training used while running. It won't include time waiting for the training to start. The `metrics` object will also include a `total_time` property showing the total time, in seconds, that the training took to complete.
/// </summary>
/// <param name="trainingId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
Expand Down
Loading