Skip to content

Commit

Permalink
Add gpt-3.5-turbo-0125 (#60)
Browse files Browse the repository at this point in the history
* add `gpt-3.5-turbo-0125`

* fix formatting issues
  • Loading branch information
mikaelsouza authored Mar 20, 2024
1 parent d9dcfd8 commit a88091f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tiktoken-rs/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ pub fn get_context_size(model: &str) -> usize {
if starts_with_any!(model, "gpt-4") {
return 8192;
}
if starts_with_any!(model, "gpt-3.5-turbo-0125") {
return 16_385;
}
if starts_with_any!(model, "gpt-3.5-turbo-1106") {
return 16_385;
}
Expand Down
4 changes: 4 additions & 0 deletions tiktoken-rs/src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ mod tests {
get_tokenizer("gpt-4-1106-preview"),
Some(Tokenizer::Cl100kBase)
);
assert_eq!(
get_tokenizer("gpt-3.5-turbo-0125"),
Some(Tokenizer::Cl100kBase),
);
assert_eq!(
get_tokenizer("gpt-3.5-turbo-1106"),
Some(Tokenizer::Cl100kBase),
Expand Down

0 comments on commit a88091f

Please sign in to comment.