From ef0810434cf60eeb33e8f61712c4023efe71876d Mon Sep 17 00:00:00 2001 From: sigoden Date: Sun, 1 Sep 2024 10:05:53 +0800 Subject: refactor: minor improvement (#818) --- src/client/model.rs | 7 +------ src/client/openai.rs | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/client') diff --git a/src/client/model.rs b/src/client/model.rs index bea96a2..50dabeb 100644 --- a/src/client/model.rs +++ b/src/client/model.rs @@ -159,17 +159,13 @@ impl Model { let ModelData { max_input_tokens, input_price, - output_vector_size, max_batch_size, .. } = &self.data; - let dimension = format_option_value(output_vector_size); let max_tokens = format_option_value(max_input_tokens); let price = format_option_value(input_price); let batch = format_option_value(max_batch_size); - format!( - "dimension:{dimension}; max-tokens:{max_tokens}; price:{price}; batch:{batch}" - ) + format!("max-tokens:{max_tokens}; price:{price}; batch:{batch}") } _ => String::new(), } @@ -270,7 +266,6 @@ pub struct ModelData { pub supports_function_calling: bool, // embedding-only properties - pub output_vector_size: Option, pub default_chunk_size: Option, pub max_batch_size: Option, } diff --git a/src/client/openai.rs b/src/client/openai.rs index e47ad4c..902a215 100644 --- a/src/client/openai.rs +++ b/src/client/openai.rs @@ -249,7 +249,7 @@ pub fn openai_build_chat_completions_body(data: ChatCompletionsData, model: &Mod }) ] - }).collect() + }).collect() } }, _ => vec![json!({ "role": role, "content": content })] -- cgit v1.2.3