openai_struct/models/create_fine_tuning_job_request.rs
1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct CreateFineTuningJobRequest {
16 #[serde(rename = "hyperparameters")]
17 pub hyperparameters: Option<crate::models::CreateFineTuningJobRequestHyperparameters>,
18 /// A list of integrations to enable for your fine-tuning job.
19 #[serde(rename = "integrations")]
20 pub integrations: Option<Vec<crate::models::CreateFineTuningJobRequestIntegrations>>,
21 #[serde(rename = "metadata")]
22 pub metadata: Option<crate::models::Metadata>,
23 #[serde(rename = "method")]
24 pub method: Option<crate::models::FineTuneMethod>,
25 /// The name of the model to fine-tune. You can select one of the [supported models](/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
26 #[serde(rename = "model")]
27 pub model: Value,
28 /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you.
29 #[serde(rename = "seed")]
30 pub seed: Option<i32>,
31 /// A string of up to 64 characters that will be added to your fine-tuned model name. For example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
32 #[serde(rename = "suffix")]
33 pub suffix: Option<String>,
34 /// The ID of an uploaded file that contains training data. See [upload file](/docs/api-reference/files/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.
35 #[serde(rename = "training_file")]
36 pub training_file: String,
37 /// The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should not be present in both train and validation files. Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.
38 #[serde(rename = "validation_file")]
39 pub validation_file: Option<String>,
40}