Skip to content

Commit

Permalink
feat: add context lengths for Jan 25 openai models
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudotexe committed Jan 26, 2024
1 parent 8e8dd46 commit 8ddab0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kani/engines/openai/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@

# https://platform.openai.com/docs/models
CONTEXT_SIZES_BY_PREFIX = [
# TODO is gpt-3.5-turbo-0125 16k?
("gpt-3.5-turbo-1106", 16384),
("gpt-3.5-turbo-16k", 16384),
("gpt-3.5-turbo", 4096),
# gpt-4-turbo models aren't prefixed differently...
# TODO maybe make the default gpt-4 128k and keep the pre-turbo ones at 8k?
("gpt-4-1106", 128000),
("gpt-4-0125", 128000),
("gpt-4-vision", 128000),
("gpt-4-turbo", 128000),
("gpt-4-32k", 32768),
("gpt-4", 8192),
# fine-tunes
Expand Down

0 comments on commit 8ddab0c

Please sign in to comment.