From bd7a87e335630d5d2f3e6cef30d15633048937b3 Mon Sep 17 00:00:00 2001 From: Chris Raethke <375125+codesoda@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:51:10 +1000 Subject: [PATCH] Rename max output tokens as per api docs (#289) Co-authored-by: Chris Raethke --- async-openai/src/types/realtime/session_resource.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/async-openai/src/types/realtime/session_resource.rs b/async-openai/src/types/realtime/session_resource.rs index d49e7a79..dc0d1e70 100644 --- a/async-openai/src/types/realtime/session_resource.rs +++ b/async-openai/src/types/realtime/session_resource.rs @@ -35,7 +35,7 @@ pub enum TurnDetection { #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(untagged)] -pub enum MaxOutputTokens { +pub enum MaxResponseOutputTokens { Num(u16), #[serde(rename = "inf")] Inf, @@ -132,5 +132,5 @@ pub struct SessionResource { /// Provide an integer between 1 and 4096 to limit output tokens, or "inf" for the maximum available tokens for a given model. /// Defaults to "inf". #[serde(skip_serializing_if = "Option::is_none")] - pub max_output_tokens: Option, + pub max_response_output_tokens: Option, }