summaryrefslogtreecommitdiffstats
path: root/src/client/openai.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/openai.rs')
-rw-r--r--src/client/openai.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs
index b554f35..387baf0 100644
--- a/src/client/openai.rs
+++ b/src/client/openai.rs
@@ -38,7 +38,7 @@ impl OpenAIClient {
let client = Self::name(local_config);
MODELS
.into_iter()
- .map(|(name, max_tokens)| ModelInfo::new(client, name, Some(max_tokens), index))
+ .map(|(name, max_tokens)| openai_tokens_formula(ModelInfo::new(index, client, name).set_max_tokens(Some(max_tokens))))
.collect()
}
@@ -135,3 +135,7 @@ pub fn openai_build_body(data: SendData, model: String) -> Value {
}
body
}
+
+pub fn openai_tokens_formula(model: ModelInfo) -> ModelInfo {
+ model.set_tokens_formula(5, 2)
+}