Skip to content

Commit

Permalink
perf: increase Gemini free quota to 100000 * 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Feb 16, 2024
1 parent 37538b8 commit 2556643
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Easydict/Feature/Service/Gemini/GeminiService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions Easydict/Feature/Service/Model/EZQueryService.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ NS_SWIFT_NAME(QueryService)

- (BOOL)needPrivateAPIKey;

/// Default is 100 * 10000
- (NSInteger)totalFreeQueryCharacterCount;

/// 获取文本的语言
Expand Down

0 comments on commit 2556643

Please sign in to comment.