falaai-api 1.21.47
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +205 -0
- data/docs/AnalysisApi.md +147 -0
- data/docs/AudioEvent.md +26 -0
- data/docs/AudioInputMeta.md +26 -0
- data/docs/AuditoriaRiscoAnalysisV2.md +22 -0
- data/docs/AuditoriaRiscoAppliedActionV2.md +32 -0
- data/docs/AuditoriaRiscoAudioEventModelV2.md +22 -0
- data/docs/AuditoriaRiscoAuditDecisionsV2.md +22 -0
- data/docs/AuditoriaRiscoConversationScoresV2.md +38 -0
- data/docs/AuditoriaRiscoDetectionItemV2.md +110 -0
- data/docs/AuditoriaRiscoDetectionsV2.md +26 -0
- data/docs/AuditoriaRiscoIndexerV2.md +18 -0
- data/docs/AuditoriaRiscoMetaV2.md +28 -0
- data/docs/AuditoriaRiscoParticipantV2.md +22 -0
- data/docs/AuditoriaRiscoParticipantsV2.md +26 -0
- data/docs/AuditoriaRiscoRequest.md +38 -0
- data/docs/AuditoriaRiscoScoresV2.md +20 -0
- data/docs/AuditoriaRiscoScoringExplanationV2.md +20 -0
- data/docs/AuditoriaRiscoSummaryV2.md +48 -0
- data/docs/AuditoriaRiscoTimelineV2.md +22 -0
- data/docs/AuditoriaRiscoUsageV2.md +22 -0
- data/docs/AuditoriaRiscoV2.md +46 -0
- data/docs/AuditoriaRiscoV2Response.md +18 -0
- data/docs/AuditoriaRiscoVerdictV2.md +30 -0
- data/docs/CreateEmailAlertRequest.md +22 -0
- data/docs/CreateWebhookRequest.md +24 -0
- data/docs/DiagnosticAnalysisMap.md +28 -0
- data/docs/DiagnosticAudioEvent.md +26 -0
- data/docs/DiagnosticCategoricalAnalysis.md +22 -0
- data/docs/DiagnosticRequest.md +30 -0
- data/docs/DiagnosticResponse.md +28 -0
- data/docs/DiagnosticTextAnalysis.md +18 -0
- data/docs/DiagnosticUsage.md +22 -0
- data/docs/EmailAlertItem.md +32 -0
- data/docs/EmailAlertListResponse.md +22 -0
- data/docs/EmailAlertMessageResponse.md +18 -0
- data/docs/EmailAlertsApi.md +285 -0
- data/docs/EmailEvent.md +15 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +137 -0
- data/docs/HealthResponse.md +28 -0
- data/docs/LocationInner.md +15 -0
- data/docs/MessageResponse.md +18 -0
- data/docs/Participant.md +22 -0
- data/docs/ParticipantDiagnostic.md +26 -0
- data/docs/SpeechApi.md +85 -0
- data/docs/TranscriptionResponse.md +49 -0
- data/docs/TranscriptionUsage.md +22 -0
- data/docs/UpdateEmailAlertRequest.md +24 -0
- data/docs/UpdateWebhookRequest.md +26 -0
- data/docs/UsageApi.md +151 -0
- data/docs/UsageByKeyItem.md +26 -0
- data/docs/UsageLogItem.md +28 -0
- data/docs/UsageLogResponse.md +22 -0
- data/docs/ValidationError.md +26 -0
- data/docs/VersionApi.md +72 -0
- data/docs/VersionResponse.md +22 -0
- data/docs/WebhookEvent.md +15 -0
- data/docs/WebhookItem.md +42 -0
- data/docs/WebhookListResponse.md +22 -0
- data/docs/WebhooksApi.md +293 -0
- data/lib/falaai-api/api/analysis_api.rb +158 -0
- data/lib/falaai-api/api/email_alerts_api.rb +294 -0
- data/lib/falaai-api/api/health_api.rb +132 -0
- data/lib/falaai-api/api/speech_api.rb +100 -0
- data/lib/falaai-api/api/usage_api.rb +156 -0
- data/lib/falaai-api/api/version_api.rb +77 -0
- data/lib/falaai-api/api/webhooks_api.rb +302 -0
- data/lib/falaai-api/api_client.rb +397 -0
- data/lib/falaai-api/api_error.rb +58 -0
- data/lib/falaai-api/api_model_base.rb +88 -0
- data/lib/falaai-api/configuration.rb +309 -0
- data/lib/falaai-api/models/audio_event.rb +273 -0
- data/lib/falaai-api/models/audio_input_meta.rb +273 -0
- data/lib/falaai-api/models/auditoria_risco_analysis_v2.rb +174 -0
- data/lib/falaai-api/models/auditoria_risco_applied_action_v2.rb +292 -0
- data/lib/falaai-api/models/auditoria_risco_audio_event_model_v2.rb +174 -0
- data/lib/falaai-api/models/auditoria_risco_audit_decisions_v2.rb +170 -0
- data/lib/falaai-api/models/auditoria_risco_conversation_scores_v2.rb +251 -0
- data/lib/falaai-api/models/auditoria_risco_detection_item_v2.rb +651 -0
- data/lib/falaai-api/models/auditoria_risco_detections_v2.rb +198 -0
- data/lib/falaai-api/models/auditoria_risco_indexer_v2.rb +150 -0
- data/lib/falaai-api/models/auditoria_risco_meta_v2.rb +234 -0
- data/lib/falaai-api/models/auditoria_risco_participant_v2.rb +168 -0
- data/lib/falaai-api/models/auditoria_risco_participants_v2.rb +196 -0
- data/lib/falaai-api/models/auditoria_risco_request.rb +451 -0
- data/lib/falaai-api/models/auditoria_risco_scores_v2.rb +177 -0
- data/lib/falaai-api/models/auditoria_risco_scoring_explanation_v2.rb +160 -0
- data/lib/falaai-api/models/auditoria_risco_summary_v2.rb +300 -0
- data/lib/falaai-api/models/auditoria_risco_timeline_v2.rb +174 -0
- data/lib/falaai-api/models/auditoria_risco_usage_v2.rb +219 -0
- data/lib/falaai-api/models/auditoria_risco_v2.rb +548 -0
- data/lib/falaai-api/models/auditoria_risco_v2_response.rb +165 -0
- data/lib/falaai-api/models/auditoria_risco_verdict_v2.rb +213 -0
- data/lib/falaai-api/models/create_email_alert_request.rb +221 -0
- data/lib/falaai-api/models/create_webhook_request.rb +233 -0
- data/lib/falaai-api/models/diagnostic_analysis_map.rb +285 -0
- data/lib/falaai-api/models/diagnostic_audio_event.rb +205 -0
- data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +170 -0
- data/lib/falaai-api/models/diagnostic_request.rb +316 -0
- data/lib/falaai-api/models/diagnostic_response.rb +283 -0
- data/lib/falaai-api/models/diagnostic_text_analysis.rb +148 -0
- data/lib/falaai-api/models/diagnostic_usage.rb +219 -0
- data/lib/falaai-api/models/email_alert_item.rb +356 -0
- data/lib/falaai-api/models/email_alert_list_response.rb +218 -0
- data/lib/falaai-api/models/email_alert_message_response.rb +165 -0
- data/lib/falaai-api/models/email_event.rb +47 -0
- data/lib/falaai-api/models/health_response.rb +300 -0
- data/lib/falaai-api/models/http_validation_error.rb +149 -0
- data/lib/falaai-api/models/location_inner.rb +103 -0
- data/lib/falaai-api/models/message_response.rb +165 -0
- data/lib/falaai-api/models/participant.rb +226 -0
- data/lib/falaai-api/models/participant_diagnostic.rb +222 -0
- data/lib/falaai-api/models/transcription_response.rb +540 -0
- data/lib/falaai-api/models/transcription_usage.rb +219 -0
- data/lib/falaai-api/models/update_email_alert_request.rb +176 -0
- data/lib/falaai-api/models/update_webhook_request.rb +190 -0
- data/lib/falaai-api/models/usage_by_key_item.rb +256 -0
- data/lib/falaai-api/models/usage_log_item.rb +300 -0
- data/lib/falaai-api/models/usage_log_response.rb +218 -0
- data/lib/falaai-api/models/validation_error.rb +237 -0
- data/lib/falaai-api/models/version_response.rb +219 -0
- data/lib/falaai-api/models/webhook_event.rb +48 -0
- data/lib/falaai-api/models/webhook_item.rb +442 -0
- data/lib/falaai-api/models/webhook_list_response.rb +218 -0
- data/lib/falaai-api/version.rb +15 -0
- data/lib/falaai-api.rb +100 -0
- metadata +229 -0
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#FalaAI API
|
|
3
|
+
|
|
4
|
+
#Transcribe, diagnose and score calls with 3 simple endpoints. **Endpoints:** - `POST /v1/audio/transcriptions` — Audio to text - `POST /v1/analyze/diagnostic` — Conversation analysis - `POST /v1/analyze/auditoriaRisco` — Compliance audit **Complete flow (Python):** ```python import httpx API = 'https://api.fala.ai' KEY = 'fai_xxx' HD = {'Authorization': f'Bearer {KEY}'} # 1. Transcribe files = {'file': open('call.mp3', 'rb')} resp = httpx.post(f'{API}/v1/audio/transcriptions', headers=HD, files=files, data={'model': 'falaai-transcribe-1', 'language': 'pt'}) tr = resp.json() print(f'Text: {tr[\"text\"][:100]}...') # 2. Diagnose resp = httpx.post(f'{API}/v1/analyze/diagnostic', headers=HD, json={'dialog': tr['dialog'], 'language': 'pt-BR', 'duration_seconds': tr['duration_seconds']}) diag = resp.json() print(f'Sentiment: {diag[\"analysis\"][\"sentiment\"][\"list_choice\"]}') print(f'Summary: {diag[\"analysis\"][\"dialogue_summary\"][\"explanation\"][:100]}...') # 3. Audit resp = httpx.post(f'{API}/v1/analyze/auditoriaRisco', headers=HD, json={'dialogo': tr['dialog'], 'duration_seconds': tr['duration_seconds']}) audit = resp.json() print(f'Score: {audit[\"audit_score\"]} | Verdict: {audit[\"verdict\"]}') print(f'Detections: {audit[\"total_detections\"]} | Violations: {len(audit[\"violations\"])} | Positives: {len(audit[\"positives\"])}') ``` **Authentication:** All endpoints require an API Key in the `Authorization` header: `Bearer fai_xxx` Get your API Key at [falaai.action.tec.br/api](https://falaai.action.tec.br/api)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.21.47
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module FalaAI
|
|
17
|
+
class AuditoriaRiscoDetectionItemV2 < ApiModelBase
|
|
18
|
+
# Turn number
|
|
19
|
+
attr_accessor :turn
|
|
20
|
+
|
|
21
|
+
# Speaker
|
|
22
|
+
attr_accessor :interlocutor
|
|
23
|
+
|
|
24
|
+
# Role
|
|
25
|
+
attr_accessor :role
|
|
26
|
+
|
|
27
|
+
# Start (s)
|
|
28
|
+
attr_accessor :timestamp_start_s
|
|
29
|
+
|
|
30
|
+
# End (s)
|
|
31
|
+
attr_accessor :timestamp_end_s
|
|
32
|
+
|
|
33
|
+
# Formatted timestamp
|
|
34
|
+
attr_accessor :timestamp_formatted
|
|
35
|
+
|
|
36
|
+
# Detected term
|
|
37
|
+
attr_accessor :term_text
|
|
38
|
+
|
|
39
|
+
# Suggested term for bank
|
|
40
|
+
attr_accessor :suggested_term_for_bank
|
|
41
|
+
|
|
42
|
+
# Category code
|
|
43
|
+
attr_accessor :category
|
|
44
|
+
|
|
45
|
+
# Category label (i18n)
|
|
46
|
+
attr_accessor :category_label
|
|
47
|
+
|
|
48
|
+
# Category color
|
|
49
|
+
attr_accessor :category_color
|
|
50
|
+
|
|
51
|
+
# Category icon
|
|
52
|
+
attr_accessor :category_icon
|
|
53
|
+
|
|
54
|
+
# Criticality
|
|
55
|
+
attr_accessor :criticality
|
|
56
|
+
|
|
57
|
+
# Category threshold
|
|
58
|
+
attr_accessor :category_threshold
|
|
59
|
+
|
|
60
|
+
# Category type
|
|
61
|
+
attr_accessor :category_type
|
|
62
|
+
|
|
63
|
+
# Category group label (i18n)
|
|
64
|
+
attr_accessor :category_group
|
|
65
|
+
|
|
66
|
+
# Nature
|
|
67
|
+
attr_accessor :nature
|
|
68
|
+
|
|
69
|
+
# LLM confidence
|
|
70
|
+
attr_accessor :llm_confidence
|
|
71
|
+
|
|
72
|
+
# Reason
|
|
73
|
+
attr_accessor :reason
|
|
74
|
+
|
|
75
|
+
# Valid context
|
|
76
|
+
attr_accessor :is_valid_context
|
|
77
|
+
|
|
78
|
+
# Risk probability
|
|
79
|
+
attr_accessor :risk_probability
|
|
80
|
+
|
|
81
|
+
# Risk impact
|
|
82
|
+
attr_accessor :risk_impact
|
|
83
|
+
|
|
84
|
+
# Category weight
|
|
85
|
+
attr_accessor :category_weight
|
|
86
|
+
|
|
87
|
+
# Turn sentiment
|
|
88
|
+
attr_accessor :turn_sentiment
|
|
89
|
+
|
|
90
|
+
# Intensity
|
|
91
|
+
attr_accessor :intensity
|
|
92
|
+
|
|
93
|
+
# Total modifier applied
|
|
94
|
+
attr_accessor :mod_applied
|
|
95
|
+
|
|
96
|
+
# Audio modifier applied
|
|
97
|
+
attr_accessor :mac_applied
|
|
98
|
+
|
|
99
|
+
# Intensity modifier applied
|
|
100
|
+
attr_accessor :mvad_applied
|
|
101
|
+
|
|
102
|
+
# Modifier formula
|
|
103
|
+
attr_accessor :mod_formula
|
|
104
|
+
|
|
105
|
+
# MAC details
|
|
106
|
+
attr_accessor :mac_details
|
|
107
|
+
|
|
108
|
+
# Calibration reason
|
|
109
|
+
attr_accessor :calibration_reason
|
|
110
|
+
|
|
111
|
+
# Final score
|
|
112
|
+
attr_accessor :final_score
|
|
113
|
+
|
|
114
|
+
# Final score formula
|
|
115
|
+
attr_accessor :final_score_formula
|
|
116
|
+
|
|
117
|
+
# Conversation limit
|
|
118
|
+
attr_accessor :conversation_limit
|
|
119
|
+
|
|
120
|
+
# Apply saturation
|
|
121
|
+
attr_accessor :apply_saturation
|
|
122
|
+
|
|
123
|
+
# Block repetition
|
|
124
|
+
attr_accessor :block_repetition
|
|
125
|
+
|
|
126
|
+
# Status
|
|
127
|
+
attr_accessor :status
|
|
128
|
+
|
|
129
|
+
# Effective impact
|
|
130
|
+
attr_accessor :effective_impact
|
|
131
|
+
|
|
132
|
+
# Saturation factor
|
|
133
|
+
attr_accessor :saturation_factor
|
|
134
|
+
|
|
135
|
+
# Saturation formula
|
|
136
|
+
attr_accessor :saturation_formula
|
|
137
|
+
|
|
138
|
+
# Threshold formula
|
|
139
|
+
attr_accessor :threshold_formula
|
|
140
|
+
|
|
141
|
+
# Blocked formula
|
|
142
|
+
attr_accessor :blocked_formula
|
|
143
|
+
|
|
144
|
+
# Reconciliation note
|
|
145
|
+
attr_accessor :reconciliation_note
|
|
146
|
+
|
|
147
|
+
# Violated frameworks
|
|
148
|
+
attr_accessor :violated_frameworks
|
|
149
|
+
|
|
150
|
+
# Citation fidelity
|
|
151
|
+
attr_accessor :citation_fidelity
|
|
152
|
+
|
|
153
|
+
# Subcategory code
|
|
154
|
+
attr_accessor :subcategory
|
|
155
|
+
|
|
156
|
+
# Subcategory label (i18n)
|
|
157
|
+
attr_accessor :subcategory_label
|
|
158
|
+
|
|
159
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
160
|
+
def self.attribute_map
|
|
161
|
+
{
|
|
162
|
+
:'turn' => :'turn',
|
|
163
|
+
:'interlocutor' => :'interlocutor',
|
|
164
|
+
:'role' => :'role',
|
|
165
|
+
:'timestamp_start_s' => :'timestamp_start_s',
|
|
166
|
+
:'timestamp_end_s' => :'timestamp_end_s',
|
|
167
|
+
:'timestamp_formatted' => :'timestamp_formatted',
|
|
168
|
+
:'term_text' => :'term_text',
|
|
169
|
+
:'suggested_term_for_bank' => :'suggested_term_for_bank',
|
|
170
|
+
:'category' => :'category',
|
|
171
|
+
:'category_label' => :'category_label',
|
|
172
|
+
:'category_color' => :'category_color',
|
|
173
|
+
:'category_icon' => :'category_icon',
|
|
174
|
+
:'criticality' => :'criticality',
|
|
175
|
+
:'category_threshold' => :'category_threshold',
|
|
176
|
+
:'category_type' => :'category_type',
|
|
177
|
+
:'category_group' => :'category_group',
|
|
178
|
+
:'nature' => :'nature',
|
|
179
|
+
:'llm_confidence' => :'llm_confidence',
|
|
180
|
+
:'reason' => :'reason',
|
|
181
|
+
:'is_valid_context' => :'is_valid_context',
|
|
182
|
+
:'risk_probability' => :'risk_probability',
|
|
183
|
+
:'risk_impact' => :'risk_impact',
|
|
184
|
+
:'category_weight' => :'category_weight',
|
|
185
|
+
:'turn_sentiment' => :'turn_sentiment',
|
|
186
|
+
:'intensity' => :'intensity',
|
|
187
|
+
:'mod_applied' => :'mod_applied',
|
|
188
|
+
:'mac_applied' => :'mac_applied',
|
|
189
|
+
:'mvad_applied' => :'mvad_applied',
|
|
190
|
+
:'mod_formula' => :'mod_formula',
|
|
191
|
+
:'mac_details' => :'mac_details',
|
|
192
|
+
:'calibration_reason' => :'calibration_reason',
|
|
193
|
+
:'final_score' => :'final_score',
|
|
194
|
+
:'final_score_formula' => :'final_score_formula',
|
|
195
|
+
:'conversation_limit' => :'conversation_limit',
|
|
196
|
+
:'apply_saturation' => :'apply_saturation',
|
|
197
|
+
:'block_repetition' => :'block_repetition',
|
|
198
|
+
:'status' => :'status',
|
|
199
|
+
:'effective_impact' => :'effective_impact',
|
|
200
|
+
:'saturation_factor' => :'saturation_factor',
|
|
201
|
+
:'saturation_formula' => :'saturation_formula',
|
|
202
|
+
:'threshold_formula' => :'threshold_formula',
|
|
203
|
+
:'blocked_formula' => :'blocked_formula',
|
|
204
|
+
:'reconciliation_note' => :'reconciliation_note',
|
|
205
|
+
:'violated_frameworks' => :'violated_frameworks',
|
|
206
|
+
:'citation_fidelity' => :'citation_fidelity',
|
|
207
|
+
:'subcategory' => :'subcategory',
|
|
208
|
+
:'subcategory_label' => :'subcategory_label'
|
|
209
|
+
}
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns attribute mapping this model knows about
|
|
213
|
+
def self.acceptable_attribute_map
|
|
214
|
+
attribute_map
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Returns all the JSON keys this model knows about
|
|
218
|
+
def self.acceptable_attributes
|
|
219
|
+
acceptable_attribute_map.values
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Attribute type mapping.
|
|
223
|
+
def self.openapi_types
|
|
224
|
+
{
|
|
225
|
+
:'turn' => :'Integer',
|
|
226
|
+
:'interlocutor' => :'String',
|
|
227
|
+
:'role' => :'String',
|
|
228
|
+
:'timestamp_start_s' => :'Float',
|
|
229
|
+
:'timestamp_end_s' => :'Float',
|
|
230
|
+
:'timestamp_formatted' => :'String',
|
|
231
|
+
:'term_text' => :'String',
|
|
232
|
+
:'suggested_term_for_bank' => :'Object',
|
|
233
|
+
:'category' => :'String',
|
|
234
|
+
:'category_label' => :'String',
|
|
235
|
+
:'category_color' => :'String',
|
|
236
|
+
:'category_icon' => :'String',
|
|
237
|
+
:'criticality' => :'String',
|
|
238
|
+
:'category_threshold' => :'Float',
|
|
239
|
+
:'category_type' => :'String',
|
|
240
|
+
:'category_group' => :'String',
|
|
241
|
+
:'nature' => :'String',
|
|
242
|
+
:'llm_confidence' => :'Float',
|
|
243
|
+
:'reason' => :'String',
|
|
244
|
+
:'is_valid_context' => :'Boolean',
|
|
245
|
+
:'risk_probability' => :'Float',
|
|
246
|
+
:'risk_impact' => :'Float',
|
|
247
|
+
:'category_weight' => :'Float',
|
|
248
|
+
:'turn_sentiment' => :'String',
|
|
249
|
+
:'intensity' => :'Object',
|
|
250
|
+
:'mod_applied' => :'Float',
|
|
251
|
+
:'mac_applied' => :'Float',
|
|
252
|
+
:'mvad_applied' => :'Float',
|
|
253
|
+
:'mod_formula' => :'String',
|
|
254
|
+
:'mac_details' => :'Array<Hash<String, Object>>',
|
|
255
|
+
:'calibration_reason' => :'String',
|
|
256
|
+
:'final_score' => :'Float',
|
|
257
|
+
:'final_score_formula' => :'String',
|
|
258
|
+
:'conversation_limit' => :'Object',
|
|
259
|
+
:'apply_saturation' => :'Boolean',
|
|
260
|
+
:'block_repetition' => :'Boolean',
|
|
261
|
+
:'status' => :'String',
|
|
262
|
+
:'effective_impact' => :'Float',
|
|
263
|
+
:'saturation_factor' => :'Float',
|
|
264
|
+
:'saturation_formula' => :'String',
|
|
265
|
+
:'threshold_formula' => :'String',
|
|
266
|
+
:'blocked_formula' => :'String',
|
|
267
|
+
:'reconciliation_note' => :'String',
|
|
268
|
+
:'violated_frameworks' => :'Array<Object>',
|
|
269
|
+
:'citation_fidelity' => :'Boolean',
|
|
270
|
+
:'subcategory' => :'String',
|
|
271
|
+
:'subcategory_label' => :'String'
|
|
272
|
+
}
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# List of attributes with nullable: true
|
|
276
|
+
def self.openapi_nullable
|
|
277
|
+
Set.new([
|
|
278
|
+
:'suggested_term_for_bank',
|
|
279
|
+
:'intensity',
|
|
280
|
+
:'conversation_limit',
|
|
281
|
+
])
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Initializes the object
|
|
285
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
286
|
+
def initialize(attributes = {})
|
|
287
|
+
if (!attributes.is_a?(Hash))
|
|
288
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FalaAI::AuditoriaRiscoDetectionItemV2` initialize method"
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
292
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
293
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
294
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
295
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FalaAI::AuditoriaRiscoDetectionItemV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
296
|
+
end
|
|
297
|
+
h[k.to_sym] = v
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if attributes.key?(:'turn')
|
|
301
|
+
self.turn = attributes[:'turn']
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if attributes.key?(:'interlocutor')
|
|
305
|
+
self.interlocutor = attributes[:'interlocutor']
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'role')
|
|
309
|
+
self.role = attributes[:'role']
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
if attributes.key?(:'timestamp_start_s')
|
|
313
|
+
self.timestamp_start_s = attributes[:'timestamp_start_s']
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
if attributes.key?(:'timestamp_end_s')
|
|
317
|
+
self.timestamp_end_s = attributes[:'timestamp_end_s']
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
if attributes.key?(:'timestamp_formatted')
|
|
321
|
+
self.timestamp_formatted = attributes[:'timestamp_formatted']
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if attributes.key?(:'term_text')
|
|
325
|
+
self.term_text = attributes[:'term_text']
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
if attributes.key?(:'suggested_term_for_bank')
|
|
329
|
+
self.suggested_term_for_bank = attributes[:'suggested_term_for_bank']
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
if attributes.key?(:'category')
|
|
333
|
+
self.category = attributes[:'category']
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
if attributes.key?(:'category_label')
|
|
337
|
+
self.category_label = attributes[:'category_label']
|
|
338
|
+
else
|
|
339
|
+
self.category_label = nil
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if attributes.key?(:'category_color')
|
|
343
|
+
self.category_color = attributes[:'category_color']
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if attributes.key?(:'category_icon')
|
|
347
|
+
self.category_icon = attributes[:'category_icon']
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
if attributes.key?(:'criticality')
|
|
351
|
+
self.criticality = attributes[:'criticality']
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
if attributes.key?(:'category_threshold')
|
|
355
|
+
self.category_threshold = attributes[:'category_threshold']
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if attributes.key?(:'category_type')
|
|
359
|
+
self.category_type = attributes[:'category_type']
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if attributes.key?(:'category_group')
|
|
363
|
+
self.category_group = attributes[:'category_group']
|
|
364
|
+
else
|
|
365
|
+
self.category_group = nil
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
if attributes.key?(:'nature')
|
|
369
|
+
self.nature = attributes[:'nature']
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
if attributes.key?(:'llm_confidence')
|
|
373
|
+
self.llm_confidence = attributes[:'llm_confidence']
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
if attributes.key?(:'reason')
|
|
377
|
+
self.reason = attributes[:'reason']
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
if attributes.key?(:'is_valid_context')
|
|
381
|
+
self.is_valid_context = attributes[:'is_valid_context']
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
if attributes.key?(:'risk_probability')
|
|
385
|
+
self.risk_probability = attributes[:'risk_probability']
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
if attributes.key?(:'risk_impact')
|
|
389
|
+
self.risk_impact = attributes[:'risk_impact']
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
if attributes.key?(:'category_weight')
|
|
393
|
+
self.category_weight = attributes[:'category_weight']
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
if attributes.key?(:'turn_sentiment')
|
|
397
|
+
self.turn_sentiment = attributes[:'turn_sentiment']
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
if attributes.key?(:'intensity')
|
|
401
|
+
self.intensity = attributes[:'intensity']
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
if attributes.key?(:'mod_applied')
|
|
405
|
+
self.mod_applied = attributes[:'mod_applied']
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
if attributes.key?(:'mac_applied')
|
|
409
|
+
self.mac_applied = attributes[:'mac_applied']
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
if attributes.key?(:'mvad_applied')
|
|
413
|
+
self.mvad_applied = attributes[:'mvad_applied']
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
if attributes.key?(:'mod_formula')
|
|
417
|
+
self.mod_formula = attributes[:'mod_formula']
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
if attributes.key?(:'mac_details')
|
|
421
|
+
if (value = attributes[:'mac_details']).is_a?(Array)
|
|
422
|
+
self.mac_details = value
|
|
423
|
+
end
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
if attributes.key?(:'calibration_reason')
|
|
427
|
+
self.calibration_reason = attributes[:'calibration_reason']
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
if attributes.key?(:'final_score')
|
|
431
|
+
self.final_score = attributes[:'final_score']
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
if attributes.key?(:'final_score_formula')
|
|
435
|
+
self.final_score_formula = attributes[:'final_score_formula']
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
if attributes.key?(:'conversation_limit')
|
|
439
|
+
self.conversation_limit = attributes[:'conversation_limit']
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
if attributes.key?(:'apply_saturation')
|
|
443
|
+
self.apply_saturation = attributes[:'apply_saturation']
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
if attributes.key?(:'block_repetition')
|
|
447
|
+
self.block_repetition = attributes[:'block_repetition']
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
if attributes.key?(:'status')
|
|
451
|
+
self.status = attributes[:'status']
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
if attributes.key?(:'effective_impact')
|
|
455
|
+
self.effective_impact = attributes[:'effective_impact']
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
if attributes.key?(:'saturation_factor')
|
|
459
|
+
self.saturation_factor = attributes[:'saturation_factor']
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
if attributes.key?(:'saturation_formula')
|
|
463
|
+
self.saturation_formula = attributes[:'saturation_formula']
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
if attributes.key?(:'threshold_formula')
|
|
467
|
+
self.threshold_formula = attributes[:'threshold_formula']
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
if attributes.key?(:'blocked_formula')
|
|
471
|
+
self.blocked_formula = attributes[:'blocked_formula']
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
if attributes.key?(:'reconciliation_note')
|
|
475
|
+
self.reconciliation_note = attributes[:'reconciliation_note']
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
if attributes.key?(:'violated_frameworks')
|
|
479
|
+
if (value = attributes[:'violated_frameworks']).is_a?(Array)
|
|
480
|
+
self.violated_frameworks = value
|
|
481
|
+
end
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
if attributes.key?(:'citation_fidelity')
|
|
485
|
+
self.citation_fidelity = attributes[:'citation_fidelity']
|
|
486
|
+
else
|
|
487
|
+
self.citation_fidelity = true
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
if attributes.key?(:'subcategory')
|
|
491
|
+
self.subcategory = attributes[:'subcategory']
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
if attributes.key?(:'subcategory_label')
|
|
495
|
+
self.subcategory_label = attributes[:'subcategory_label']
|
|
496
|
+
end
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
500
|
+
# @return Array for valid properties with the reasons
|
|
501
|
+
def list_invalid_properties
|
|
502
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
503
|
+
invalid_properties = Array.new
|
|
504
|
+
if @category_label.nil?
|
|
505
|
+
invalid_properties.push('invalid value for "category_label", category_label cannot be nil.')
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
if @category_group.nil?
|
|
509
|
+
invalid_properties.push('invalid value for "category_group", category_group cannot be nil.')
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
invalid_properties
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
# Check to see if the all the properties in the model are valid
|
|
516
|
+
# @return true if the model is valid
|
|
517
|
+
def valid?
|
|
518
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
519
|
+
return false if @category_label.nil?
|
|
520
|
+
return false if @category_group.nil?
|
|
521
|
+
true
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
# Custom attribute writer method with validation
|
|
525
|
+
# @param [Object] category_label Value to be assigned
|
|
526
|
+
def category_label=(category_label)
|
|
527
|
+
if category_label.nil?
|
|
528
|
+
fail ArgumentError, 'category_label cannot be nil'
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
@category_label = category_label
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
# Custom attribute writer method with validation
|
|
535
|
+
# @param [Object] category_group Value to be assigned
|
|
536
|
+
def category_group=(category_group)
|
|
537
|
+
if category_group.nil?
|
|
538
|
+
fail ArgumentError, 'category_group cannot be nil'
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
@category_group = category_group
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
# Checks equality by comparing each attribute.
|
|
545
|
+
# @param [Object] Object to be compared
|
|
546
|
+
def ==(o)
|
|
547
|
+
return true if self.equal?(o)
|
|
548
|
+
self.class == o.class &&
|
|
549
|
+
turn == o.turn &&
|
|
550
|
+
interlocutor == o.interlocutor &&
|
|
551
|
+
role == o.role &&
|
|
552
|
+
timestamp_start_s == o.timestamp_start_s &&
|
|
553
|
+
timestamp_end_s == o.timestamp_end_s &&
|
|
554
|
+
timestamp_formatted == o.timestamp_formatted &&
|
|
555
|
+
term_text == o.term_text &&
|
|
556
|
+
suggested_term_for_bank == o.suggested_term_for_bank &&
|
|
557
|
+
category == o.category &&
|
|
558
|
+
category_label == o.category_label &&
|
|
559
|
+
category_color == o.category_color &&
|
|
560
|
+
category_icon == o.category_icon &&
|
|
561
|
+
criticality == o.criticality &&
|
|
562
|
+
category_threshold == o.category_threshold &&
|
|
563
|
+
category_type == o.category_type &&
|
|
564
|
+
category_group == o.category_group &&
|
|
565
|
+
nature == o.nature &&
|
|
566
|
+
llm_confidence == o.llm_confidence &&
|
|
567
|
+
reason == o.reason &&
|
|
568
|
+
is_valid_context == o.is_valid_context &&
|
|
569
|
+
risk_probability == o.risk_probability &&
|
|
570
|
+
risk_impact == o.risk_impact &&
|
|
571
|
+
category_weight == o.category_weight &&
|
|
572
|
+
turn_sentiment == o.turn_sentiment &&
|
|
573
|
+
intensity == o.intensity &&
|
|
574
|
+
mod_applied == o.mod_applied &&
|
|
575
|
+
mac_applied == o.mac_applied &&
|
|
576
|
+
mvad_applied == o.mvad_applied &&
|
|
577
|
+
mod_formula == o.mod_formula &&
|
|
578
|
+
mac_details == o.mac_details &&
|
|
579
|
+
calibration_reason == o.calibration_reason &&
|
|
580
|
+
final_score == o.final_score &&
|
|
581
|
+
final_score_formula == o.final_score_formula &&
|
|
582
|
+
conversation_limit == o.conversation_limit &&
|
|
583
|
+
apply_saturation == o.apply_saturation &&
|
|
584
|
+
block_repetition == o.block_repetition &&
|
|
585
|
+
status == o.status &&
|
|
586
|
+
effective_impact == o.effective_impact &&
|
|
587
|
+
saturation_factor == o.saturation_factor &&
|
|
588
|
+
saturation_formula == o.saturation_formula &&
|
|
589
|
+
threshold_formula == o.threshold_formula &&
|
|
590
|
+
blocked_formula == o.blocked_formula &&
|
|
591
|
+
reconciliation_note == o.reconciliation_note &&
|
|
592
|
+
violated_frameworks == o.violated_frameworks &&
|
|
593
|
+
citation_fidelity == o.citation_fidelity &&
|
|
594
|
+
subcategory == o.subcategory &&
|
|
595
|
+
subcategory_label == o.subcategory_label
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# @see the `==` method
|
|
599
|
+
# @param [Object] Object to be compared
|
|
600
|
+
def eql?(o)
|
|
601
|
+
self == o
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
# Calculates hash code according to all attributes.
|
|
605
|
+
# @return [Integer] Hash code
|
|
606
|
+
def hash
|
|
607
|
+
[turn, interlocutor, role, timestamp_start_s, timestamp_end_s, timestamp_formatted, term_text, suggested_term_for_bank, category, category_label, category_color, category_icon, criticality, category_threshold, category_type, category_group, nature, llm_confidence, reason, is_valid_context, risk_probability, risk_impact, category_weight, turn_sentiment, intensity, mod_applied, mac_applied, mvad_applied, mod_formula, mac_details, calibration_reason, final_score, final_score_formula, conversation_limit, apply_saturation, block_repetition, status, effective_impact, saturation_factor, saturation_formula, threshold_formula, blocked_formula, reconciliation_note, violated_frameworks, citation_fidelity, subcategory, subcategory_label].hash
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
# Builds the object from hash
|
|
611
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
612
|
+
# @return [Object] Returns the model itself
|
|
613
|
+
def self.build_from_hash(attributes)
|
|
614
|
+
return nil unless attributes.is_a?(Hash)
|
|
615
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
616
|
+
transformed_hash = {}
|
|
617
|
+
openapi_types.each_pair do |key, type|
|
|
618
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
619
|
+
transformed_hash["#{key}"] = nil
|
|
620
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
621
|
+
# check to ensure the input is an array given that the attribute
|
|
622
|
+
# is documented as an array but the input is not
|
|
623
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
624
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
625
|
+
end
|
|
626
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
627
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
628
|
+
end
|
|
629
|
+
end
|
|
630
|
+
new(transformed_hash)
|
|
631
|
+
end
|
|
632
|
+
|
|
633
|
+
# Returns the object in the form of hash
|
|
634
|
+
# @return [Hash] Returns the object in the form of hash
|
|
635
|
+
def to_hash
|
|
636
|
+
hash = {}
|
|
637
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
638
|
+
value = self.send(attr)
|
|
639
|
+
if value.nil?
|
|
640
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
641
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
hash[param] = _to_hash(value)
|
|
645
|
+
end
|
|
646
|
+
hash
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
end
|