// // PhotoSemantics.swift // Focale // // Author: Simon-Pierre Boucher // Contact: contact@spboucher.ai // // Structured output of stage 2. Never a free String out of the model // (CLAUDE.md §10) — always @Generable. // import Foundation import FoundationModels @Generable enum PhotoKind: String, CaseIterable { case document, receipt, person, place, object, screen, food, animal, other } @Generable struct PhotoSemantics { @Guide(description: "Ce que montre l'image, une phrase, factuelle") let gist: String @Guide(description: "Type de contenu") let kind: PhotoKind @Guide(description: "Éléments cherchables présents dans l'image", .count(0...8)) let entities: [String] @Guide(description: "Vrai si l'image contient une information à conserver (montant, date, code, adresse)") let hasActionableInfo: Bool }