This snapshot establishes the camera-to-result recognition flow and related tests while checking in the project skill/docs assets required for the configured local tooling.
20 lines
407 B
Swift
20 lines
407 B
Swift
import Foundation
|
|
|
|
struct CloudOCRRequest {
|
|
let jpegData: Data
|
|
}
|
|
|
|
struct CloudOCRTextResponse {
|
|
let markdown: String
|
|
}
|
|
|
|
protocol CloudOCRClient {
|
|
func recognizeText(from request: CloudOCRRequest) async throws -> CloudOCRTextResponse?
|
|
}
|
|
|
|
struct StubCloudOCRClient: CloudOCRClient {
|
|
func recognizeText(from request: CloudOCRRequest) async throws -> CloudOCRTextResponse? {
|
|
nil
|
|
}
|
|
}
|