Mistral support by Vaygr

This commit is contained in:
Beingpax 2025-04-05 21:56:52 +05:45
parent cb6da1641c
commit 117ce1744f
2 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,7 @@ enum AIProvider: String, CaseIterable {
case deepSeek = "DeepSeek"
case gemini = "Gemini"
case anthropic = "Anthropic"
case mistral = "Mistral"
case ollama = "Ollama"
case custom = "Custom"
@ -21,6 +22,8 @@ enum AIProvider: String, CaseIterable {
return "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent"
case .anthropic:
return "https://api.anthropic.com/v1/messages"
case .mistral:
return "https://api.mistral.ai/v1/chat/completions"
case .ollama:
return UserDefaults.standard.string(forKey: "ollamaBaseURL") ?? "http://localhost:11434"
case .custom:
@ -40,6 +43,8 @@ enum AIProvider: String, CaseIterable {
return "gemini-2.0-flash"
case .anthropic:
return "claude-3-5-sonnet-20241022"
case .mistral:
return "mistral-large-2411"
case .ollama:
return UserDefaults.standard.string(forKey: "ollamaSelectedModel") ?? "mistral"
case .custom:

View File

@ -508,9 +508,10 @@ struct APIKeyManagementView: View {
URL(string: "https://makersuite.google.com/app/apikey")!
case .anthropic:
URL(string: "https://console.anthropic.com/settings/keys")!
case .mistral:
URL(string: "https://console.mistral.ai/api-keys")!
case .ollama, .custom:
URL(string: "")! // This case should never be reached
}
NSWorkspace.shared.open(url)
} label: {