Skip to content

Commit abd2521

Browse files
committed
Reduce ChatGPTModel
1 parent 969b2d5 commit abd2521

1 file changed

Lines changed: 1 addition & 25 deletions

File tree

Core/Sources/Preferences/ChatGPTModel.swift

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ public enum ChatGPTModel: String {
44
case gpt35Turbo = "gpt-3.5-turbo"
55

66
case gpt35Turbo0301 = "gpt-3.5-turbo-0301"
7-
8-
case textDavinci003 = "text-davinci-003"
9-
10-
case textCurie001 = "text-curie-001"
11-
12-
case textBabbage001 = "text-babbage-001"
13-
14-
case textAda001 = "text-ada-001"
157
}
168

179
public extension ChatGPTModel {
@@ -21,30 +13,14 @@ public extension ChatGPTModel {
2113
return "https://api.openai.com/v1/chat/completions"
2214
case .gpt35Turbo0301:
2315
return "https://api.openai.com/v1/chat/completions"
24-
case .textDavinci003:
25-
return "https://api.openai.com/v1/completions"
26-
case .textCurie001:
27-
return "https://api.openai.com/v1/completions"
28-
case .textBabbage001:
29-
return "https://api.openai.com/v1/completions"
30-
case .textAda001:
31-
return "https://api.openai.com/v1/completions"
3216
}
3317
}
3418

3519
var maxToken: Int {
3620
switch self {
3721
case .gpt35Turbo:
38-
return 4096
39-
case .gpt35Turbo0301:
40-
return 4096
41-
case .textDavinci003:
42-
return 4097
43-
case .textCurie001:
44-
return 2049
45-
case .textBabbage001:
4622
return 2049
47-
case .textAda001:
23+
case .gpt35Turbo0301:
4824
return 2049
4925
}
5026
}

0 commit comments

Comments
 (0)