diff options
| author | sigoden <sigoden@gmail.com> | 2024-09-01 10:05:53 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-01 10:05:53 +0800 |
| commit | ef0810434cf60eeb33e8f61712c4023efe71876d (patch) | |
| tree | 77450abe9dbe9bebd83172003f4710dc3883bcb4 /src/client | |
| parent | 573e0d58b44cd0686c9e7405723e5cc3a5c5126f (diff) | |
| download | aichat-ef0810434cf60eeb33e8f61712c4023efe71876d.tar.gz | |
refactor: minor improvement (#818)
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/model.rs | 7 | ||||
| -rw-r--r-- | src/client/openai.rs | 2 |
2 files changed, 2 insertions, 7 deletions
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<usize>, pub default_chunk_size: Option<usize>, pub max_batch_size: Option<usize>, } 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 })] |
