SwiftclassPhotoAnalysis

class PhotoAnalysis.PromptSuggestionFetcher

Members 18

  1. funcstatic processMusicProperties(for: NSAttributedString, with: PhotoAnalysis.TemplatedPrompt.MusicProperties?) -> (musicSubstring: String?, musicQueryTokens: [PhotosIntelligence.QueryToken])
  2. deinitdeinit
  3. fieldlet configuration: PhotoAnalysis.PromptSuggestionFetcher.Configuration
  4. fieldlet embeddingCalculator: PhotosIntelligence.PromptSuggestionEmbeddingCalculator
  5. fieldlet log: OS_os_log+0x10
  6. fieldlet logger: os.Logger
  7. funccurateAssets(assetUUIDs: Set<String>, progressReporter: MAProgressReporter) throws -> PhotoAnalysis.PromptSuggestionFetcher.CurationResult
  8. funcfetchAndValidateSearchSuggestions(eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> [PhotosIntelligence.PromptSuggestion]
  9. funcfetchPromptSuggestionWithValidNumberOfAssets(for: String) -> PhotosIntelligence.PromptSuggestion?
  10. funcfetchUnvalidatedPromptSuggestions(fetchLimit: Int) async throws -> [PhotosIntelligence.PromptSuggestion]
  11. funcprewarm() async throws -> ()
  12. funcprioritizeAndRankPromptSuggestions(_: [PhotosIntelligence.PromptSuggestion], momentSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> ([PhotosIntelligence.PromptSuggestion], [PhotoAnalysis.PromptSuggestionDiagnosticContext])
  13. funcprioritizePromptSuggestions(promptSuggestions: [PhotosIntelligence.PromptSuggestion]) -> (prioritizedPromptSuggestions: [PhotosIntelligence.PromptSuggestion], lowPriorityPromptSuggestions: [PhotosIntelligence.PromptSuggestion], diagnostics: PhotoAnalysis.PromptSuggestionDiagnosticContext)
  14. funcprocessFetchedSuggestions(fetchedSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> (suggestions: [PhotosIntelligence.PromptSuggestion], diagnosticContext: PhotoAnalysis.PromptSuggestionDiagnosticContext)
  15. funcrankSuggestions(fetchedSuggestions: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], smartSuggestions: [PhotosIntelligence.PromptSuggestion], optOutSuggestions: [PhotosIntelligence.PromptSuggestion]) -> ([PhotosIntelligence.PromptSuggestion], PhotoAnalysis.PromptSuggestionDiagnosticContext)
  16. funcvalidatePrompts(_: [PhotoAnalysis.TemplatedPrompt], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter, diagnosticContext: inout PhotoAnalysis.PromptSuggestionProcessingDiagnosticContext, forceValidation: Bool) async throws -> [PhotosIntelligence.PromptSuggestion]
  17. funcvalidateSmartSuggestions(_: [PhotoAnalysis.PromptSuggestionFetcher.MCSuggestion], eventRecorder: PhotosIntelligenceCore.EventRecorder, progressReporter: MAProgressReporter) async throws -> ([PhotosIntelligence.PromptSuggestion], [PhotoAnalysis.PromptSuggestionDiagnosticContext])
  18. initPhotoAnalysis.PromptSuggestionFetcher.__allocating_init(configuration: PhotoAnalysis.PromptSuggestionFetcher.Configuration) -> PhotoAnalysis.PromptSuggestionFetcher
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
}