From 7e29f642a99682ea7bb074eb4e7aa7d34d523515 Mon Sep 17 00:00:00 2001 From: sigoden Date: Sat, 19 Oct 2024 18:25:40 +0800 Subject: feat: support openai o1 models (#935) --- src/client/model.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/client/model.rs') diff --git a/src/client/model.rs b/src/client/model.rs index 08ced10..f8a23ff 100644 --- a/src/client/model.rs +++ b/src/client/model.rs @@ -183,6 +183,14 @@ impl Model { self.data.supports_vision } + pub fn no_stream(&self) -> bool { + self.data.no_stream + } + + pub fn no_system_message(&self) -> bool { + self.data.no_system_message + } + pub fn max_tokens_per_chunk(&self) -> Option { self.data.max_tokens_per_chunk } @@ -268,6 +276,10 @@ pub struct ModelData { pub supports_vision: bool, #[serde(default)] pub supports_function_calling: bool, + #[serde(default)] + no_stream: bool, + #[serde(default)] + no_system_message: bool, // embedding-only properties pub max_tokens_per_chunk: Option, -- cgit v1.2.3