Skip to content
Open
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
6 changes: 6 additions & 0 deletions llm/apple/Application/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ struct ContentView: View {
case gemma3
case llama
case llava
case qwen2
case qwen3
case phi4
case smollm3
Expand All @@ -134,6 +135,8 @@ struct ContentView: View {
return .gemma3
} else if filename.hasPrefix("llama") {
return .llama
} else if filename.hasPrefix("qwen2") {
return .qwen2
} else if filename.hasPrefix("llava") {
return .llava
} else if filename.hasPrefix("qwen3") {
Expand Down Expand Up @@ -392,6 +395,7 @@ struct ContentView: View {
case .llama: return .llamagenerated
case .llava: return .llavagenerated
case .phi4: return .phi4generated
case .qwen2: return .qwengenerated
case .qwen3: return .qwengenerated
case .smollm3: return .smollm3generated
case .voxtral: return .voxtralgenerated
Expand Down Expand Up @@ -617,6 +621,8 @@ struct ContentView: View {
formattedPrompt = String(format: Constants.llavaPromptTemplate, text)
case .phi4:
formattedPrompt = String(format: Constants.phi4PromptTemplate, text)
case .qwen2:
formattedPrompt = String(format: Constants.llama3PromptTemplate, text)
case .qwen3:
let basePrompt = String(format: Constants.qwen3PromptTemplate, text)
formattedPrompt = thinkingMode ? basePrompt.replacingOccurrences(of: "<think>\n\n</think>\n\n\n", with: "") : basePrompt
Expand Down