Skip to content

Commit

Permalink
assistant: don't send null values for tool resources (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar authored May 21, 2024
1 parent e7ecabd commit 6d01594
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions async-openai/src/types/assistant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ pub struct AssistantToolFileSearchResources {

#[derive(Clone, Serialize, Debug, Deserialize, PartialEq)]
pub struct AssistantToolResources {
#[serde(skip_serializing_if = "Option::is_none")]
pub code_interpreter: Option<AssistantToolCodeInterpreterResources>,
#[serde(skip_serializing_if = "Option::is_none")]
pub file_search: Option<AssistantToolFileSearchResources>,
}

#[derive(Clone, Serialize, Debug, Deserialize, PartialEq)]
pub struct CreateAssistantToolResources {
#[serde(skip_serializing_if = "Option::is_none")]
pub code_interpreter: Option<AssistantToolCodeInterpreterResources>,
#[serde(skip_serializing_if = "Option::is_none")]
pub file_search: Option<CreateAssistantToolFileSearchResources>,
}

Expand Down

0 comments on commit 6d01594

Please sign in to comment.