spb/focale Public
Swift 100%
1//2// PhotoSemantics.swift3// Focale4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// Structured output of stage 2. Never a free String out of the model9// (CLAUDE.md §10) — always @Generable.10//1112import Foundation13import FoundationModels1415@Generable16enum PhotoKind: String, CaseIterable {17 case document, receipt, person, place, object, screen, food, animal, other18}1920@Generable21struct PhotoSemantics {22 @Guide(description: "Ce que montre l'image, une phrase, factuelle")23 let gist: String2425 @Guide(description: "Type de contenu")26 let kind: PhotoKind2728 @Guide(description: "Éléments cherchables présents dans l'image", .count(0...8))29 let entities: [String]3031 @Guide(description: "Vrai si l'image contient une information à conserver (montant, date, code, adresse)")32 let hasActionableInfo: Bool33}34