mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
17 lines
452 B
Go
17 lines
452 B
Go
package openai
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/photoprism/photoprism/internal/ai/vision/schema"
|
|
)
|
|
|
|
// SchemaLabels returns the canonical labels JSON Schema string consumed by Ollama models.
|
|
//
|
|
// Related documentation and references:
|
|
// - https://platform.openai.com/docs/guides/structured-outputs
|
|
// - https://json-schema.org/learn/miscellaneous-examples
|
|
func SchemaLabels(nsfw bool) json.RawMessage {
|
|
return schema.LabelsJsonSchema(nsfw)
|
|
}
|