Skip to content

Commit

Permalink
feat: open streamTranslate API to all users
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Dec 15, 2024
1 parent 5798da1 commit 59458df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Easydict/Swift/Feature/HTTPServer/Vapor/routes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ func routes(_ app: Application) throws {
return response
}

#if DEBUG
// Currently, streamTranslate only supports base OpenAI services for test.
// Currently, streamTranslate only supports base OpenAI services.
app.post("streamTranslate") { req async throws -> Response in
let request = try req.content.decode(TranslationRequest.self)
let serviceType = ServiceType(rawValue: request.serviceType)
Expand Down Expand Up @@ -106,7 +105,6 @@ func routes(_ app: Application) throws {
})
)
}
#endif

/// OCR image data up to 10MB. https://docs.vapor.codes/basics/routing/
app.on(.POST, "ocr", body: .collect(maxSize: "10mb")) { req async throws -> OCRResponse in
Expand Down

0 comments on commit 59458df

Please sign in to comment.