Skip to content

Commit e02a1f5

Browse files
committed
Fix endpoint of Google Generative AI
1 parent 40fcb26 commit e02a1f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Tool/Sources/AIModel/ChatModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ public struct ChatModel: Codable, Equatable, Identifiable {
102102
return "\(baseURL)/openai/deployments/\(deployment)/chat/completions?api-version=\(version)"
103103
case .googleAI:
104104
let baseURL = info.baseURL
105-
if baseURL.isEmpty { return "https://generativelanguage.googleapis.com/v1" }
106-
return "\(baseURL)/v1"
105+
if baseURL.isEmpty { return "https://generativelanguage.googleapis.com" }
106+
return "\(baseURL)"
107107
case .ollama:
108108
let baseURL = info.baseURL
109109
if baseURL.isEmpty { return "http://localhost:11434/api/chat" }

0 commit comments

Comments
 (0)