safetykit 0.57.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/safety_kit/models/content_create_params.rb +136 -17
- data/lib/safety_kit/models/content_create_response.rb +206 -109
- data/lib/safety_kit/models/data_update_settings_params.rb +6 -8
- data/lib/safety_kit/resources/content.rb +12 -10
- data/lib/safety_kit/resources/data.rb +1 -1
- data/lib/safety_kit/version.rb +1 -1
- data/rbi/safety_kit/models/content_create_params.rbi +359 -22
- data/rbi/safety_kit/models/content_create_response.rbi +423 -172
- data/rbi/safety_kit/models/data_update_settings_params.rbi +7 -11
- data/rbi/safety_kit/resources/content.rbi +20 -13
- data/rbi/safety_kit/resources/data.rbi +2 -4
- data/sig/safety_kit/models/content_create_params.rbs +142 -12
- data/sig/safety_kit/models/content_create_response.rbs +156 -62
- data/sig/safety_kit/resources/content.rbs +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5cd8382bd07b22eba07c2a3db9f9a9cd0c30e5644842b3c47e8f1b1954fa0cba
|
|
4
|
+
data.tar.gz: bb032a524f14bce495197601991f86b2005a3d93f9bc8da789f0ea35a44556a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e9f79189873e0b34f05815bf85ccfc038016c061e4956163ac9062255b51bcc8050745bcb336a6fa28c69dfb7d6d9a12b9925550523e00890f600c91257ae61
|
|
7
|
+
data.tar.gz: d8d90a4ae6535c35f3fc26865918d34a23bbdf03a169aac8fff19c6ebfc56a54f1ea6c06be5aef382a6cfb63bdd6bc340db22154e39caa390d6652613992e269
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.59.0 (2026-08-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.58.0...v0.59.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.58.0...v0.59.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([79f835f](https://github.com/GetSafetyKit/safetykit-ruby/commit/79f835fe421b21ca05a77ab77bfeef64aea99285))
|
|
10
|
+
|
|
11
|
+
## 0.58.0 (2026-08-11)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.57.0...v0.58.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.57.0...v0.58.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([6e357b2](https://github.com/GetSafetyKit/safetykit-ruby/commit/6e357b2845a8f97084b348cb2bf7dccdb97c5d43))
|
|
18
|
+
|
|
3
19
|
## 0.57.0 (2026-08-11)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.56.0...v0.57.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.56.0...v0.57.0)
|
data/README.md
CHANGED
|
@@ -7,6 +7,13 @@ module SafetyKit
|
|
|
7
7
|
extend SafetyKit::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include SafetyKit::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute content
|
|
11
|
+
# Content parts to classify together. At most 20 images.
|
|
12
|
+
#
|
|
13
|
+
# @return [Array<SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1>]
|
|
14
|
+
required :content,
|
|
15
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::ContentCreateParams::Content] }
|
|
16
|
+
|
|
10
17
|
# @!attribute user_id
|
|
11
18
|
# Your stable identifier for the user this content belongs to.
|
|
12
19
|
#
|
|
@@ -19,40 +26,152 @@ module SafetyKit
|
|
|
19
26
|
# @return [String, nil]
|
|
20
27
|
optional :content_id, String
|
|
21
28
|
|
|
22
|
-
# @!attribute images
|
|
23
|
-
# Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
24
|
-
# most 5MB each.
|
|
25
|
-
#
|
|
26
|
-
# @return [Array<String>, nil]
|
|
27
|
-
optional :images, SafetyKit::Internal::Type::ArrayOf[String]
|
|
28
|
-
|
|
29
29
|
# @!attribute metadata
|
|
30
30
|
# Additional product context for this content. At most 8KB when serialized.
|
|
31
31
|
#
|
|
32
32
|
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
33
33
|
optional :metadata, SafetyKit::Internal::Type::HashOf[SafetyKit::Internal::Type::Unknown, nil?: true]
|
|
34
34
|
|
|
35
|
-
# @!attribute
|
|
36
|
-
#
|
|
35
|
+
# @!attribute safety_kit_version
|
|
36
|
+
# The API version this operation is defined against.
|
|
37
37
|
#
|
|
38
|
-
# @return [
|
|
39
|
-
optional :
|
|
38
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateParams::SafetyKitVersion, nil]
|
|
39
|
+
optional :safety_kit_version, enum: -> { SafetyKit::ContentCreateParams::SafetyKitVersion }
|
|
40
40
|
|
|
41
|
-
# @!method initialize(user_id:, content_id: nil,
|
|
42
|
-
#
|
|
43
|
-
# {SafetyKit::Models::ContentCreateParams} for more details.
|
|
41
|
+
# @!method initialize(content:, user_id:, content_id: nil, metadata: nil, safety_kit_version: nil, request_options: {})
|
|
42
|
+
# @param content [Array<SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1>] Content parts to classify together. At most 20 images.
|
|
44
43
|
#
|
|
45
44
|
# @param user_id [String] Your stable identifier for the user this content belongs to.
|
|
46
45
|
#
|
|
47
46
|
# @param content_id [String] Your content identifier.
|
|
48
47
|
#
|
|
49
|
-
# @param images [Array<String>] Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
50
|
-
#
|
|
51
48
|
# @param metadata [Hash{Symbol=>Object, nil}] Additional product context for this content. At most 8KB when serialized.
|
|
52
49
|
#
|
|
53
|
-
# @param
|
|
50
|
+
# @param safety_kit_version [Symbol, SafetyKit::Models::ContentCreateParams::SafetyKitVersion] The API version this operation is defined against.
|
|
54
51
|
#
|
|
55
52
|
# @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}]
|
|
53
|
+
|
|
54
|
+
# One part of the submitted content.
|
|
55
|
+
module Content
|
|
56
|
+
extend SafetyKit::Internal::Type::Union
|
|
57
|
+
|
|
58
|
+
variant -> { SafetyKit::ContentCreateParams::Content::UnionMember0 }
|
|
59
|
+
|
|
60
|
+
variant -> { SafetyKit::ContentCreateParams::Content::UnionMember1 }
|
|
61
|
+
|
|
62
|
+
class UnionMember0 < SafetyKit::Internal::Type::BaseModel
|
|
63
|
+
# @!attribute text
|
|
64
|
+
# User-authored text to classify.
|
|
65
|
+
#
|
|
66
|
+
# @return [String]
|
|
67
|
+
required :text, String
|
|
68
|
+
|
|
69
|
+
# @!attribute type
|
|
70
|
+
#
|
|
71
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember0::Type]
|
|
72
|
+
required :type, enum: -> { SafetyKit::ContentCreateParams::Content::UnionMember0::Type }
|
|
73
|
+
|
|
74
|
+
# @!attribute key
|
|
75
|
+
# Your name for where this part came from.
|
|
76
|
+
#
|
|
77
|
+
# @return [String, nil]
|
|
78
|
+
optional :key, String
|
|
79
|
+
|
|
80
|
+
# @!method initialize(text:, type:, key: nil)
|
|
81
|
+
# @param text [String] User-authored text to classify.
|
|
82
|
+
#
|
|
83
|
+
# @param type [Symbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember0::Type]
|
|
84
|
+
#
|
|
85
|
+
# @param key [String] Your name for where this part came from.
|
|
86
|
+
|
|
87
|
+
# @see SafetyKit::Models::ContentCreateParams::Content::UnionMember0#type
|
|
88
|
+
module Type
|
|
89
|
+
extend SafetyKit::Internal::Type::Enum
|
|
90
|
+
|
|
91
|
+
TEXT = :text
|
|
92
|
+
|
|
93
|
+
# @!method self.values
|
|
94
|
+
# @return [Array<Symbol>]
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
class UnionMember1 < SafetyKit::Internal::Type::BaseModel
|
|
99
|
+
# @!attribute source
|
|
100
|
+
#
|
|
101
|
+
# @return [SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Source]
|
|
102
|
+
required :source, -> { SafetyKit::ContentCreateParams::Content::UnionMember1::Source }
|
|
103
|
+
|
|
104
|
+
# @!attribute type
|
|
105
|
+
#
|
|
106
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Type]
|
|
107
|
+
required :type, enum: -> { SafetyKit::ContentCreateParams::Content::UnionMember1::Type }
|
|
108
|
+
|
|
109
|
+
# @!attribute key
|
|
110
|
+
# Your name for where this part came from.
|
|
111
|
+
#
|
|
112
|
+
# @return [String, nil]
|
|
113
|
+
optional :key, String
|
|
114
|
+
|
|
115
|
+
# @!method initialize(source:, type:, key: nil)
|
|
116
|
+
# @param source [SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Source]
|
|
117
|
+
#
|
|
118
|
+
# @param type [Symbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Type]
|
|
119
|
+
#
|
|
120
|
+
# @param key [String] Your name for where this part came from.
|
|
121
|
+
|
|
122
|
+
# @see SafetyKit::Models::ContentCreateParams::Content::UnionMember1#source
|
|
123
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
124
|
+
# @!attribute data
|
|
125
|
+
# Base64-encoded image bytes, raw or as a data URI. At most 5MB.
|
|
126
|
+
#
|
|
127
|
+
# @return [String]
|
|
128
|
+
required :data, String
|
|
129
|
+
|
|
130
|
+
# @!attribute type
|
|
131
|
+
#
|
|
132
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Source::Type]
|
|
133
|
+
required :type, enum: -> { SafetyKit::ContentCreateParams::Content::UnionMember1::Source::Type }
|
|
134
|
+
|
|
135
|
+
# @!method initialize(data:, type:)
|
|
136
|
+
# @param data [String] Base64-encoded image bytes, raw or as a data URI. At most 5MB.
|
|
137
|
+
#
|
|
138
|
+
# @param type [Symbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Source::Type]
|
|
139
|
+
|
|
140
|
+
# @see SafetyKit::Models::ContentCreateParams::Content::UnionMember1::Source#type
|
|
141
|
+
module Type
|
|
142
|
+
extend SafetyKit::Internal::Type::Enum
|
|
143
|
+
|
|
144
|
+
BASE64 = :base64
|
|
145
|
+
|
|
146
|
+
# @!method self.values
|
|
147
|
+
# @return [Array<Symbol>]
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# @see SafetyKit::Models::ContentCreateParams::Content::UnionMember1#type
|
|
152
|
+
module Type
|
|
153
|
+
extend SafetyKit::Internal::Type::Enum
|
|
154
|
+
|
|
155
|
+
IMAGE = :image
|
|
156
|
+
|
|
157
|
+
# @!method self.values
|
|
158
|
+
# @return [Array<Symbol>]
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# @!method self.variants
|
|
163
|
+
# @return [Array(SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1)]
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# The API version this operation is defined against.
|
|
167
|
+
module SafetyKitVersion
|
|
168
|
+
extend SafetyKit::Internal::Type::Enum
|
|
169
|
+
|
|
170
|
+
SAFETY_KIT_VERSION_2026_08_11 = :"2026-08-11"
|
|
171
|
+
|
|
172
|
+
# @!method self.values
|
|
173
|
+
# @return [Array<Symbol>]
|
|
174
|
+
end
|
|
56
175
|
end
|
|
57
176
|
end
|
|
58
177
|
end
|
|
@@ -10,19 +10,12 @@ module SafetyKit
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :content_id, String
|
|
12
12
|
|
|
13
|
-
# @!attribute
|
|
14
|
-
# Per-
|
|
13
|
+
# @!attribute labels
|
|
14
|
+
# Per-label results for the submitted content.
|
|
15
15
|
#
|
|
16
|
-
# @return [Array<SafetyKit::Models::ContentCreateResponse::
|
|
17
|
-
required :
|
|
18
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Models::ContentCreateResponse::
|
|
19
|
-
|
|
20
|
-
# @!attribute reference_set_matches
|
|
21
|
-
# Reference set matches found for the submitted content.
|
|
22
|
-
#
|
|
23
|
-
# @return [Array<SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch>]
|
|
24
|
-
required :reference_set_matches,
|
|
25
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch] }
|
|
16
|
+
# @return [Array<SafetyKit::Models::ContentCreateResponse::Label::UnionMember0, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1>]
|
|
17
|
+
required :labels,
|
|
18
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Models::ContentCreateResponse::Label] }
|
|
26
19
|
|
|
27
20
|
# @!attribute user_id
|
|
28
21
|
# The user_id from the request.
|
|
@@ -30,113 +23,217 @@ module SafetyKit
|
|
|
30
23
|
# @return [String]
|
|
31
24
|
required :user_id, String
|
|
32
25
|
|
|
33
|
-
# @!
|
|
26
|
+
# @!attribute version
|
|
27
|
+
# The API version that served this request.
|
|
28
|
+
#
|
|
29
|
+
# @return [String]
|
|
30
|
+
required :version, String
|
|
31
|
+
|
|
32
|
+
# @!method initialize(content_id:, labels:, user_id:, version:)
|
|
34
33
|
# Synchronous classification result for the submitted content.
|
|
35
34
|
#
|
|
36
35
|
# @param content_id [String] SafetyKit identifier for the classified content.
|
|
37
36
|
#
|
|
38
|
-
# @param
|
|
39
|
-
#
|
|
40
|
-
# @param reference_set_matches [Array<SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch>] Reference set matches found for the submitted content.
|
|
37
|
+
# @param labels [Array<SafetyKit::Models::ContentCreateResponse::Label::UnionMember0, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1>] Per-label results for the submitted content.
|
|
41
38
|
#
|
|
42
39
|
# @param user_id [String] The user_id from the request.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
#
|
|
103
|
-
#
|
|
40
|
+
#
|
|
41
|
+
# @param version [String] The API version that served this request.
|
|
42
|
+
|
|
43
|
+
# Result for one label evaluated against the submitted content.
|
|
44
|
+
module Label
|
|
45
|
+
extend SafetyKit::Internal::Type::Union
|
|
46
|
+
|
|
47
|
+
variant -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember0 }
|
|
48
|
+
|
|
49
|
+
variant -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember1 }
|
|
50
|
+
|
|
51
|
+
class UnionMember0 < SafetyKit::Internal::Type::BaseModel
|
|
52
|
+
# @!attribute decision
|
|
53
|
+
# Whether the submitted content matches the label.
|
|
54
|
+
#
|
|
55
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Decision]
|
|
56
|
+
required :decision, enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Decision }
|
|
57
|
+
|
|
58
|
+
# @!attribute escalation
|
|
59
|
+
# Escalation outcome for this label.
|
|
60
|
+
#
|
|
61
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Escalation]
|
|
62
|
+
required :escalation,
|
|
63
|
+
enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Escalation }
|
|
64
|
+
|
|
65
|
+
# @!attribute label
|
|
66
|
+
# Label identifier.
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
required :label, String
|
|
70
|
+
|
|
71
|
+
# @!attribute score
|
|
72
|
+
# Classifier score between 0 and 1. Higher means more likely matching. Null when
|
|
73
|
+
# no classifier scored the label.
|
|
74
|
+
#
|
|
75
|
+
# @return [Float, nil]
|
|
76
|
+
required :score, Float, nil?: true
|
|
77
|
+
|
|
78
|
+
# @!attribute type
|
|
79
|
+
#
|
|
80
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Type]
|
|
81
|
+
required :type, enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Type }
|
|
82
|
+
|
|
83
|
+
# @!method initialize(decision:, escalation:, label:, score:, type:)
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {SafetyKit::Models::ContentCreateResponse::Label::UnionMember0} for more
|
|
86
|
+
# details.
|
|
87
|
+
#
|
|
88
|
+
# @param decision [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Decision] Whether the submitted content matches the label.
|
|
89
|
+
#
|
|
90
|
+
# @param escalation [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Escalation] Escalation outcome for this label.
|
|
91
|
+
#
|
|
92
|
+
# @param label [String] Label identifier.
|
|
93
|
+
#
|
|
94
|
+
# @param score [Float, nil] Classifier score between 0 and 1. Higher means more likely matching. Null when n
|
|
95
|
+
#
|
|
96
|
+
# @param type [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Type]
|
|
97
|
+
|
|
98
|
+
# Whether the submitted content matches the label.
|
|
99
|
+
#
|
|
100
|
+
# @see SafetyKit::Models::ContentCreateResponse::Label::UnionMember0#decision
|
|
101
|
+
module Decision
|
|
102
|
+
extend SafetyKit::Internal::Type::Enum
|
|
103
|
+
|
|
104
|
+
MATCH = :match
|
|
105
|
+
NOT_MATCH = :not_match
|
|
106
|
+
REVIEW = :review
|
|
107
|
+
|
|
108
|
+
# @!method self.values
|
|
109
|
+
# @return [Array<Symbol>]
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Escalation outcome for this label.
|
|
113
|
+
#
|
|
114
|
+
# @see SafetyKit::Models::ContentCreateResponse::Label::UnionMember0#escalation
|
|
115
|
+
module Escalation
|
|
116
|
+
extend SafetyKit::Internal::Type::Enum
|
|
117
|
+
|
|
118
|
+
NONE = :none
|
|
119
|
+
COMPLETED = :completed
|
|
120
|
+
ERROR = :error
|
|
121
|
+
|
|
122
|
+
# @!method self.values
|
|
123
|
+
# @return [Array<Symbol>]
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# @see SafetyKit::Models::ContentCreateResponse::Label::UnionMember0#type
|
|
127
|
+
module Type
|
|
128
|
+
extend SafetyKit::Internal::Type::Enum
|
|
129
|
+
|
|
130
|
+
CLASSIFIER = :classifier
|
|
131
|
+
|
|
132
|
+
# @!method self.values
|
|
133
|
+
# @return [Array<Symbol>]
|
|
134
|
+
end
|
|
104
135
|
end
|
|
105
136
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
#
|
|
117
|
-
|
|
137
|
+
class UnionMember1 < SafetyKit::Internal::Type::BaseModel
|
|
138
|
+
# @!attribute decision
|
|
139
|
+
# Whether the submitted content matches the label.
|
|
140
|
+
#
|
|
141
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Decision]
|
|
142
|
+
required :decision, enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Decision }
|
|
143
|
+
|
|
144
|
+
# @!attribute escalation
|
|
145
|
+
# Escalation outcome for this label.
|
|
146
|
+
#
|
|
147
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Escalation]
|
|
148
|
+
required :escalation,
|
|
149
|
+
enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Escalation }
|
|
150
|
+
|
|
151
|
+
# @!attribute label
|
|
152
|
+
#
|
|
153
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Label]
|
|
154
|
+
required :label, enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Label }
|
|
155
|
+
|
|
156
|
+
# @!attribute score
|
|
157
|
+
# Similarity between the submitted content and the matched entry.
|
|
158
|
+
#
|
|
159
|
+
# @return [Float]
|
|
160
|
+
required :score, Float
|
|
161
|
+
|
|
162
|
+
# @!attribute set_id
|
|
163
|
+
# Identifier of the matched reference set.
|
|
164
|
+
#
|
|
165
|
+
# @return [String]
|
|
166
|
+
required :set_id, String
|
|
167
|
+
|
|
168
|
+
# @!attribute type
|
|
169
|
+
#
|
|
170
|
+
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Type]
|
|
171
|
+
required :type, enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Type }
|
|
172
|
+
|
|
173
|
+
# @!method initialize(decision:, escalation:, label:, score:, set_id:, type:)
|
|
174
|
+
# @param decision [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Decision] Whether the submitted content matches the label.
|
|
175
|
+
#
|
|
176
|
+
# @param escalation [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Escalation] Escalation outcome for this label.
|
|
177
|
+
#
|
|
178
|
+
# @param label [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Label]
|
|
179
|
+
#
|
|
180
|
+
# @param score [Float] Similarity between the submitted content and the matched entry.
|
|
181
|
+
#
|
|
182
|
+
# @param set_id [String] Identifier of the matched reference set.
|
|
183
|
+
#
|
|
184
|
+
# @param type [Symbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Type]
|
|
185
|
+
|
|
186
|
+
# Whether the submitted content matches the label.
|
|
187
|
+
#
|
|
188
|
+
# @see SafetyKit::Models::ContentCreateResponse::Label::UnionMember1#decision
|
|
189
|
+
module Decision
|
|
190
|
+
extend SafetyKit::Internal::Type::Enum
|
|
191
|
+
|
|
192
|
+
MATCH = :match
|
|
193
|
+
NOT_MATCH = :not_match
|
|
194
|
+
REVIEW = :review
|
|
195
|
+
|
|
196
|
+
# @!method self.values
|
|
197
|
+
# @return [Array<Symbol>]
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Escalation outcome for this label.
|
|
201
|
+
#
|
|
202
|
+
# @see SafetyKit::Models::ContentCreateResponse::Label::UnionMember1#escalation
|
|
203
|
+
module Escalation
|
|
204
|
+
extend SafetyKit::Internal::Type::Enum
|
|
205
|
+
|
|
206
|
+
NONE = :none
|
|
207
|
+
COMPLETED = :completed
|
|
208
|
+
ERROR = :error
|
|
209
|
+
|
|
210
|
+
# @!method self.values
|
|
211
|
+
# @return [Array<Symbol>]
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# @see SafetyKit::Models::ContentCreateResponse::Label::UnionMember1#label
|
|
215
|
+
module Label
|
|
216
|
+
extend SafetyKit::Internal::Type::Enum
|
|
217
|
+
|
|
218
|
+
REFERENCE_SET_MATCH = :reference_set_match
|
|
219
|
+
|
|
220
|
+
# @!method self.values
|
|
221
|
+
# @return [Array<Symbol>]
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# @see SafetyKit::Models::ContentCreateResponse::Label::UnionMember1#type
|
|
225
|
+
module Type
|
|
226
|
+
extend SafetyKit::Internal::Type::Enum
|
|
227
|
+
|
|
228
|
+
SIMILARITY = :similarity
|
|
229
|
+
|
|
230
|
+
# @!method self.values
|
|
231
|
+
# @return [Array<Symbol>]
|
|
232
|
+
end
|
|
118
233
|
end
|
|
119
|
-
end
|
|
120
234
|
|
|
121
|
-
|
|
122
|
-
#
|
|
123
|
-
# Identifier of the matched reference set.
|
|
124
|
-
#
|
|
125
|
-
# @return [String]
|
|
126
|
-
required :set_id, String
|
|
127
|
-
|
|
128
|
-
# @!attribute similarity
|
|
129
|
-
# Similarity between the submitted content and the matched reference set entry.
|
|
130
|
-
#
|
|
131
|
-
# @return [Float]
|
|
132
|
-
required :similarity, Float
|
|
133
|
-
|
|
134
|
-
# @!method initialize(set_id:, similarity:)
|
|
135
|
-
# Reference set match found for the submitted content.
|
|
136
|
-
#
|
|
137
|
-
# @param set_id [String] Identifier of the matched reference set.
|
|
138
|
-
#
|
|
139
|
-
# @param similarity [Float] Similarity between the submitted content and the matched reference set entry.
|
|
235
|
+
# @!method self.variants
|
|
236
|
+
# @return [Array(SafetyKit::Models::ContentCreateResponse::Label::UnionMember0, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1)]
|
|
140
237
|
end
|
|
141
238
|
end
|
|
142
239
|
end
|
|
@@ -14,10 +14,8 @@ module SafetyKit
|
|
|
14
14
|
required :namespace, String
|
|
15
15
|
|
|
16
16
|
# @!attribute schema
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
# websites), datetime fields, or 'metadata' for fields that should be stored but
|
|
20
|
-
# not indexed. Use display_hint to provide UI rendering hints.
|
|
17
|
+
# New schema to store for this namespace. Omit to leave the existing schema
|
|
18
|
+
# unchanged.
|
|
21
19
|
#
|
|
22
20
|
# @return [Hash{Symbol=>SafetyKit::Models::DataUpdateSettingsParams::Schema}, nil]
|
|
23
21
|
optional :schema, -> { SafetyKit::Internal::Type::HashOf[SafetyKit::DataUpdateSettingsParams::Schema] }
|
|
@@ -35,7 +33,7 @@ module SafetyKit
|
|
|
35
33
|
#
|
|
36
34
|
# @param namespace [String] The namespace to ingest data into
|
|
37
35
|
#
|
|
38
|
-
# @param schema [Hash{Symbol=>SafetyKit::Models::DataUpdateSettingsParams::Schema}]
|
|
36
|
+
# @param schema [Hash{Symbol=>SafetyKit::Models::DataUpdateSettingsParams::Schema}] New schema to store for this namespace. Omit to leave the existing schema unchan
|
|
39
37
|
#
|
|
40
38
|
# @param settings [Hash{Symbol=>Object, nil}] Namespace settings to store, replacing existing settings. Omit to leave existing
|
|
41
39
|
#
|
|
@@ -59,7 +57,7 @@ module SafetyKit
|
|
|
59
57
|
optional :content_type, enum: -> { SafetyKit::DataUpdateSettingsParams::Schema::ContentType }
|
|
60
58
|
|
|
61
59
|
# @!attribute display_hint
|
|
62
|
-
#
|
|
60
|
+
# Optional hint for how this field should be displayed in the UI
|
|
63
61
|
#
|
|
64
62
|
# @return [SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint, nil]
|
|
65
63
|
optional :display_hint, -> { SafetyKit::DataUpdateSettingsParams::Schema::DisplayHint }
|
|
@@ -88,7 +86,7 @@ module SafetyKit
|
|
|
88
86
|
#
|
|
89
87
|
# @param content_type [Symbol, SafetyKit::Models::DataUpdateSettingsParams::Schema::ContentType] The type of content (image_url, video_url, audio_url, website_url, datetime, met
|
|
90
88
|
#
|
|
91
|
-
# @param display_hint [SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint]
|
|
89
|
+
# @param display_hint [SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint] Optional hint for how this field should be displayed in the UI
|
|
92
90
|
#
|
|
93
91
|
# @param field_limit [Integer] Maximum amount of this field to include when sending to AI models. For text fiel
|
|
94
92
|
#
|
|
@@ -137,7 +135,7 @@ module SafetyKit
|
|
|
137
135
|
optional :type, enum: -> { SafetyKit::DataUpdateSettingsParams::Schema::DisplayHint::Type }
|
|
138
136
|
|
|
139
137
|
# @!method initialize(hidden: nil, name: nil, type: nil)
|
|
140
|
-
#
|
|
138
|
+
# Optional hint for how this field should be displayed in the UI
|
|
141
139
|
#
|
|
142
140
|
# @param hidden [Boolean] Hide this field from default UI display.
|
|
143
141
|
#
|