mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
These changes allow to configure the computer vision models through an optional vision.yml configuration file. Note that the API endpoints are not yet functional and require further work. Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
28
internal/api/vision_caption.go
Normal file
28
internal/api/vision_caption.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/auth/acl"
|
||||
)
|
||||
|
||||
// PostVisionCaption returns a suitable caption for an image.
|
||||
//
|
||||
// @Summary returns a suitable caption for an image
|
||||
// @Id PostVisionCaption
|
||||
// @Tags Vision
|
||||
// @Produce json
|
||||
// @Failure 401,403,404,429,501 {object} i18n.Response
|
||||
// @Router /api/v1/vision/caption [post]
|
||||
func PostVisionCaption(router *gin.RouterGroup) {
|
||||
router.POST("/vision/caption", func(c *gin.Context) {
|
||||
s := Auth(c, acl.ResourceVision, acl.AccessAll)
|
||||
|
||||
// Abort if permission is not granted.
|
||||
if s.Abort(c) {
|
||||
return
|
||||
}
|
||||
|
||||
AbortNotImplemented(c)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user