Skip to content

Commit 05d5a1b

Browse files
authored
Fix service_tier serialization for CreateChatCompletionRequest (#263)
1 parent bf78e66 commit 05d5a1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

async-openai/src/types/chat.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ pub struct CreateChatCompletionRequest {
537537
/// - When not set, the default behavior is 'auto'.
538538
///
539539
/// When this parameter is set, the response body will include the `service_tier` utilized.
540+
#[serde(skip_serializing_if = "Option::is_none")]
540541
pub service_tier: Option<ServiceTier>,
541542

542543
/// Up to 4 sequences where the API will stop generating further tokens.

0 commit comments

Comments
 (0)