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

Missing fields #63

Merged
merged 1 commit into from
Apr 24, 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
3 changes: 3 additions & 0 deletions examples/assistants/runs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ pub async fn create_run(client: &Client, thread_id: &str, assistant_id: &str) ->
assistant_id: assistant_id.to_string(),
model: None,
instructions: None,
additional_instructions: None,
tools: None,
metadata: None,
temperature: None,
};

let run = client
Expand Down
1 change: 1 addition & 0 deletions examples/fine_tuning/create_fine_tuning_job/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ async fn main() {
hyperparameters: None,
suffix: None,
validation_file: None,
seed: None,
};

let result = client.fine_tuning().create(parameters).await.unwrap();
Expand Down
13 changes: 13 additions & 0 deletions src/v1/resources/assistant/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,22 @@ pub struct CreateRunParameters {
/// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.
#[serde(skip_serializing_if = "Option::is_none")]
pub instructions: Option<String>,
/// Appends additional instructions at the end of the instructions for the run.
/// This is useful for modifying the behavior on a per-run basis without overriding other instructions.
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_instructions: Option<String>,
/// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.
#[serde(skip_serializing_if = "Option::is_none")]
pub tools: Option<Vec<AssistantTools>>,
/// Set of 16 key-value pairs that can be attached to an object.
/// This can be useful for storing additional information about the object in a structured format.
/// Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<HashMap<String, String>>,
/// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
/// while lower values like 0.2 will make it more focused and deterministic.
#[serde(skip_serializing_if = "Option::is_none")]
pub temperature: Option<f32>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
Expand Down
5 changes: 5 additions & 0 deletions src/v1/resources/fine_tuning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ pub struct CreateFineTuningJobParameters {
/// The ID of an uploaded file that contains validation data.
#[serde(skip_serializing_if = "Option::is_none")]
pub validation_file: Option<String>,
/// 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub seed: Option<u32>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
Expand Down
Loading