Module replicate_rust::training
source · Expand description
Used to interact with the Training Endpoints.
Example
use replicate_rust::{Replicate, config::Config};
let config = Config::default();
let replicate = Replicate::new(config);
let mut input = HashMap::new();
input.insert(String::from("train_data"), String::from("https://example.com/70k_samples.jsonl"));
let result = replicate.trainings.create(
String::from("owner"),
String::from("model"),
String::from("632231d0d49d34d5c4633bd838aee3d81d936e59a886fbf28524702003b4c532"),
TrainingOptions {
destination: String::from("{new_owner}/{new_name}"),
input,
webhook: String::from("https://example.com/my-webhook"),
_webhook_events_filter: None,
},
);
Structs
- Data to be sent to the API when creating a training.
- Contains all the options for creating a training.