Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 Shared/ChatGPTAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ChatGPTAPI: LLMClient, @unchecked Sendable {
}


init(apiKey: String, model: String = "gpt-3.5-turbo", systemPrompt: String = "You are a helpful assistant", temperature: Double = 0.5) {
init(apiKey: String = /*@START_MENU_TOKEN@*/"PROVIDE-API-KEY"/*@END_MENU_TOKEN@*/, model: String = "gpt-3.5-turbo", systemPrompt: String = "You are a helpful assistant", temperature: Double = 0.5) {
self.apiKey = apiKey
self.model = model
self.systemMessage = .init(role: "system", content: systemPrompt)
Expand Down
2 changes: 1 addition & 1 deletion Shared/CodeBlockView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct CodeBlockView_Previews: PreviewProvider {

static var markdownString = """
```swift
let api = ChatGPTAPI(apiKey: "API_KEY")
let api = ChatGPTAPI(apiKey: "PROVIDE-API-KEY")

Task {
do {
Expand Down
2 changes: 1 addition & 1 deletion Shared/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct ContentView: View {
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
NavigationStack {
ContentView(vm: ViewModel(api: ChatGPTAPI(apiKey: "PROVIDE_API_KEY")))
ContentView(vm: ViewModel(api: ChatGPTAPI(apiKey: /*@START_MENU_TOKEN@*/"PROVIDE-API-KEY"/*@END_MENU_TOKEN@*/)))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion XCAChatGPT/XCAChatGPTApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
@main
struct XCAChatGPTApp: App {

@StateObject var vm = ViewModel(api: ChatGPTAPI(apiKey: "PROVIDE_API_KEY"))
@StateObject var vm = ViewModel(api: ChatGPTAPI())
@State var isShowingTokenizer = false
@State var llmConfig: LLMConfig?

Expand Down
2 changes: 1 addition & 1 deletion XCAChatGPTMac/XCAChatGPTMacApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
@main
struct XCAChatGPTMacApp: App {

@StateObject var vm = ViewModel(api: ChatGPTAPI(apiKey: "API_KEY"))
@StateObject var vm = ViewModel(api: ChatGPTAPI())
@State var llmConfig: LLMConfig?

var body: some Scene {
Expand Down
2 changes: 1 addition & 1 deletion XCAChatGPTTV/XCAChatGPTTVApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
@main
struct XCAChatGPTTVApp: App {

@StateObject var vm = ViewModel(api: ChatGPTAPI(apiKey: "API_KEY"), enableSpeech: true)
@StateObject var vm = ViewModel(api: ChatGPTAPI(), enableSpeech: true)
@State var llmConfig: LLMConfig?

@FocusState var isTextFieldFocused: Bool
Expand Down
2 changes: 1 addition & 1 deletion XCAChatGPTWatch Watch App/XCAChatGPTWatchApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
@main
struct XCAChatGPTWatch_Watch_AppApp: App {

@StateObject var vm = ViewModel(api: ChatGPTAPI(apiKey: "API_KEY"))
@StateObject var vm = ViewModel(api: ChatGPTAPI())
@State private var presentedConfigs = [LLMConfig]()

var body: some Scene {
Expand Down