mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -51,15 +51,18 @@ func PostVisionCaption(router *gin.RouterGroup) {
|
||||
return
|
||||
}
|
||||
|
||||
// TODO: Return error code 501 until this service is implemented.
|
||||
code := http.StatusNotImplemented
|
||||
|
||||
// Generate Vision API service response.
|
||||
response := vision.ApiResponse{
|
||||
Id: request.GetId(),
|
||||
Code: http.StatusNotImplemented,
|
||||
Code: code,
|
||||
Error: http.StatusText(http.StatusNotImplemented),
|
||||
Model: &vision.Model{Name: "Caption"},
|
||||
Result: &vision.ApiResult{Caption: &vision.CaptionResult{Text: "This is a test.", Confidence: 0.14159265359}},
|
||||
Model: &vision.Model{Type: vision.ModelTypeCaption},
|
||||
Result: vision.ApiResult{Caption: &vision.CaptionResult{Text: "This is a test.", Confidence: 0.14159265359}},
|
||||
}
|
||||
|
||||
c.JSON(http.StatusNotImplemented, response)
|
||||
c.JSON(code, response)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user