Skip to content

Commit a72d111

Browse files
authored
Update models (#42)
1 parent 96ce84e commit a72d111

File tree

3 files changed

+86
-3
lines changed

3 files changed

+86
-3
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1530"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
9+
<BuildActionEntries>
10+
<BuildActionEntry
11+
buildForTesting = "YES"
12+
buildForRunning = "YES"
13+
buildForProfiling = "YES"
14+
buildForArchiving = "YES"
15+
buildForAnalyzing = "YES">
16+
<BuildableReference
17+
BuildableIdentifier = "primary"
18+
BlueprintIdentifier = "F442DCF22B80A2B20032682E"
19+
BuildableName = "Demo.app"
20+
BlueprintName = "Demo"
21+
ReferencedContainer = "container:Demo.xcodeproj">
22+
</BuildableReference>
23+
</BuildActionEntry>
24+
</BuildActionEntries>
25+
</BuildAction>
26+
<TestAction
27+
buildConfiguration = "Debug"
28+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
29+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30+
shouldUseLaunchSchemeArgsEnv = "YES"
31+
shouldAutocreateTestPlan = "YES">
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "F442DCF22B80A2B20032682E"
48+
BuildableName = "Demo.app"
49+
BlueprintName = "Demo"
50+
ReferencedContainer = "container:Demo.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "F442DCF22B80A2B20032682E"
65+
BuildableName = "Demo.app"
66+
BlueprintName = "Demo"
67+
ReferencedContainer = "container:Demo.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

Demo/Demo/ChatCompletions/ChatCompletionsViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class ChatCompletionsViewModel {
2020

2121
let optionalParameters = ChatCompletionsOptionalParameters(temperature: 0.5,
2222
stream: isStream,
23-
maxTokens: 100)
23+
maxTokens: 2000)
2424
if isStream {
2525
do {
2626
for try await newMessage in try await openAI.createChatCompletionsStream(model: .gpt4(.base),

Sources/SwiftOpenAI/OpenAI/DataModels/OpenAIModelType.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ public enum OpenAIImageModelType {
2929
}
3030

3131
public enum GPT4: String {
32-
case base = "gpt-4"
32+
case base = "gpt-4-turbo"
33+
case gpt_4_turbo_2024_04_09 = "gpt-4-turbo-2024-04-09"
34+
case gpt_4 = "gpt-4"
35+
case gpt_4_turbo_preview = "gpt-4-turbo-preview"
36+
case gpt_4_0125_preview = "gpt-4-0125-preview"
3337
case gpt_4_1106_preview = "gpt-4-1106-preview"
38+
case gpt_4_1106_vision_preview = "gpt-4-1106-vision-preview"
3439
case gpt_4_vision_preview = "gpt-4-vision-preview"
3540
case gpt_4_32k = "gpt-4-32k"
3641
case gpt_4_0613 = "gpt-4-0613"
@@ -39,8 +44,8 @@ public enum GPT4: String {
3944

4045
public enum GPT3_5: String {
4146
case turbo = "gpt-3.5-turbo"
47+
case gpt_3_5_turbo_0125 = "gpt-3.5-turbo-0125"
4248
case gpt_3_5_turbo_1106 = "gpt-3.5-turbo-1106"
43-
case gpt_3_5_turbo_16k = "gpt-3.5-turbo-16k"
4449
case gpt_3_5_turbo_instruct = "gpt-3.5-turbo-instruct"
4550
}
4651

0 commit comments

Comments
 (0)