SwiftclassPhotoAnalysis
PromptSuggestionFetcher
class PhotoAnalysis.PromptSuggestionFetcher
Members 18
- func
static processMusicProperties(for: NSAttributedString, with: PhotoAnalysis.TemplatedPrompt.MusicProperties?) -> (musicSubstring: String?, musicQueryTokens: [PhotosIntelligence.QueryToken]) - deinit
deinit - field
let configuration: PhotoAnalysis.PromptSuggestionFetcher.Configuration - field
let embeddingCalculator: PhotosIntelligence.PromptSuggestionEmbeddingCalculator - field
let log: OS_os_log+0x10 - field
let logger: os.Logger - func
curateAssets(assetUUIDs: Set<String>, progressReporter: MAProgressReporter) throws -> PhotoAnalysis.PromptSuggestionFetcher.CurationResult - func
fetchAndValidateSearchSuggestions(eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> [PhotosIntelligence.PromptSuggestion] - func
fetchPromptSuggestionWithValidNumberOfAssets(for: String) -> PhotosIntelligence.PromptSuggestion? - func
fetchUnvalidatedPromptSuggestions(fetchLimit: Int) async throws -> [PhotosIntelligence.PromptSuggestion] - func
prewarm() async throws -> () - func
prioritizeAndRankPromptSuggestions(_: [PhotosIntelligence.PromptSuggestion], momentSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> ([PhotosIntelligence.PromptSuggestion], [PhotoAnalysis.PromptSuggestionDiagnosticContext]) - func
prioritizePromptSuggestions(promptSuggestions: [PhotosIntelligence.PromptSuggestion]) -> (prioritizedPromptSuggestions: [PhotosIntelligence.PromptSuggestion], lowPriorityPromptSuggestions: [PhotosIntelligence.PromptSuggestion], diagnostics: PhotoAnalysis.PromptSuggestionDiagnosticContext) - func
processFetchedSuggestions(fetchedSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> (suggestions: [PhotosIntelligence.PromptSuggestion], diagnosticContext: PhotoAnalysis.PromptSuggestionDiagnosticContext) - func
rankSuggestions(fetchedSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], smartSuggestions: [PhotosIntelligence.PromptSuggestion], optOutSuggestions: [PhotosIntelligence.PromptSuggestion]) -> ([PhotosIntelligence.PromptSuggestion], PhotoAnalysis.PromptSuggestionDiagnosticContext) - func
validatePrompts(_: [PhotoAnalysis.TemplatedPrompt], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter, diagnosticContext: inout PhotoAnalysis.PromptSuggestionProcessingDiagnosticContext, forceValidation: Bool) async throws -> [PhotosIntelligence.PromptSuggestion] - func
validateSmartSuggestions(_: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> ([PhotosIntelligence.PromptSuggestion], [PhotoAnalysis.PromptSuggestionDiagnosticContext]) - init
PhotoAnalysis.PromptSuggestionFetcher.__allocating_init(configuration: PhotoAnalysis.PromptSuggestionFetcher.Configuration) -> PhotoAnalysis.PromptSuggestionFetcher
Header
class PromptSuggestionFetcher { struct Configuration { let storyPhotoLibraryContext: PhotosIntelligence.StoryPhotoLibraryContext let validator: any PhotoAnalysis.PromptSuggestionValidating let searchSuggestionsDataSource: any PhotosIntelligence.PromptSuggestionDataSource let curationContext: __C.CLSCurationContext let enableDejunkingDeduping: Swift.Bool let promptLocalizer: any PhotoAnalysis.PromptLocalizing let momentContextProvider: any PhotoAnalysis.MomentContextProviding init(photoLibrary: __C.PHPhotoLibrary, validator: any PhotoAnalysis.PromptSuggestionValidating, searchSuggestionsDataSource: any PhotosIntelligence.PromptSuggestionDataSource, curationContext: __C.CLSCurationContext, enableDejunkingDeduping: Swift.Bool, promptLocalizer: any PhotoAnalysis.PromptLocalizing, momentContextProvider: any PhotoAnalysis.MomentContextProviding) static var promptSuggestionsFetchLimit: Swift.Int { get } } struct MCSuggestion { let contextId: Swift.String let prompts: [PhotoAnalysis.TemplatedPrompt] let creationDate: Foundation.Date init(contextId: Swift.String, prompts: [PhotoAnalysis.TemplatedPrompt], creationDate: Foundation.Date) var description: Swift.String { get } } struct CurationResult { let keyAssetUUID: Swift.String? let assetUUIDs: Swift.Set<Swift.String> } let log: __C.OS_os_log let logger: os.Logger let configuration: PhotoAnalysis.PromptSuggestionFetcher.Configuration let embeddingCalculator: PhotosIntelligence.PromptSuggestionEmbeddingCalculator init(configuration: PhotoAnalysis.PromptSuggestionFetcher.Configuration) final func prioritizePromptSuggestions(promptSuggestions: [PhotosIntelligence.PromptSuggestion]) -> (prioritizedPromptSuggestions: [PhotosIntelligence.PromptSuggestion], lowPriorityPromptSuggestions: [PhotosIntelligence.PromptSuggestion], diagnostics: any PhotoAnalysis.PromptSuggestionDiagnosticContext) final func fetchUnvalidatedPromptSuggestions(fetchLimit: Swift.Int) async throws -> [PhotosIntelligence.PromptSuggestion] final func prioritizeAndRankPromptSuggestions(_: [PhotosIntelligence.PromptSuggestion], momentSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: any PhotosIntelligenceCore.EventRecorder, progressReporter: __C.MAProgressReporter) async throws -> ([PhotosIntelligence.PromptSuggestion], [any PhotoAnalysis.PromptSuggestionDiagnosticContext]) final func fetchPromptSuggestionWithValidNumberOfAssets(for: Swift.String) -> PhotosIntelligence.PromptSuggestion? final func curateAssets(assetUUIDs: Swift.Set<Swift.String>, progressReporter: __C.MAProgressReporter) throws -> PhotoAnalysis.PromptSuggestionFetcher.CurationResult final func rankSuggestions(fetchedSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], smartSuggestions: [PhotosIntelligence.PromptSuggestion], optOutSuggestions: [PhotosIntelligence.PromptSuggestion]) -> ([PhotosIntelligence.PromptSuggestion], any PhotoAnalysis.PromptSuggestionDiagnosticContext) final func validatePrompts(_: [PhotoAnalysis.TemplatedPrompt], eventRecorder: any PhotosIntelligenceCore.EventRecorder, progressReporter: __C.MAProgressReporter, diagnosticContext: inout PhotoAnalysis.PromptSuggestionProcessingDiagnosticContext, forceValidation: Swift.Bool) async throws -> [PhotosIntelligence.PromptSuggestion] final func validateSmartSuggestions(_: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: any PhotosIntelligenceCore.EventRecorder, progressReporter: __C.MAProgressReporter) async throws -> ([PhotosIntelligence.PromptSuggestion], [any PhotoAnalysis.PromptSuggestionDiagnosticContext]) final func processFetchedSuggestions(fetchedSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: any PhotosIntelligenceCore.EventRecorder, progressReporter: __C.MAProgressReporter) async throws -> (suggestions: [PhotosIntelligence.PromptSuggestion], diagnosticContext: any PhotoAnalysis.PromptSuggestionDiagnosticContext) final func fetchAndValidateSearchSuggestions(eventRecorder: any PhotosIntelligenceCore.EventRecorder, progressReporter: __C.MAProgressReporter) async throws -> [PhotosIntelligence.PromptSuggestion] final func prewarm() async throws static func processMusicProperties(for: __C.NSAttributedString, with: PhotoAnalysis.TemplatedPrompt.MusicProperties?) -> (musicSubstring: Swift.String?, musicQueryTokens: [PhotosIntelligence.QueryToken]) deinit }