Hard code max token counts for supported models (#9675)

This commit is contained in:
Nathan Sobo
2024-03-21 20:30:33 -06:00
committed by GitHub
parent 441677c90a
commit 6d5787cfdc
3 changed files with 19 additions and 7 deletions
+8
View File
@@ -72,6 +72,14 @@ impl Model {
Self::FourTurbo => "gpt-4-turbo",
}
}
pub fn max_token_count(&self) -> usize {
match self {
Model::ThreePointFiveTurbo => 4096,
Model::Four => 8192,
Model::FourTurbo => 128000,
}
}
}
#[derive(Debug, Serialize)]