From fd2be7d97ced981b5d6e556efe16aedc8266d0c3 Mon Sep 17 00:00:00 2001 From: Jaesung Date: Wed, 17 May 2023 19:42:43 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Remove=20force=20unwrapping=20th?= =?UTF-8?q?at=20is=20not=20required=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/GoogleGenerativeAI/GenerativeLanguage.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/GoogleGenerativeAI/GenerativeLanguage.swift b/Sources/GoogleGenerativeAI/GenerativeLanguage.swift index 04dfed1..c2f6942 100644 --- a/Sources/GoogleGenerativeAI/GenerativeLanguage.swift +++ b/Sources/GoogleGenerativeAI/GenerativeLanguage.swift @@ -21,7 +21,7 @@ public class GenerativeLanguage { private(set) var apiKey: String private lazy var apiClient: APIClient = { - let baseURL = URL(string: "https://generativelanguage.googleapis.com")! + let baseURL = URL(string: "https://generativelanguage.googleapis.com") return APIClient(baseURL: baseURL) { configuration in configuration.sessionConfiguration.httpAdditionalHeaders = ["x-goog-api-client": "genai-swift/0.1.0"] configuration.sessionConfiguration.httpAdditionalHeaders = ["x-goog-api-key": apiKey]