falaai-api 1.21.49 → 1.21.54

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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -38
  3. data/docs/AnalysisApi.md +2 -2
  4. data/docs/DiagnosticParticipant.md +1 -1
  5. data/docs/DiagnosticRequest.md +2 -2
  6. data/docs/DiagnosticResponse.md +3 -1
  7. data/docs/Participant.md +1 -1
  8. data/docs/ParticipantDiagnostic.md +1 -1
  9. data/docs/RiskAuditRequest.md +4 -6
  10. data/docs/SpeechApi.md +3 -3
  11. data/docs/WhatsappApi.md +95 -0
  12. data/docs/WhatsappConversation.md +32 -0
  13. data/docs/WhatsappConversationsResponse.md +28 -0
  14. data/docs/WhatsappMeta.md +50 -0
  15. data/docs/WhatsappSpeaker.md +20 -0
  16. data/docs/WhatsappUsage.md +34 -0
  17. data/docs/index.html +55 -51
  18. data/docs/llms.txt +18 -0
  19. data/docs/robots.txt +4 -0
  20. data/docs/sitemap.xml +8 -0
  21. data/lib/falaai-api/api/analysis_api.rb +1 -1
  22. data/lib/falaai-api/api/email_alerts_api.rb +1 -1
  23. data/lib/falaai-api/api/health_api.rb +1 -1
  24. data/lib/falaai-api/api/speech_api.rb +5 -5
  25. data/lib/falaai-api/api/usage_api.rb +1 -1
  26. data/lib/falaai-api/api/version_api.rb +1 -1
  27. data/lib/falaai-api/api/webhooks_api.rb +1 -1
  28. data/lib/falaai-api/api/whatsapp_api.rb +132 -0
  29. data/lib/falaai-api/api_client.rb +1 -1
  30. data/lib/falaai-api/api_error.rb +1 -1
  31. data/lib/falaai-api/api_model_base.rb +1 -1
  32. data/lib/falaai-api/configuration.rb +1 -1
  33. data/lib/falaai-api/models/audio_event.rb +1 -1
  34. data/lib/falaai-api/models/audio_input_meta.rb +1 -1
  35. data/lib/falaai-api/models/create_email_alert_request.rb +1 -1
  36. data/lib/falaai-api/models/create_webhook_request.rb +1 -1
  37. data/lib/falaai-api/models/diagnostic_analysis_map.rb +1 -1
  38. data/lib/falaai-api/models/diagnostic_audio_event.rb +1 -1
  39. data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +1 -1
  40. data/lib/falaai-api/models/diagnostic_participant.rb +2 -9
  41. data/lib/falaai-api/models/diagnostic_request.rb +5 -12
  42. data/lib/falaai-api/models/diagnostic_response.rb +15 -5
  43. data/lib/falaai-api/models/diagnostic_text_analysis.rb +1 -1
  44. data/lib/falaai-api/models/diagnostic_usage.rb +1 -1
  45. data/lib/falaai-api/models/email_alert_item.rb +1 -1
  46. data/lib/falaai-api/models/email_alert_list_response.rb +1 -1
  47. data/lib/falaai-api/models/email_alert_message_response.rb +1 -1
  48. data/lib/falaai-api/models/email_event.rb +1 -1
  49. data/lib/falaai-api/models/health_response.rb +1 -1
  50. data/lib/falaai-api/models/http_validation_error.rb +1 -1
  51. data/lib/falaai-api/models/location_inner.rb +1 -1
  52. data/lib/falaai-api/models/message_response.rb +1 -1
  53. data/lib/falaai-api/models/participant.rb +2 -2
  54. data/lib/falaai-api/models/participant_diagnostic.rb +2 -19
  55. data/lib/falaai-api/models/risk_audit_analysis_v2.rb +1 -1
  56. data/lib/falaai-api/models/risk_audit_applied_action_v2.rb +1 -1
  57. data/lib/falaai-api/models/risk_audit_audio_event_model_v2.rb +1 -1
  58. data/lib/falaai-api/models/risk_audit_audit_decisions_v2.rb +1 -1
  59. data/lib/falaai-api/models/risk_audit_conversation_scores_v2.rb +1 -1
  60. data/lib/falaai-api/models/risk_audit_detection_item_v2.rb +1 -1
  61. data/lib/falaai-api/models/risk_audit_detections_v2.rb +1 -1
  62. data/lib/falaai-api/models/risk_audit_indexer_v2.rb +1 -1
  63. data/lib/falaai-api/models/risk_audit_meta_v2.rb +1 -1
  64. data/lib/falaai-api/models/risk_audit_participant_v2.rb +1 -1
  65. data/lib/falaai-api/models/risk_audit_participants_v2.rb +1 -1
  66. data/lib/falaai-api/models/risk_audit_request.rb +19 -54
  67. data/lib/falaai-api/models/risk_audit_scores_v2.rb +1 -1
  68. data/lib/falaai-api/models/risk_audit_scoring_explanation_v2.rb +1 -1
  69. data/lib/falaai-api/models/risk_audit_summary_v2.rb +1 -1
  70. data/lib/falaai-api/models/risk_audit_timeline_v2.rb +1 -1
  71. data/lib/falaai-api/models/risk_audit_usage_v2.rb +1 -1
  72. data/lib/falaai-api/models/risk_audit_v2.rb +1 -1
  73. data/lib/falaai-api/models/risk_audit_v2_response.rb +1 -1
  74. data/lib/falaai-api/models/risk_audit_verdict_v2.rb +1 -1
  75. data/lib/falaai-api/models/transcription_response.rb +1 -1
  76. data/lib/falaai-api/models/transcription_usage.rb +1 -1
  77. data/lib/falaai-api/models/update_email_alert_request.rb +1 -1
  78. data/lib/falaai-api/models/update_webhook_request.rb +1 -1
  79. data/lib/falaai-api/models/usage_by_key_item.rb +1 -1
  80. data/lib/falaai-api/models/usage_log_item.rb +1 -1
  81. data/lib/falaai-api/models/usage_log_response.rb +1 -1
  82. data/lib/falaai-api/models/validation_error.rb +1 -1
  83. data/lib/falaai-api/models/version_response.rb +1 -1
  84. data/lib/falaai-api/models/webhook_event.rb +1 -1
  85. data/lib/falaai-api/models/webhook_item.rb +1 -1
  86. data/lib/falaai-api/models/webhook_list_response.rb +1 -1
  87. data/lib/falaai-api/models/whatsapp_conversation.rb +356 -0
  88. data/lib/falaai-api/models/whatsapp_conversations_response.rb +285 -0
  89. data/lib/falaai-api/models/whatsapp_meta.rb +597 -0
  90. data/lib/falaai-api/models/whatsapp_speaker.rb +192 -0
  91. data/lib/falaai-api/models/whatsapp_usage.rb +381 -0
  92. data/lib/falaai-api/version.rb +2 -2
  93. data/lib/falaai-api.rb +7 -1
  94. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd424a4222684b15b8858c2545873748ae0186905e13df8b87edb5b9cc7a0176
4
- data.tar.gz: 36d4614309d8ddeaa0b647fb7a9f141a4ed102fbb7761faafa8b3fb106e3cb54
3
+ metadata.gz: 2124fbb4e1ed6511a5749326aa954da95d70c298e244a5b80dc09c214b66f8d3
4
+ data.tar.gz: ea43b97e08f90260511970b2616066aef0433d0948a512a12e34c36bfa7ba0e2
5
5
  SHA512:
6
- metadata.gz: 4eab457d32570575ae15027dd0e4499330d3aeb7fc6447bc67674c5ace493a6aca993c590155b596efae744bfdb65079f2f631f745bd14e1898e86b61c673926
7
- data.tar.gz: da26196663d8efa3e9f4fa79d124739c698ca455187fd84e510fc6a0c08a41581d7b691cc07595f711a2f95c24cfc71932da0bd9af1a3a3b077a0b4d97757b30
6
+ metadata.gz: 9c41a3551e9c471ff24cdfbd1849ff772af1ed55844834dfb22299d0a6f5f44e5bd7b16f2ac3595db8df0a02d7c62771c53fd0b02982351f883cec089dfe5808
7
+ data.tar.gz: c90657bb08a24f46ca3854bea50be4f6e1a05e60885c3afab871f51925fc238b2b98565456a43d11aa5e3d945081f217f704a9dc1d2696e8eed8b0494d303627
data/README.md CHANGED
@@ -28,23 +28,6 @@ Telegram voice -> your STT -> FalaAI Risk Audit
28
28
  CRM conversation -> FalaAI Risk Audit
29
29
  ```
30
30
 
31
- ## Use the APIs the way you want
32
-
33
- Every FalaAI API is **independent and optional** — chain any subset, in any combination.
34
-
35
- ```mermaid
36
- flowchart LR
37
- A["Audio"] -.->|optional| T["Transcribe"]
38
- T --> X["Text / dialog"]
39
- S["Your own STT / CRM / chat / existing transcript"] --> X
40
- X -.->|optional| D["Diagnostic"]
41
- X -.->|optional| R["Risk Audit"]
42
- D --> O["Structured intelligence + auditable report"]
43
- R --> O
44
- ```
45
-
46
- > Skip **Transcribe** if you already have text. Call only **Diagnostic**, only **Risk Audit**, or both.
47
-
48
31
  ## Install
49
32
 
50
33
  ```bash
@@ -137,10 +120,38 @@ FalaAI API is an **AI conversation-intelligence API** for analyzing customer-ser
137
120
 
138
121
  ## Use cases
139
122
 
140
- - **Contact center / Quality** — audit 100% of conversations instead of a sample.
141
- - **Compliance / Legal** — auditable evidence for audits and disputes.
142
- - **CX / Operations** — risk score, sentiment and reason per conversation.
143
- - **BI / Data** — typed JSON ready for your database or analytics stack.
123
+ - **Contact center / Quality** - audit 100% of conversations instead of a sample.
124
+ - **Compliance / Legal** - auditable evidence for audits and disputes.
125
+ - **CX / Operations** - risk score, sentiment and reason per conversation.
126
+ - **Sales** - analyze sales calls and extract structured outcomes.
127
+ - **BI / Data** - typed JSON ready for your database or analytics stack.
128
+
129
+ ## Why FalaAI
130
+
131
+ - **Audit 100%, not a sample** - every conversation gets a score, not a random QA sample.
132
+ - **Auditable by design** - a compliance risk score with detections/violations and an HTML report you can hand to an auditor.
133
+ - **Credits, not tokens** - you know exactly what each call costs (per second of audio, per character of text, per conversation). Monthly plans + non-expiring top-up packs.
134
+ - **Zero-storage** - audio/text/results are processed and discarded; only usage/audit records remain. TLS in transit + at rest, per-account isolation (multitenancy), LGPD (you are the controller; Action Tec is the processor).
135
+ - **Multilingual** — transcription in **31 languages**, diagnosis in **21 locales**, risk audit and HTML reports in **3** (PT/EN/ES) · **start free** (no card).
136
+ - **B2B ready** - one Enterprise plan serves N clients, no per-user fee (ideal for ISVs).
137
+
138
+ ## Integrations
139
+
140
+ FalaAI is **language-independent** - integrate at **any point** of your pipeline (capture, transcription, analysis or audit). Common ecosystems:
141
+
142
+ | Ecosystem | How |
143
+ |---|---|
144
+ | **PABX / telephony (3CX, Asterisk, Genesys)** | Send the recording to Transcribe, or the transcript to Diagnostic/Risk Audit. |
145
+ | **CRM / ERP (Odoo, Salesforce, SAP Service Cloud, HubSpot)** | Attach the structured JSON (summary, reason, sentiment, risk score) to the record. |
146
+ | **Contact center / QA (Zendesk, Twilio Flex, Take Blip)** | Batch-audit conversations and feed the score into your QA dashboard. |
147
+ | **Chatbots / messaging (WhatsApp, Telegram, Microsoft Teams)** | Extract conversations from an export and analyze them. |
148
+ | **BI / Data** | Typed JSON ready for your warehouse or analytics stack. |
149
+
150
+ > These are **integration examples**, not certified native integrations. Any platform can integrate through **REST / cURL** - the standard, language-independent path. Native ingestion connectors are on the roadmap.
151
+
152
+ ## BYOT - Bring Your Own Transcription
153
+
154
+ Already have speech-to-text (Whisper, Deepgram, AssemblyAI, your own)? **Skip Transcription** and send the text straight to **Diagnostic** and/or **Risk Audit**. You only pay for what you use.
144
155
 
145
156
  ## SDK surface (Ruby)
146
157
 
@@ -151,15 +162,16 @@ FalaAI API is an **AI conversation-intelligence API** for analyzing customer-ser
151
162
  | `HealthApi` | `FalaAI` | `health_check` |
152
163
  | `SpeechApi` | `FalaAI` | `create_transcription_v1_audio_transcriptions_post_with_http_info(...)` |
153
164
  | `AnalysisApi` | `FalaAI` | `create_diagnostic_v1_analyze_diagnostic_post_with_http_info(...)`, `create_risk_audit_v1_analyze_risk_audit_post_with_http_info(...)` |
165
+ | `WhatsappApi` | `FalaAI` | `extract_conversations_v1_whatsapp_extract_conversations_post_with_http_info(...)` |
154
166
  | `UsageApi` / `WebhooksApi` / `EmailAlertsApi` / `VersionApi` | `FalaAI` | management |
155
- | Models | `FalaAI` | `DiagnosticRequest`, `RiskAuditRequest`, `Participant`, `DiagnosticAudioEvent` |
167
+ | Models | `FalaAI` | `DiagnosticRequest`, `RiskAuditRequest`, `Participant`, `DiagnosticAudioEvent`, `WhatsappConversationsResponse` |
156
168
  | `ApiError` | `FalaAI` | HTTP errors |
157
169
 
158
170
  > Model IDs: `falaai-transcribe-1`, `falaai-diagnostic-1`, `falaai-risk-audit-1`.
159
171
 
160
172
  ## Examples
161
173
 
162
- Runnable examples in [`examples/`](./examples): `health.rb`, `transcribe.rb`, `diagnose.rb`, `audit.rb`.
174
+ Runnable examples in [`examples/`](./examples): `health.rb`, `transcribe.rb`, `diagnose.rb`, `audit.rb`, `whatsapp.rb`.
163
175
 
164
176
  ## Authentication
165
177
 
@@ -180,19 +192,6 @@ rescue FalaAI::ApiError => e
180
192
  end
181
193
  ```
182
194
 
183
- ## Where to integrate (this SDK)
184
-
185
- FalaAI is language-independent; this package targets **Ruby** backends.
186
-
187
- | Platform / environment (this SDK's language: **Ruby**) | Integration |
188
- |---|---|
189
- | **Ruby on Rails** apps | `falaai-api` (Ruby) |
190
- | Ruby workers / Sidekiq jobs | `falaai-api` (Ruby) |
191
- | Ruby data pipelines | `falaai-api` (Ruby) |
192
- | Other stacks (3CX, Salesforce, Genesys...) | REST / cURL — [API reference](https://api01-falaai.action.tec.br/docs) (or the SDK for that backend's language) |
193
-
194
- > These are **integration examples**, not certified native integrations. Any platform can integrate through **REST / cURL** — see the [API reference](https://api01-falaai.action.tec.br/docs). Authenticated calls use `Authorization: Bearer fai_<key>`.
195
-
196
195
  ## Production usage
197
196
 
198
197
  - Store API keys in environment variables or a secret manager — never hard-code.
@@ -204,7 +203,7 @@ FalaAI is language-independent; this package targets **Ruby** backends.
204
203
  | Requirement | Version |
205
204
  |---|---|
206
205
  | Ruby | 2.7+ |
207
- | API | v1.21.49 |
206
+ | API | v1.21.54 |
208
207
 
209
208
  ## Documentation
210
209
 
@@ -217,7 +216,7 @@ FalaAI is language-independent; this package targets **Ruby** backends.
217
216
 
218
217
  ## Versioning
219
218
 
220
- Semantic versioning; the SDK version tracks the API version (`1.21.49`). See [CHANGELOG.md](CHANGELOG.md) and [Releases](https://github.com/ActionTecBr/falaai-api-ruby/releases).
219
+ Semantic versioning; the SDK version tracks the API version (`1.21.54`). See [CHANGELOG.md](CHANGELOG.md) and [Releases](https://github.com/ActionTecBr/falaai-api-ruby/releases).
221
220
 
222
221
  ## Security
223
222
 
data/docs/AnalysisApi.md CHANGED
@@ -26,7 +26,7 @@ FalaAI.configure do |config|
26
26
  end
27
27
 
28
28
  api_instance = FalaAI::AnalysisApi.new
29
- diagnostic_request = FalaAI::DiagnosticRequest.new({language: 'language_example', duration_seconds: 3.56}) # DiagnosticRequest |
29
+ diagnostic_request = FalaAI::DiagnosticRequest.new({language: 'language_example'}) # DiagnosticRequest |
30
30
 
31
31
  begin
32
32
  # Analyze a call transcript — 5 parallel analyses
@@ -93,7 +93,7 @@ FalaAI.configure do |config|
93
93
  end
94
94
 
95
95
  api_instance = FalaAI::AnalysisApi.new
96
- risk_audit_request = FalaAI::RiskAuditRequest.new({duration_seconds: 3.56, language: 'language_example', response_language: 'response_language_example'}) # RiskAuditRequest |
96
+ risk_audit_request = FalaAI::RiskAuditRequest.new({dialog: 'dialog_example', duration_seconds: 3.56, language: 'language_example', response_language: 'response_language_example'}) # RiskAuditRequest |
97
97
 
98
98
  begin
99
99
  # Compliance Risk Audit — conversation compliance analysis
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **interlocutor** | **String** | Exact speaker label from the dialog (e.g. &#39;Speaker 1&#39;) | |
8
8
  | **name** | **String** | Participant name (optional) | [optional] |
9
- | **role** | **String** | agent | client | bot | |
9
+ | **role** | **String** | agent | client | bot (optional — omit/empty when unknown) | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -10,8 +10,8 @@
10
10
  | **audio_events** | [**Array&lt;DiagnosticAudioEvent&gt;**](DiagnosticAudioEvent.md) | Detected audio events with timestamps (required when using dialog) | [optional] |
11
11
  | **language** | **String** | Transcript language. Required. Accepted: en-US, pt-BR, es-ES, es-MX, fr-FR, de-DE, it-IT, pt-PT, zh-CN, ja-JP, ko-KR, ar-SA, hi-IN, ru-RU, id-ID, tr-TR, nl-NL, pl-PL, vi-VN, th-TH, en-GB | |
12
12
  | **response_language** | **String** | Language for the analysis results (labels, categories, levels). Can differ from &#39;language&#39; (input). If omitted, uses &#39;language&#39;. Accepted: en-US, es-ES, es-MX, pt-BR, fr-FR, de-DE, it-IT, pt-PT, zh-CN, ja-JP, ko-KR, ar-SA, hi-IN, ru-RU, id-ID, tr-TR, nl-NL, pl-PL, vi-VN, th-TH, en-GB. | [optional] |
13
- | **duration_seconds** | **Float** | Total audio duration in seconds. Required. Max 3h (10800s). | |
14
- | **client_reference_id** | **String** | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9._:-], max 128 chars. Not idempotency. | [optional] |
13
+ | **duration_seconds** | **Float** | Total audio duration in seconds. Optional when using only &#39;text&#39; (ignored — not read/used). Required when using &#39;dialog&#39; (must be &gt;&#x3D; last turn end). Max 3h (10800s). | [optional] |
14
+ | **client_reference_id** | **String** | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9 _/:.-], max 60 chars. Not idempotency. | [optional] |
15
15
  | **call_direction** | **String** | Who originated the call. inbound&#x3D;client called, outbound&#x3D;company called. If omitted, the LLM infers from context. | [optional] |
16
16
  | **participants** | [**Array&lt;DiagnosticParticipant&gt;**](DiagnosticParticipant.md) | Explicit participant roles. If omitted, the LLM infers from the dialog. When provided, used as ground truth (no inference) and echoed in analysis.participants_identified. | [optional] |
17
17
 
@@ -10,6 +10,7 @@
10
10
  | **analysis** | [**DiagnosticAnalysisMap**](DiagnosticAnalysisMap.md) | The 6 conversation analyses (5 + participants) | |
11
11
  | **usage** | [**DiagnosticUsage**](DiagnosticUsage.md) | Usage and processing information | |
12
12
  | **client_reference_id** | **String** | Client-supplied ID echoed verbatim (if provided in request) | [optional] |
13
+ | **html_report** | **String** | Visual HTML report of the diagnosis (base64 gzip). Only present when &#39;dialog&#39; is provided; null for text-only requests. | [optional] |
13
14
 
14
15
  ## Example
15
16
 
@@ -22,7 +23,8 @@ instance = FalaAI::DiagnosticResponse.new(
22
23
  object: null,
23
24
  analysis: null,
24
25
  usage: null,
25
- client_reference_id: null
26
+ client_reference_id: null,
27
+ html_report: null
26
28
  )
27
29
  ```
28
30
 
data/docs/Participant.md CHANGED
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **interlocutor** | **String** | Exact identifier as used in dialog (e.g. &#39;Interlocutor 1&#39;, &#39;Antonio&#39;) | |
8
8
  | **name** | **String** | Participant name (humanizes report, does not affect logic) | [optional] |
9
- | **role** | **String** | Role: agent (human operator), client (customer), bot (IVR/AI) | |
9
+ | **role** | **String** | Role: agent (human operator), client (customer), bot (IVR/AI). Required for risk audit. | |
10
10
 
11
11
  ## Example
12
12
 
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **interlocutor** | **String** | Exact speaker label from the dialog (e.g. &#39;Speaker 1&#39;) | |
8
- | **role** | **String** | Role: agent | client | bot | agent_requester | agent_custodian | |
8
+ | **role** | **String** | Role: agent | client | bot | agent_requester | agent_custodian (null when not informed/inferred) | [optional] |
9
9
  | **name** | **String** | Participant name if mentioned in the dialogue | [optional] |
10
10
  | **confidence** | **String** | high | medium | low | [optional] |
11
11
  | **evidence** | **String** | Exact verbatim quote supporting the role (no timestamps) | [optional] |
@@ -5,16 +5,15 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **model** | **String** | Analysis model. Always &#39;falaai-risk-audit-1&#39; | [optional][default to &#39;falaai-risk-audit-1&#39;] |
8
- | **text** | **String** | Plain transcript (fallback if dialog is empty). At least one of &#39;dialog&#39; or &#39;text&#39; required. Max 300,000 characters | [optional][default to &#39;&#39;] |
9
- | **dialog** | **String** | Diarized transcript with speaker turns. PRIMARY source. Speaker labels accepted (any case): &#39;Speaker N&#39;, &#39;Interlocutor N&#39;, &#39;Hablante N&#39;, &#39;Locutor N&#39;, &#39;Orador N&#39; (space or underscore). Normalized internally to &#39;Speaker N&#39; in the response. Max 300,000 characters | [optional][default to &#39;&#39;] |
8
+ | **dialog** | **String** | Diarized transcript with speaker turns. REQUIRED — risk audit only accepts diarized conversations; plain &#39;text&#39; is not accepted. Speaker labels accepted (any case): &#39;Speaker N&#39;, &#39;Interlocutor N&#39;, &#39;Hablante N&#39;, &#39;Locutor N&#39;, &#39;Orador N&#39; (space or underscore). Normalized internally to &#39;Speaker N&#39; in the response. Max 300,000 characters | |
10
9
  | **audio_events** | [**Array&lt;DiagnosticAudioEvent&gt;**](DiagnosticAudioEvent.md) | Audio events with timestamps (correlated with turns when diarization is present) | [optional] |
11
- | **duration_seconds** | **Float** | Total audio duration in seconds. Required. Max 3h (10800s). | |
10
+ | **duration_seconds** | **Float** | Total audio duration in seconds. Required. Must be &gt;&#x3D; last turn end. Max 3h (10800s). | |
12
11
  | **language** | **String** | Language of the transcript being analyzed. Must match the dialog/text language. Accepted: pt-BR, en-US, es-ES. | |
13
12
  | **response_language** | **String** | Language for analysis results (labels, categories, levels, actions, HTML report). Can differ from &#39;language&#39;. Accepted: pt-BR, en-US, es-ES. | |
14
13
  | **call_direction** | **String** | Who originated the call. inbound&#x3D;client called, outbound&#x3D;company called. If omitted, LLM infers from context. | [optional] |
15
14
  | **participants** | [**Array&lt;Participant&gt;**](Participant.md) | Explicit participant roles. If omitted, LLM infers from dialog (Lei 17). When provided, used as ground truth — no inference. | [optional] |
16
- | **response_format** | **String** | Response format version. v1&#x3D;legacy flat PT-BR, v2&#x3D;structured EN-US blocks. | [optional][default to &#39;v2&#39;] |
17
- | **client_reference_id** | **String** | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9._:-], max 128 chars. Not idempotency. | [optional] |
15
+ | **response_format** | **String** | Response format version. Only &#39;v2&#39; (structured EN-US blocks) is available today. | [optional][default to &#39;v2&#39;] |
16
+ | **client_reference_id** | **String** | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9 _/:.-], max 60 chars. Not idempotency. | [optional] |
18
17
 
19
18
  ## Example
20
19
 
@@ -23,7 +22,6 @@ require 'falaai-api'
23
22
 
24
23
  instance = FalaAI::RiskAuditRequest.new(
25
24
  model: null,
26
- text: null,
27
25
  dialog: null,
28
26
  audio_events: null,
29
27
  duration_seconds: null,
data/docs/SpeechApi.md CHANGED
@@ -29,7 +29,7 @@ file = File.new('/path/to/some/file') # File |
29
29
  opts = {
30
30
  model: 'model_example', # String |
31
31
  language: 'language_example', # String |
32
- client_reference_id: 'client_reference_id_example' # String | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9._:-]. Not idempotency.
32
+ client_reference_id: 'client_reference_id_example' # String | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9 _/:.-], max 60 chars. Not idempotency.
33
33
  }
34
34
 
35
35
  begin
@@ -65,8 +65,8 @@ end
65
65
  | ---- | ---- | ----------- | ----- |
66
66
  | **file** | **File** | | |
67
67
  | **model** | **String** | | [optional][default to &#39;falaai-transcribe-1&#39;] |
68
- | **language** | **String** | | [optional][default to &#39;pt&#39;] |
69
- | **client_reference_id** | **String** | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9._:-]. Not idempotency. | [optional] |
68
+ | **language** | **String** | | [optional] |
69
+ | **client_reference_id** | **String** | Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9 _/:.-], max 60 chars. Not idempotency. | [optional] |
70
70
 
71
71
  ### Return type
72
72
 
@@ -0,0 +1,95 @@
1
+ # FalaAI::WhatsappApi
2
+
3
+ All URIs are relative to *https://api01-falaai.action.tec.br*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**extract_conversations_v1_whatsapp_extract_conversations_post**](WhatsappApi.md#extract_conversations_v1_whatsapp_extract_conversations_post) | **POST** /v1/whatsapp/extractConversations | Extract and segment WhatsApp conversations from an export |
8
+
9
+
10
+ ## extract_conversations_v1_whatsapp_extract_conversations_post
11
+
12
+ > <WhatsappConversationsResponse> extract_conversations_v1_whatsapp_extract_conversations_post(file, start, _end, timezone, date_format, opts)
13
+
14
+ Extract and segment WhatsApp conversations from an export
15
+
16
+ ### Examples
17
+
18
+ ```ruby
19
+ require 'time'
20
+ require 'falaai-api'
21
+ # setup authorization
22
+ FalaAI.configure do |config|
23
+ # Configure Bearer authorization (fai_xxx): ApiKeyAuth
24
+ config.access_token = 'YOUR_BEARER_TOKEN'
25
+ end
26
+
27
+ api_instance = FalaAI::WhatsappApi.new
28
+ file = File.new('/path/to/some/file') # File |
29
+ start = 'start_example' # String |
30
+ _end = '_end_example' # String |
31
+ timezone = 'timezone_example' # String |
32
+ date_format = 'date_format_example' # String |
33
+ opts = {
34
+ gap_minutes: 8.14, # Float |
35
+ min_messages: 56, # Integer |
36
+ voice_note: true, # Boolean | Transcrever mensagens de voz/video gravadas na hora?
37
+ expression: true, # Boolean | Descrever expressoes visuais (figurinha/GIF/imagem)?
38
+ client_reference_id: 'client_reference_id_example' # String |
39
+ }
40
+
41
+ begin
42
+ # Extract and segment WhatsApp conversations from an export
43
+ result = api_instance.extract_conversations_v1_whatsapp_extract_conversations_post(file, start, _end, timezone, date_format, opts)
44
+ p result
45
+ rescue FalaAI::ApiError => e
46
+ puts "Error when calling WhatsappApi->extract_conversations_v1_whatsapp_extract_conversations_post: #{e}"
47
+ end
48
+ ```
49
+
50
+ #### Using the extract_conversations_v1_whatsapp_extract_conversations_post_with_http_info variant
51
+
52
+ This returns an Array which contains the response data, status code and headers.
53
+
54
+ > <Array(<WhatsappConversationsResponse>, Integer, Hash)> extract_conversations_v1_whatsapp_extract_conversations_post_with_http_info(file, start, _end, timezone, date_format, opts)
55
+
56
+ ```ruby
57
+ begin
58
+ # Extract and segment WhatsApp conversations from an export
59
+ data, status_code, headers = api_instance.extract_conversations_v1_whatsapp_extract_conversations_post_with_http_info(file, start, _end, timezone, date_format, opts)
60
+ p status_code # => 2xx
61
+ p headers # => { ... }
62
+ p data # => <WhatsappConversationsResponse>
63
+ rescue FalaAI::ApiError => e
64
+ puts "Error when calling WhatsappApi->extract_conversations_v1_whatsapp_extract_conversations_post_with_http_info: #{e}"
65
+ end
66
+ ```
67
+
68
+ ### Parameters
69
+
70
+ | Name | Type | Description | Notes |
71
+ | ---- | ---- | ----------- | ----- |
72
+ | **file** | **File** | | |
73
+ | **start** | **String** | | |
74
+ | **_end** | **String** | | |
75
+ | **timezone** | **String** | | |
76
+ | **date_format** | **String** | | |
77
+ | **gap_minutes** | **Float** | | [optional][default to 720] |
78
+ | **min_messages** | **Integer** | | [optional][default to 2] |
79
+ | **voice_note** | **Boolean** | Transcrever mensagens de voz/video gravadas na hora? | [optional][default to true] |
80
+ | **expression** | **Boolean** | Descrever expressoes visuais (figurinha/GIF/imagem)? | [optional][default to true] |
81
+ | **client_reference_id** | **String** | | [optional] |
82
+
83
+ ### Return type
84
+
85
+ [**WhatsappConversationsResponse**](WhatsappConversationsResponse.md)
86
+
87
+ ### Authorization
88
+
89
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
90
+
91
+ ### HTTP request headers
92
+
93
+ - **Content-Type**: multipart/form-data
94
+ - **Accept**: application/json
95
+
@@ -0,0 +1,32 @@
1
+ # FalaAI::WhatsappConversation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_id** | **String** | Conversation identifier in the batch | |
8
+ | **first_at** | **String** | Real start (wall-clock, ISO) | |
9
+ | **last_at** | **String** | Real end (wall-clock, ISO) | |
10
+ | **duration_seconds** | **Float** | (last - first) + last turn duration | |
11
+ | **speakers** | [**Array&lt;WhatsappSpeaker&gt;**](WhatsappSpeaker.md) | Speakers of THIS conversation (dynamic) | |
12
+ | **dialog** | **String** | Lines &#39;Speaker N: [HH:MM:SS.mmm - HH:MM:SS.mmm] text&#39; (real offset) | |
13
+ | **message_count** | **Integer** | Number of messages | |
14
+ | **characters** | **Integer** | Total characters of the conversation | |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'falaai-api'
20
+
21
+ instance = FalaAI::WhatsappConversation.new(
22
+ conversation_id: null,
23
+ first_at: null,
24
+ last_at: null,
25
+ duration_seconds: null,
26
+ speakers: null,
27
+ dialog: null,
28
+ message_count: null,
29
+ characters: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,28 @@
1
+ # FalaAI::WhatsappConversationsResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Unique identifier. Prefix &#39;wc-&#39; + UUID | |
8
+ | **object** | **String** | Object type. Always &#39;conversations&#39; | |
9
+ | **usage** | [**WhatsappUsage**](WhatsappUsage.md) | Usage and processing information | |
10
+ | **conversations** | [**Array&lt;WhatsappConversation&gt;**](WhatsappConversation.md) | Segmented conversations | |
11
+ | **client_reference_id** | **String** | Client-supplied ID echoed verbatim (if provided) | [optional] |
12
+ | **meta** | [**WhatsappMeta**](WhatsappMeta.md) | Segmentation parameters and counts | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'falaai-api'
18
+
19
+ instance = FalaAI::WhatsappConversationsResponse.new(
20
+ id: null,
21
+ object: null,
22
+ usage: null,
23
+ conversations: null,
24
+ client_reference_id: null,
25
+ meta: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,50 @@
1
+ # FalaAI::WhatsappMeta
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **file** | **String** | Uploaded file name | |
8
+ | **chat_txt** | **String** | chat.txt entry name inside the export | |
9
+ | **format** | **String** | Detected format: Android | iOS | |
10
+ | **date_format** | **String** | Date order used | |
11
+ | **timezone** | **String** | Timezone informed | |
12
+ | **start** | **String** | Window start (ISO) | |
13
+ | **_end** | **String** | Window end (ISO) | |
14
+ | **gap_minutes** | **Float** | Gap used to split conversations | |
15
+ | **min_messages** | **Integer** | Minimum messages per conversation | |
16
+ | **turns** | **Integer** | Total parsed turns | |
17
+ | **system_lines** | **Integer** | System lines ignored | |
18
+ | **conversations_total** | **Integer** | Conversations before window filter | |
19
+ | **conversations_in_window** | **Integer** | Conversations overlapping the window | |
20
+ | **monologues_dropped** | **Integer** | Single-speaker conversations dropped | |
21
+ | **conversations_selected** | **Integer** | Final conversations returned | |
22
+ | **voice_note** | **Boolean** | Voice/video medias were transcribed | |
23
+ | **expression** | **Boolean** | Visual expressions were described | |
24
+
25
+ ## Example
26
+
27
+ ```ruby
28
+ require 'falaai-api'
29
+
30
+ instance = FalaAI::WhatsappMeta.new(
31
+ file: null,
32
+ chat_txt: null,
33
+ format: null,
34
+ date_format: null,
35
+ timezone: null,
36
+ start: null,
37
+ _end: null,
38
+ gap_minutes: null,
39
+ min_messages: null,
40
+ turns: null,
41
+ system_lines: null,
42
+ conversations_total: null,
43
+ conversations_in_window: null,
44
+ monologues_dropped: null,
45
+ conversations_selected: null,
46
+ voice_note: null,
47
+ expression: null
48
+ )
49
+ ```
50
+
@@ -0,0 +1,20 @@
1
+ # FalaAI::WhatsappSpeaker
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **label** | **String** | Speaker label (e.g. &#39;Speaker 1&#39;) | |
8
+ | **name** | **String** | Participant name from the export | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'falaai-api'
14
+
15
+ instance = FalaAI::WhatsappSpeaker.new(
16
+ label: null,
17
+ name: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,34 @@
1
+ # FalaAI::WhatsappUsage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversations** | **Integer** | Number of conversations returned | |
8
+ | **characters** | **Integer** | Total characters across conversations | |
9
+ | **expressions** | **Integer** | Expression tokens across conversations (sticker/emoji/gif) | |
10
+ | **voice_notes** | **Integer** | Voice notes (PTT) resolved to text | |
11
+ | **conversation_credits** | **Integer** | Credits for conversations (2 each) | |
12
+ | **expression_credits** | **Float** | Credits for expressions (0.2 each) | |
13
+ | **audio_credits** | **Float** | Credits for audio duration (0.2 per second) | |
14
+ | **credits_consumed** | **Integer** | Total credits &#x3D; ceil(conversation_credits + expression_credits + audio_credits) | |
15
+ | **processing_ms** | **Integer** | Total processing time in milliseconds | |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'falaai-api'
21
+
22
+ instance = FalaAI::WhatsappUsage.new(
23
+ conversations: null,
24
+ characters: null,
25
+ expressions: null,
26
+ voice_notes: null,
27
+ conversation_credits: null,
28
+ expression_credits: null,
29
+ audio_credits: null,
30
+ credits_consumed: null,
31
+ processing_ms: null
32
+ )
33
+ ```
34
+