summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-04-10 09:27:39 +0800
committerGitHub <noreply@github.com>2024-04-10 09:27:39 +0800
commitce1f9929f23b1983a679033ddfe93811d6519b64 (patch)
tree26901151b03e164a3908ebf8e882621e4fd07dad /src/client
parent07605d892a4bcfb75f3c8daf873e180f424c335b (diff)
downloadaichat-ce1f9929f23b1983a679033ddfe93811d6519b64.tar.gz
refactor: update openai models list (#396)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/openai.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs
index 83dd65d..f7378dd 100644
--- a/src/client/openai.rs
+++ b/src/client/openai.rs
@@ -12,14 +12,12 @@ use serde_json::{json, Value};
const API_BASE: &str = "https://api.openai.com/v1";
-const MODELS: [(&str, usize, &str); 5] = [
- // https://platform.openai.com/docs/models/gpt-3-5-turbo
+const MODELS: [(&str, usize, &str); 4] = [
+ // https://platform.openai.com/docs/models
("gpt-3.5-turbo", 16385, "text"),
- ("gpt-3.5-turbo-1106", 16385, "text"),
- // https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo
- ("gpt-4-turbo-preview", 128000, "text"),
- ("gpt-4-1106-preview", 128000, "text"),
- ("gpt-4-vision-preview", 128000, "text,vision"),
+ ("gpt-4-turbo", 128000, "text,vision"),
+ ("gpt-4", 8192, "text"),
+ ("gpt-4-32k", 32768, "text"),
];
pub const OPENAI_TOKENS_COUNT_FACTORS: TokensCountFactors = (5, 2);