diff --git a/Easydict/Feature/Service/Gemini/GeminiService.swift b/Easydict/Feature/Service/Gemini/GeminiService.swift index 43331a553..2be848ec3 100644 --- a/Easydict/Feature/Service/Gemini/GeminiService.swift +++ b/Easydict/Feature/Service/Gemini/GeminiService.swift @@ -40,11 +40,6 @@ public final class GeminiService: QueryService { return orderedDict } - override public func ocr(_: EZQueryModel) async throws -> EZOCRResult { - NSLog("Gemini Translate does not support OCR") - throw QueryServiceError.notSupported - } - override public func needPrivateAPIKey() -> Bool { true } @@ -56,6 +51,10 @@ public final class GeminiService: QueryService { return true } + override public func totalFreeQueryCharacterCount() -> Int { + 100000 * 1000 + } + private let defaultAPIKey = "" /* .decryptAES() */ // easydict://writeKeyValue?EZGeminiAPIKey=xxx diff --git a/Easydict/Feature/Service/Model/EZQueryService.h b/Easydict/Feature/Service/Model/EZQueryService.h index f2616bfe4..c708b9806 100644 --- a/Easydict/Feature/Service/Model/EZQueryService.h +++ b/Easydict/Feature/Service/Model/EZQueryService.h @@ -114,6 +114,7 @@ NS_SWIFT_NAME(QueryService) - (BOOL)needPrivateAPIKey; +/// Default is 100 * 10000 - (NSInteger)totalFreeQueryCharacterCount; /// 获取文本的语言