Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GPT-4o #57

Merged
merged 6 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let package = Package(
.library(name: "SpeziLLMFog", targets: ["SpeziLLMFog"])
],
dependencies: [
.package(url: "https://github.com/StanfordBDHG/OpenAI", .upToNextMinor(from: "0.2.8")),
.package(url: "https://github.com/StanfordBDHG/OpenAI", .upToNextMinor(from: "0.2.9")),
.package(url: "https://github.com/StanfordBDHG/llama.cpp", .upToNextMinor(from: "0.3.3")),
.package(url: "https://github.com/StanfordSpezi/Spezi", from: "1.2.1"),
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "1.0.4"),
Expand Down
2 changes: 1 addition & 1 deletion Sources/SpeziLLMOpenAI/FunctionCalling/LLMFunction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
/// struct LLMOpenAIChatTestView: View {
/// private let schema = LLMOpenAISchema(
/// parameters: .init(
/// modelType: .gpt4_1106_preview,
/// modelType: .gpt4_turbo,
/// systemPrompt: "You're a helpful assistant that answers questions from users."
/// )
/// ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import SwiftUI
/// View to display an onboarding step for the user to enter change the OpenAI model.
public struct LLMOpenAIModelOnboardingStep: View {
public enum Default {
public static let models: [LLMOpenAIModelType] = [.gpt3_5Turbo, .gpt4_turbo_preview]
public static let models: [LLMOpenAIModelType] = [.gpt3_5Turbo, .gpt4_turbo, .gpt4_o]
}


Expand Down
2 changes: 1 addition & 1 deletion Tests/SpeziLLMTests/LLMOpenAIParameterTests+Array.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final class LLMOpenAIParameterArrayTests: XCTestCase {
}

let llm = LLMOpenAISchema(
parameters: .init(modelType: .gpt4_turbo_preview)
parameters: .init(modelType: .gpt4_turbo)
) {
LLMFunctionTest(someInitArg: "testArg")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ final class LLMOpenAIParameterCustomTypesTests: XCTestCase {
}

let llm = LLMOpenAISchema(
parameters: .init(modelType: .gpt4_turbo_preview)
parameters: .init(modelType: .gpt4_turbo)
) {
LLMFunctionTest(someInitArg: "testArg")
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/SpeziLLMTests/LLMOpenAIParameterTests+Enum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ final class LLMOpenAIParameterEnumTests: XCTestCase {
}

let llm = LLMOpenAISchema(
parameters: .init(modelType: .gpt4_turbo_preview)
parameters: .init(modelType: .gpt4_turbo)
) {
LLMFunctionTest(someInitArg: "testArg")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class LLMOpenAIInvalidParametersTests: XCTestCase {
}

let llm = LLMOpenAISchema(
parameters: .init(modelType: .gpt4_turbo_preview)
parameters: .init(modelType: .gpt4_turbo)
) {
LLMFunctionTest(someInitArg: "testArg")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ final class LLMOpenAIParameterOptionalTypesTests: XCTestCase {
}

let llm = LLMOpenAISchema(
parameters: .init(modelType: .gpt4_turbo_preview)
parameters: .init(modelType: .gpt4_turbo)
) {
LLMFunctionTest(someInitArg: "testArg")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final class LLMOpenAIParameterPrimitiveTypesTests: XCTestCase {
}

let llm = LLMOpenAISchema(
parameters: .init(modelType: .gpt4_turbo_preview)
parameters: .init(modelType: .gpt4_turbo)
) {
LLMFunctionTest(someInitArg: "testArg")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import SwiftUI
struct LLMOpenAIChatTestView: View {
static let schema = LLMOpenAISchema(
parameters: .init(
modelType: .gpt4_turbo_preview,
modelType: .gpt4_turbo,
systemPrompt: "You're a helpful assistant that answers questions from users."
)
) {
Expand Down
Loading