Skip to content

Commit

Permalink
Add new models (#24)
Browse files Browse the repository at this point in the history
* Add 16k models

* Update context lengths
  • Loading branch information
gonzalonunez authored Jun 21, 2023
1 parent 6ae6f25 commit 0a3eeb6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Sources/docc-gpt/OpenAI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ struct Model: ExpressibleByArgument {
init?(argument: String) {
self.id = argument
switch id {
case "gpt-4", "gpt-4-0314":
contextLength = 8192
case "gpt-4-32k", "gpt-4-32k-0314":
case "gpt-4", "gpt-4-0613":
contextLength = 8_192
case "gpt-4-32k", "gpt-4-32k-0613":
contextLength = 32_768
case "gpt-3.5-turbo", "gpt-3.5-turbo-0301":
contextLength = 4096
case "gpt-3.5-turbo", "gpt-3.5-turbo-0613":
contextLength = 4_096
case "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613":
contextLength = 16_384
default:
return nil
}
Expand Down

0 comments on commit 0a3eeb6

Please sign in to comment.