SwiftenumGenerativeFunctionsFoundation

enum GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

inherits{}

Members 9

  1. casecase abuseRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.AbuseRejectedErrorInfo)
  2. casecase denyListRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.DenyListRejectedErrorInfo)
  3. casecase invalidPromptFormat(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.InvalidPromptFormatInfo)
  4. casecase languageRecognizerRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.LanguageRecognizerRejectedErrorInfo)
  5. casecase recitationRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.RecitationRejectedErrorInfo)
  6. casecase safetyRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo)
  7. casecase scriptValidatorRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.ScriptValidatorRejectedErrorInfo)
  8. casecase tooManyTokens(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.TooManyTokensErrorInfo)
  9. casecase unrecognizedPrefixID(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.UnrecognizedPrefixIDErrorInfo)
enum GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType {
    struct TooManyTokensErrorInfo {
        enum CodingKeys {
            case tokenCount
            case tokenCountMaximum
        }
        let tokenCount: Swift.Int
        let tokenCountMaximum: Swift.Int

        init(tokenCount: Swift.Int, tokenCountMaximum: Swift.Int)
    }
    struct SafetyRejectedErrorInfo {
        enum Origin {
            enum CodingKeys {
                case input
                case output
            }
            enum InputCodingKeys {}
            enum OutputCodingKeys {}
            case input
            case output
        }
        enum ViolationCategory {
            enum CodingKeys {
                case unspecified
                case unknown
                case drugs
                case hate
                case conspiracies
                case violence
                case propertyCrime
                case terrorismOrExtremism
                case gore
                case bodilyFluids
                case obsceneGestures
                case nudityOrSexual
                case weapons
                case massLossOfLife
                case offensiveWords
                case childSexualExploitationAndAbuseImagery
                case selfHarm
                case toxic
                case harassment
                case suggestive
            }
            enum UnspecifiedCodingKeys {}
            enum UnknownCodingKeys {}
            enum DrugsCodingKeys {}
            enum HateCodingKeys {}
            enum ConspiraciesCodingKeys {}
            enum ViolenceCodingKeys {}
            enum PropertyCrimeCodingKeys {}
            enum TerrorismOrExtremismCodingKeys {}
            enum GoreCodingKeys {}
            enum BodilyFluidsCodingKeys {}
            enum ObsceneGesturesCodingKeys {}
            enum NudityOrSexualCodingKeys {}
            enum WeaponsCodingKeys {}
            enum MassLossOfLifeCodingKeys {}
            enum OffensiveWordsCodingKeys {}
            enum ChildSexualExploitationAndAbuseImageryCodingKeys {}
            enum SelfHarmCodingKeys {}
            enum ToxicCodingKeys {}
            enum HarassmentCodingKeys {}
            enum SuggestiveCodingKeys {}
            case unspecified
            case unknown
            case drugs
            case hate
            case conspiracies
            case violence
            case propertyCrime
            case terrorismOrExtremism
            case gore
            case bodilyFluids
            case obsceneGestures
            case nudityOrSexual
            case weapons
            case massLossOfLife
            case offensiveWords
            case childSexualExploitationAndAbuseImagery
            case selfHarm
            case toxic
            case harassment
            case suggestive
        }
        struct Sources {
            enum Source {
                enum CodingKeys {
                    case OVS
                    case safetyGuardrail
                    case codeSafety
                    case thirdPartyPartner
                    case imageGuardrail
                    case safetyOverride
                }
                enum OVSCodingKeys {}
                enum SafetyGuardrailCodingKeys {}
                enum CodeSafetyCodingKeys {}
                enum ThirdPartyPartnerCodingKeys {}
                enum ImageGuardrailCodingKeys {}
                enum SafetyOverrideCodingKeys {}
                case OVS
                case safetyGuardrail
                case codeSafety
                case thirdPartyPartner
                case imageGuardrail
                case safetyOverride

                var isRegional: Swift.Bool {
                    get
                }
            }
            enum CodingKeys {
                case sources
            }
            let sources: [GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Sources.Source]

            init(sources: [GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Sources.Source])
        }
        enum CodingKeys {
            case debugDescription
            case underlyingError
            case content
            case violationCategory
            case isUnsafe
            case isRegionalSensitive
            case unsafeSources
            case regionalSensitiveSources
            case origin
        }
        let debugDescription: Swift.String
        let underlyingError: GenerativeFunctionsFoundation.GenerativeError.UnderlyingError?
        let content: Swift.String
        let violationCategory: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.ViolationCategory?
        let isUnsafe: Swift.Bool
        let isRegionalSensitive: Swift.Bool
        let unsafeSources: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Sources
        let regionalSensitiveSources: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Sources
        let origin: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Origin

        init(debugDescription: Swift.String, underlyingError: (any Swift.Error)?, content: Swift.String, violationCategory: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.ViolationCategory?, isUnsafe: Swift.Bool, isRegionalSensitive: Swift.Bool, unsafeSources: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Sources, regionalSensitiveSources: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Sources, origin: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo.Origin)

        var isRegionalUnsafe: Swift.Bool {
            get
        }
    }
    struct AbuseRejectedErrorInfo {
        enum Reason {
            enum CodingKeys {
                case unspecified
                case unknown
                case cyberattack
                case csae
                case cbrn
                case fraud
                case jailbreak
            }
            enum UnspecifiedCodingKeys {}
            enum UnknownCodingKeys {}
            enum CyberattackCodingKeys {}
            enum CsaeCodingKeys {}
            enum CbrnCodingKeys {}
            enum FraudCodingKeys {}
            enum JailbreakCodingKeys {}
            case unspecified
            case unknown
            case cyberattack
            case csae
            case cbrn
            case fraud
            case jailbreak
        }
        enum Level {
            enum CodingKeys {
                case unspecified
                case unknown
                case danger
                case warn
            }
            enum UnspecifiedCodingKeys {}
            enum UnknownCodingKeys {}
            enum DangerCodingKeys {}
            enum WarnCodingKeys {}
            case unspecified
            case unknown
            case danger
            case warn
        }
        enum CodingKeys {
            case debugDescription
            case underlyingError
            case reason
            case level
        }
        let debugDescription: Swift.String
        let underlyingError: GenerativeFunctionsFoundation.GenerativeError.UnderlyingError?
        let reason: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.AbuseRejectedErrorInfo.Reason?
        let level: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.AbuseRejectedErrorInfo.Level?

        init(debugDescription: Swift.String, underlyingError: (any Swift.Error)?, reason: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.AbuseRejectedErrorInfo.Reason?, level: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.AbuseRejectedErrorInfo.Level?)
    }
    struct DenyListRejectedErrorInfo {
        enum Origin {
            enum CodingKeys {
                case input
                case output
            }
            enum InputCodingKeys {}
            enum OutputCodingKeys {}
            case input
            case output
        }
        enum CodingKeys {
            case debugDescription
            case underlyingError
            case content
            case origin
        }
        let debugDescription: Swift.String
        let underlyingError: GenerativeFunctionsFoundation.GenerativeError.UnderlyingError?
        let content: Swift.String
        let origin: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.DenyListRejectedErrorInfo.Origin

        init(debugDescription: Swift.String, underlyingError: (any Swift.Error)?, content: Swift.String, origin: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.DenyListRejectedErrorInfo.Origin)
    }
    struct RecitationRejectedErrorInfo {
        enum RecitationRejectionReason {
            enum CodingKeys {
                case unspecified
                case hashLookupMatch
                case filterUnavailable
            }
            enum UnspecifiedCodingKeys {}
            enum HashLookupMatchCodingKeys {}
            enum FilterUnavailableCodingKeys {}
            case unspecified
            case hashLookupMatch
            case filterUnavailable

            var debugDescription: Swift.String {
                get
            }
        }
        struct FilterHitOrFailure {
            enum CodingKeys {
                case filterID
                case passageStartIndex
                case passageEndIndex
                case failureCode
                case triggeredBlock
            }
            let filterID: Swift.String?
            let passageStartIndex: Swift.Int?
            let passageEndIndex: Swift.Int?
            let failureCode: Swift.Int?
            let triggeredBlock: Swift.Bool?

            var debugDescription: Swift.String {
                get
            }
        }
        struct RecitationRejectionDebugInfo {
            enum CodingKeys {
                case shinglesChecked
                case hits
                case blocked
                case groundingChecked
                case groundingSuppressed
            }
            let shinglesChecked: Swift.Int?
            let hits: [GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.RecitationRejectedErrorInfo.FilterHitOrFailure]
            let blocked: Swift.Bool?
            let groundingChecked: Swift.Bool?
            let groundingSuppressed: Swift.Bool?

            var debugDescription: Swift.String {
                get
            }
        }
        enum CodingKeys {
            case reason
            case debugInfo
        }
        let reason: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.RecitationRejectedErrorInfo.RecitationRejectionReason
        let debugInfo: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.RecitationRejectedErrorInfo.RecitationRejectionDebugInfo?

        init(reason: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.RecitationRejectedErrorInfo.RecitationRejectionReason, debugInfo: GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.RecitationRejectedErrorInfo.RecitationRejectionDebugInfo?)

        var debugDescription: Swift.String {
            get
        }
    }
    struct LanguageRecognizerRejectedErrorInfo {
        enum CodingKeys {
            case debugDescription
            case underlyingError
            case content
            case languagePredictions
        }
        let debugDescription: Swift.String
        let underlyingError: GenerativeFunctionsFoundation.GenerativeError.UnderlyingError?
        let content: Swift.String
        let languagePredictions: [Foundation.Locale.LanguageCode : Swift.Double]

        init(debugDescription: Swift.String, underlyingError: (any Swift.Error)?, content: Swift.String, languagePredictions: [(languageCode: Foundation.Locale.LanguageCode, score: Swift.Double)])
    }
    struct ScriptValidatorRejectedErrorInfo {
        enum CodingKeys {
            case debugDescription
            case underlyingError
            case content
        }
        let debugDescription: Swift.String
        let underlyingError: GenerativeFunctionsFoundation.GenerativeError.UnderlyingError?
        let content: Swift.String

        init(debugDescription: Swift.String, underlyingError: (any Swift.Error)?, content: Swift.String)
    }
    struct InvalidPromptFormatInfo {
        enum CodingKeys {
            case debugDescription
        }
        let debugDescription: Swift.String

        init(debugDescription: Swift.String)
    }
    struct UnrecognizedPrefixIDErrorInfo {
        enum CodingKeys {
            case prefixID
        }
        let prefixID: Swift.String

        init(prefixID: Swift.String)
    }
    enum CodingKeys {
        case tooManyTokens
        case safetyRejected
        case abuseRejected
        case denyListRejected
        case recitationRejected
        case languageRecognizerRejected
        case scriptValidatorRejected
        case invalidPromptFormat
        case unrecognizedPrefixID
    }
    enum TooManyTokensCodingKeys {
        case _0
    }
    enum SafetyRejectedCodingKeys {
        case _0
    }
    enum AbuseRejectedCodingKeys {
        case _0
    }
    enum DenyListRejectedCodingKeys {
        case _0
    }
    enum RecitationRejectedCodingKeys {
        case _0
    }
    enum LanguageRecognizerRejectedCodingKeys {
        case _0
    }
    enum ScriptValidatorRejectedCodingKeys {
        case _0
    }
    enum InvalidPromptFormatCodingKeys {
        case _0
    }
    enum UnrecognizedPrefixIDCodingKeys {
        case _0
    }
    case tooManyTokens(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.TooManyTokensErrorInfo)
    case safetyRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.SafetyRejectedErrorInfo)
    case abuseRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.AbuseRejectedErrorInfo)
    case denyListRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.DenyListRejectedErrorInfo)
    case recitationRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.RecitationRejectedErrorInfo)
    case languageRecognizerRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.LanguageRecognizerRejectedErrorInfo)
    case scriptValidatorRejected(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.ScriptValidatorRejectedErrorInfo)
    case invalidPromptFormat(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.InvalidPromptFormatInfo)
    case unrecognizedPrefixID(GenerativeFunctionsFoundation.GenerativeError.PromptError.ErrorType.UnrecognizedPrefixIDErrorInfo)
}