Hard code max token counts for supported models (#9675)
This commit is contained in:
parent
441677c90a
commit
6d5787cfdc
3 changed files with 19 additions and 7 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue