telnyx 5.163.0 → 5.164.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.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +4 -3
  5. data/lib/telnyx/models/ai/assistant_tool.rb +93 -2
  6. data/lib/telnyx/models/ai/chat_completion_request.rb +35 -1
  7. data/lib/telnyx/models/ai/collections/retrieval_settings.rb +6 -1
  8. data/lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb +30 -1
  9. data/lib/telnyx/models/ai/knowledge/collection_retrieve_documents_params.rb +114 -0
  10. data/lib/telnyx/models/ai/knowledge/collection_retrieve_documents_response.rb +182 -0
  11. data/lib/telnyx/models/ai/openai_create_response_params.rb +42 -1
  12. data/lib/telnyx/models/ai/telephony_settings.rb +16 -1
  13. data/lib/telnyx/models/ai/transcription_settings.rb +6 -1
  14. data/lib/telnyx/models/calls/action_gather_params.rb +2 -1
  15. data/lib/telnyx/models/calls/action_gather_using_audio_params.rb +2 -1
  16. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +2 -1
  17. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +5 -3
  18. data/lib/telnyx/models/calls/transcription_config.rb +6 -1
  19. data/lib/telnyx/models/calls/transcription_engine_cohere_config.rb +78 -0
  20. data/lib/telnyx/models/calls/transcription_start_request.rb +6 -3
  21. data/lib/telnyx/models/conferences/action_gather_dtmf_audio_params.rb +4 -2
  22. data/lib/telnyx/models/phone_numbers/job_list_params.rb +67 -4
  23. data/lib/telnyx/models/sim_card_groups/sim_card_group_action.rb +9 -1
  24. data/lib/telnyx/models/speech_to_text_list_providers_params.rb +1 -0
  25. data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +19 -3
  26. data/lib/telnyx/models/transcription.rb +4 -3
  27. data/lib/telnyx/models/wireless_blocklist.rb +0 -1
  28. data/lib/telnyx/models/wireless_blocklist_create_response.rb +3 -3
  29. data/lib/telnyx/models/wireless_blocklist_list_params.rb +1 -9
  30. data/lib/telnyx/models/wireless_blocklist_retrieve_response.rb +3 -3
  31. data/lib/telnyx/models/wireless_blocklist_update_response.rb +3 -3
  32. data/lib/telnyx/models/wireless_blocklist_value_list_response.rb +15 -45
  33. data/lib/telnyx/models/wireless_wireless_blocklist.rb +73 -0
  34. data/lib/telnyx/models.rb +2 -0
  35. data/lib/telnyx/resources/ai/anthropic/v1.rb +1 -1
  36. data/lib/telnyx/resources/ai/collections.rb +0 -69
  37. data/lib/telnyx/resources/ai/knowledge/collections.rb +92 -0
  38. data/lib/telnyx/resources/ai/knowledge.rb +22 -0
  39. data/lib/telnyx/resources/ai/openai/chat.rb +3 -1
  40. data/lib/telnyx/resources/ai/openai.rb +3 -1
  41. data/lib/telnyx/resources/ai.rb +4 -0
  42. data/lib/telnyx/resources/calls/actions.rb +2 -2
  43. data/lib/telnyx/resources/conferences/actions.rb +1 -1
  44. data/lib/telnyx/resources/phone_numbers/jobs.rb +5 -3
  45. data/lib/telnyx/resources/sim_card_groups/actions.rb +6 -4
  46. data/lib/telnyx/resources/speech_to_text.rb +7 -4
  47. data/lib/telnyx/resources/wireless_blocklist_values.rb +2 -1
  48. data/lib/telnyx/resources/wireless_blocklists.rb +8 -9
  49. data/lib/telnyx/version.rb +1 -1
  50. data/lib/telnyx.rb +6 -3
  51. data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +6 -4
  52. data/rbi/telnyx/models/ai/assistant_tool.rbi +185 -2
  53. data/rbi/telnyx/models/ai/chat_completion_request.rbi +93 -0
  54. data/rbi/telnyx/models/ai/collections/retrieval_settings.rbi +9 -5
  55. data/rbi/telnyx/models/ai/inference_embedding_webhook_tool_params.rbi +48 -0
  56. data/rbi/telnyx/models/ai/knowledge/collection_retrieve_documents_params.rbi +206 -0
  57. data/rbi/telnyx/models/ai/knowledge/collection_retrieve_documents_response.rbi +336 -0
  58. data/rbi/telnyx/models/ai/openai_create_response_params.rbi +130 -0
  59. data/rbi/telnyx/models/ai/telephony_settings.rbi +25 -0
  60. data/rbi/telnyx/models/ai/transcription_settings.rbi +14 -2
  61. data/rbi/telnyx/models/calls/action_gather_params.rbi +4 -2
  62. data/rbi/telnyx/models/calls/action_gather_using_audio_params.rbi +4 -2
  63. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +4 -2
  64. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +8 -4
  65. data/rbi/telnyx/models/calls/transcription_config.rbi +14 -2
  66. data/rbi/telnyx/models/calls/transcription_engine_cohere_config.rbi +204 -0
  67. data/rbi/telnyx/models/calls/transcription_start_request.rbi +10 -0
  68. data/rbi/telnyx/models/conferences/action_gather_dtmf_audio_params.rbi +6 -2
  69. data/rbi/telnyx/models/phone_numbers/job_list_params.rbi +148 -3
  70. data/rbi/telnyx/models/sim_card_groups/sim_card_group_action.rbi +22 -5
  71. data/rbi/telnyx/models/speech_to_text_list_providers_params.rbi +5 -0
  72. data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +41 -2
  73. data/rbi/telnyx/models/transcription.rbi +7 -8
  74. data/rbi/telnyx/models/wireless_blocklist.rbi +2 -2
  75. data/rbi/telnyx/models/wireless_blocklist_create_response.rbi +4 -4
  76. data/rbi/telnyx/models/wireless_blocklist_list_params.rbi +0 -11
  77. data/rbi/telnyx/models/wireless_blocklist_retrieve_response.rbi +4 -4
  78. data/rbi/telnyx/models/wireless_blocklist_update_response.rbi +4 -4
  79. data/rbi/telnyx/models/wireless_blocklist_value_list_response.rbi +16 -52
  80. data/rbi/telnyx/models/wireless_wireless_blocklist.rbi +126 -0
  81. data/rbi/telnyx/models.rbi +2 -0
  82. data/rbi/telnyx/resources/ai/anthropic/v1.rbi +3 -2
  83. data/rbi/telnyx/resources/ai/collections.rbi +0 -77
  84. data/rbi/telnyx/resources/ai/knowledge/collections.rbi +99 -0
  85. data/rbi/telnyx/resources/ai/knowledge.rbi +19 -0
  86. data/rbi/telnyx/resources/ai/openai/chat.rbi +8 -0
  87. data/rbi/telnyx/resources/ai/openai.rbi +3 -0
  88. data/rbi/telnyx/resources/ai.rbi +3 -0
  89. data/rbi/telnyx/resources/calls/actions.rbi +11 -5
  90. data/rbi/telnyx/resources/conferences/actions.rbi +3 -1
  91. data/rbi/telnyx/resources/phone_numbers/jobs.rbi +6 -3
  92. data/rbi/telnyx/resources/sim_card_groups/actions.rbi +6 -4
  93. data/rbi/telnyx/resources/speech_to_text.rbi +11 -3
  94. data/rbi/telnyx/resources/wireless_blocklist_values.rbi +2 -1
  95. data/rbi/telnyx/resources/wireless_blocklists.rbi +7 -9
  96. data/sig/telnyx/models/ai/assistant_tool.rbs +59 -3
  97. data/sig/telnyx/models/ai/chat_completion_request.rbs +26 -0
  98. data/sig/telnyx/models/ai/collections/retrieval_settings.rbs +1 -2
  99. data/sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs +14 -0
  100. data/sig/telnyx/models/ai/knowledge/collection_retrieve_documents_params.rbs +93 -0
  101. data/sig/telnyx/models/ai/knowledge/collection_retrieve_documents_response.rbs +208 -0
  102. data/sig/telnyx/models/ai/openai_create_response_params.rbs +47 -0
  103. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  104. data/sig/telnyx/models/ai/transcription_settings.rbs +2 -0
  105. data/sig/telnyx/models/calls/transcription_config.rbs +2 -0
  106. data/sig/telnyx/models/calls/transcription_engine_cohere_config.rbs +75 -0
  107. data/sig/telnyx/models/calls/transcription_start_request.rbs +3 -0
  108. data/sig/telnyx/models/phone_numbers/job_list_params.rbs +46 -1
  109. data/sig/telnyx/models/sim_card_groups/sim_card_group_action.rbs +14 -3
  110. data/sig/telnyx/models/speech_to_text_list_providers_params.rbs +2 -0
  111. data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +15 -2
  112. data/sig/telnyx/models/transcription.rbs +4 -6
  113. data/sig/telnyx/models/wireless_blocklist_create_response.rbs +7 -5
  114. data/sig/telnyx/models/wireless_blocklist_list_params.rbs +0 -7
  115. data/sig/telnyx/models/wireless_blocklist_retrieve_response.rbs +7 -5
  116. data/sig/telnyx/models/wireless_blocklist_update_response.rbs +7 -5
  117. data/sig/telnyx/models/wireless_blocklist_value_list_response.rbs +16 -35
  118. data/sig/telnyx/models/wireless_wireless_blocklist.rbs +71 -0
  119. data/sig/telnyx/models.rbs +2 -0
  120. data/sig/telnyx/resources/ai/collections.rbs +0 -12
  121. data/sig/telnyx/resources/ai/knowledge/collections.rbs +23 -0
  122. data/sig/telnyx/resources/ai/knowledge.rbs +11 -0
  123. data/sig/telnyx/resources/ai/openai/chat.rbs +1 -0
  124. data/sig/telnyx/resources/ai/openai.rbs +1 -0
  125. data/sig/telnyx/resources/ai.rbs +2 -0
  126. data/sig/telnyx/resources/speech_to_text.rbs +1 -0
  127. data/sig/telnyx/resources/wireless_blocklists.rbs +2 -6
  128. metadata +20 -11
  129. data/lib/telnyx/models/ai/collection_retrieve_documents_params.rb +0 -104
  130. data/lib/telnyx/models/ai/collection_retrieve_documents_response.rb +0 -109
  131. data/lib/telnyx/models/wireless_blocklist_delete_response.rb +0 -16
  132. data/rbi/telnyx/models/ai/collection_retrieve_documents_params.rbi +0 -195
  133. data/rbi/telnyx/models/ai/collection_retrieve_documents_response.rbi +0 -159
  134. data/rbi/telnyx/models/wireless_blocklist_delete_response.rbi +0 -33
  135. data/sig/telnyx/models/ai/collection_retrieve_documents_params.rbs +0 -91
  136. data/sig/telnyx/models/ai/collection_retrieve_documents_response.rbs +0 -108
  137. data/sig/telnyx/models/wireless_blocklist_delete_response.rbs +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd14ec881b84e3ce8b0d2ba88bc49cc87dd03da84dcaa0fd551a48a7a954d715
4
- data.tar.gz: 75fef0397f90e5f5fb35702edad17b1956ee62024056661b670047bb68df30b8
3
+ metadata.gz: 4274858db2139e7fb6f3cb67db626fa3aafce7935eb9034b0159758f8b02b07f
4
+ data.tar.gz: 7d24d10dd76f0bd6db624031d45522d65cbd8323f1421488cbaedfb20be29a99
5
5
  SHA512:
6
- metadata.gz: 9f6682ab4347e4de132f6b73aa3bf0ab3927ab3b5da54a9d9a5cf10591777fe914cbf62e9599a3a06f034fb6cdf982f4cbb9868616ecb320433803feed6e6995
7
- data.tar.gz: fc259dfb669208234bf0bc21ac8c92779781545ba8645f4c26c6b7312c36dee69936ea4ea544eb8c83ba24cd8f8f04ac43cf030d72f2aafcee943c8541d2d700
6
+ metadata.gz: c91c57dee7c3523696baecef7b32add3fad9ad4a8dc934340a435eb788148af0f14504821c0648824208cf2711f0bad18f19fc5d756a3a68a8ef909aad4d8adb
7
+ data.tar.gz: 70537fea219cc85e7fe50d5dd2ff711b2a54ace8b6d0caa1900ada6f81e0fbece5016a7e57a35b4840da4beacc41399eff74fe6f0f17285c66aa874ad9285a17
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.164.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.163.0...v5.164.0) (2026-08-31)
4
+
5
+
6
+ ### Features
7
+
8
+ * promote from staging 88d5491 ([d62cbe6](https://github.com/team-telnyx/telnyx-ruby/commit/d62cbe641c502f1f69a2fcca8089f3f6ff72ae91))
9
+
3
10
  ## [5.163.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.162.0...v5.163.0) (2026-08-21)
4
11
 
5
12
 
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.163.0"
27
+ gem "telnyx", "~> 5.164.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -24,8 +24,9 @@ module Telnyx
24
24
  Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
25
25
 
26
26
  # @!attribute model
27
- # The model to use for generating the response, for example `zai-org/GLM-5.2` or
28
- # another model available from the Telnyx models endpoint.
27
+ # The model to use for generating the response, for example
28
+ # `zai-org/GLM-5.3-Flash` or another model available from the Telnyx models
29
+ # endpoint.
29
30
  #
30
31
  # @return [String]
31
32
  required :model, String
@@ -150,7 +151,7 @@ module Telnyx
150
151
  #
151
152
  # @param messages [Array<Hash{Symbol=>Object}>] The messages to send to the model, following the [Anthropic Messages API](https:
152
153
  #
153
- # @param model [String] The model to use for generating the response, for example `zai-org/GLM-5.2` or a
154
+ # @param model [String] The model to use for generating the response, for example `zai-org/GLM-5.3-Flash
154
155
  #
155
156
  # @param api_key_ref [String] If you are using an external inference provider, this field allows you to pass a
156
157
  #
@@ -280,6 +280,23 @@ module Telnyx
280
280
  # @return [Integer, nil]
281
281
  optional :warm_message_delay_ms, Integer, nil?: true
282
282
 
283
+ # @!attribute warm_transfer_acceptance
284
+ # Requires the transfer destination to accept the call before the caller is
285
+ # bridged. When enabled, the assistant speaks privately with the destination after
286
+ # they answer — delivering the warm transfer message and asking whether they take
287
+ # the call — while the caller keeps hearing ringback. The assistant then finalizes
288
+ # the transfer with the built-in `complete_transfer` tool: an accept bridges the
289
+ # calls, a decline hangs up the destination and returns the assistant to the
290
+ # caller with the reason the destination gave. Requires either
291
+ # `warm_transfer_instructions` or a `message` on every target, otherwise the
292
+ # assistant fails to save. Only available for calls started with
293
+ # `ai_assistant_start`; single-caller conversations only (a conference or
294
+ # additional invited participants fall back to a regular warm transfer).
295
+ #
296
+ # @return [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance, nil]
297
+ optional :warm_transfer_acceptance,
298
+ -> { Telnyx::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance }
299
+
283
300
  # @!attribute warm_transfer_instructions
284
301
  # Natural language instructions for your agent for how to provide context for the
285
302
  # transfer recipient.
@@ -287,7 +304,7 @@ module Telnyx
287
304
  # @return [String, nil]
288
305
  optional :warm_transfer_instructions, String
289
306
 
290
- # @!method initialize(from:, targets:, custom_headers: nil, description: nil, voicemail_detection: nil, warm_message_delay_ms: nil, warm_transfer_instructions: nil)
307
+ # @!method initialize(from:, targets:, custom_headers: nil, description: nil, voicemail_detection: nil, warm_message_delay_ms: nil, warm_transfer_acceptance: nil, warm_transfer_instructions: nil)
291
308
  # Some parameter documentations has been truncated, see
292
309
  # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer} for more details.
293
310
  #
@@ -303,6 +320,8 @@ module Telnyx
303
320
  #
304
321
  # @param warm_message_delay_ms [Integer, nil] Optional delay in milliseconds before playing the warm message audio when the tr
305
322
  #
323
+ # @param warm_transfer_acceptance [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance] Requires the transfer destination to accept the call before the caller is bridge
324
+ #
306
325
  # @param warm_transfer_instructions [String] Natural language instructions for your agent for how to provide context for the
307
326
 
308
327
  # The different possible targets of the transfer. The assistant will be able to
@@ -326,15 +345,29 @@ module Telnyx
326
345
  # @return [String]
327
346
  required :to, String
328
347
 
348
+ # @!attribute message
349
+ # The warm transfer message to deliver to this specific target. When set, it takes
350
+ # precedence over the message the assistant composes from
351
+ # `warm_transfer_instructions`.
352
+ #
353
+ # @return [String, nil]
354
+ optional :message, String
355
+
329
356
  # @!attribute name
330
357
  # The name of the target.
331
358
  #
332
359
  # @return [String, nil]
333
360
  optional :name, String
334
361
 
335
- # @!method initialize(to:, name: nil)
362
+ # @!method initialize(to:, message: nil, name: nil)
363
+ # Some parameter documentations has been truncated, see
364
+ # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer::Targets::TargetsList}
365
+ # for more details.
366
+ #
336
367
  # @param to [String] The destination number or SIP URI of the call.
337
368
  #
369
+ # @param message [String] The warm transfer message to deliver to this specific target. When set, it takes
370
+ #
338
371
  # @param name [String] The name of the target.
339
372
  end
340
373
 
@@ -615,6 +648,64 @@ module Telnyx
615
648
  end
616
649
  end
617
650
  end
651
+
652
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer#warm_transfer_acceptance
653
+ class WarmTransferAcceptance < Telnyx::Internal::Type::BaseModel
654
+ # @!attribute enabled
655
+ # Whether the destination must accept the transfer before the calls are bridged.
656
+ #
657
+ # @return [Boolean, nil]
658
+ optional :enabled, Telnyx::Internal::Type::Boolean
659
+
660
+ # @!attribute end_user_target_context_mode
661
+ # Controls whether the private exchange between the assistant and the transfer
662
+ # destination is kept out of the conversation. With `private` (default) the
663
+ # exchange never reaches the conversation history, AI conversations, webhooks or
664
+ # insights, and the transfer tool result is rewritten with the outcome only. With
665
+ # `shared` the exchange stays in the conversation like any other messages.
666
+ #
667
+ # @return [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance::EndUserTargetContextMode, nil]
668
+ optional :end_user_target_context_mode,
669
+ enum: -> { Telnyx::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance::EndUserTargetContextMode }
670
+
671
+ # @!method initialize(enabled: nil, end_user_target_context_mode: nil)
672
+ # Some parameter documentations has been truncated, see
673
+ # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance}
674
+ # for more details.
675
+ #
676
+ # Requires the transfer destination to accept the call before the caller is
677
+ # bridged. When enabled, the assistant speaks privately with the destination after
678
+ # they answer — delivering the warm transfer message and asking whether they take
679
+ # the call — while the caller keeps hearing ringback. The assistant then finalizes
680
+ # the transfer with the built-in `complete_transfer` tool: an accept bridges the
681
+ # calls, a decline hangs up the destination and returns the assistant to the
682
+ # caller with the reason the destination gave. Requires either
683
+ # `warm_transfer_instructions` or a `message` on every target, otherwise the
684
+ # assistant fails to save. Only available for calls started with
685
+ # `ai_assistant_start`; single-caller conversations only (a conference or
686
+ # additional invited participants fall back to a regular warm transfer).
687
+ #
688
+ # @param enabled [Boolean] Whether the destination must accept the transfer before the calls are bridged.
689
+ #
690
+ # @param end_user_target_context_mode [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance::EndUserTargetContextMode] Controls whether the private exchange between the assistant and the transfer des
691
+
692
+ # Controls whether the private exchange between the assistant and the transfer
693
+ # destination is kept out of the conversation. With `private` (default) the
694
+ # exchange never reaches the conversation history, AI conversations, webhooks or
695
+ # insights, and the transfer tool result is rewritten with the outcome only. With
696
+ # `shared` the exchange stays in the conversation like any other messages.
697
+ #
698
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer::WarmTransferAcceptance#end_user_target_context_mode
699
+ module EndUserTargetContextMode
700
+ extend Telnyx::Internal::Type::Enum
701
+
702
+ PRIVATE = :private
703
+ SHARED = :shared
704
+
705
+ # @!method self.values
706
+ # @return [Array<Symbol>]
707
+ end
708
+ end
618
709
  end
619
710
  end
620
711
 
@@ -113,6 +113,16 @@ module Telnyx
113
113
  # @return [Float, nil]
114
114
  optional :presence_penalty, Float
115
115
 
116
+ # @!attribute reasoning_effort
117
+ # Controls the reasoning effort for models that support it. When set, the model
118
+ # spends more or less compute on internal reasoning before generating its
119
+ # response. Supported values: none, minimal, low, medium, high, xhigh, max. Not
120
+ # all models support all values; unsupported values are rejected with a 400 error.
121
+ # When omitted, reasoning models use their default effort level.
122
+ #
123
+ # @return [Symbol, Telnyx::Models::AI::ChatCompletionRequest::ReasoningEffort, nil]
124
+ optional :reasoning_effort, enum: -> { Telnyx::AI::ChatCompletionRequest::ReasoningEffort }
125
+
116
126
  # @!attribute response_format
117
127
  # Use this is you want to guarantee a JSON output without defining a schema. For
118
128
  # control over the schema, use `guided_json`.
@@ -195,7 +205,7 @@ module Telnyx
195
205
  # @return [Boolean, nil]
196
206
  optional :use_beam_search, Telnyx::Internal::Type::Boolean
197
207
 
198
- # @!method initialize(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, guided_choice: nil, guided_json: nil, guided_regex: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, model: nil, n: nil, presence_penalty: nil, response_format: nil, seed: nil, service_tier: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil)
208
+ # @!method initialize(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, guided_choice: nil, guided_json: nil, guided_regex: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, model: nil, n: nil, presence_penalty: nil, reasoning_effort: nil, response_format: nil, seed: nil, service_tier: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil)
199
209
  # Some parameter documentations has been truncated, see
200
210
  # {Telnyx::Models::AI::ChatCompletionRequest} for more details.
201
211
  #
@@ -231,6 +241,8 @@ module Telnyx
231
241
  #
232
242
  # @param presence_penalty [Float] Higher values will penalize the model from repeating the same output tokens.
233
243
  #
244
+ # @param reasoning_effort [Symbol, Telnyx::Models::AI::ChatCompletionRequest::ReasoningEffort] Controls the reasoning effort for models that support it. When set, the model sp
245
+ #
234
246
  # @param response_format [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat] Use this is you want to guarantee a JSON output without defining a schema. For c
235
247
  #
236
248
  # @param seed [Integer] If specified, the system will make a best effort to sample deterministically, su
@@ -333,6 +345,28 @@ module Telnyx
333
345
  end
334
346
  end
335
347
 
348
+ # Controls the reasoning effort for models that support it. When set, the model
349
+ # spends more or less compute on internal reasoning before generating its
350
+ # response. Supported values: none, minimal, low, medium, high, xhigh, max. Not
351
+ # all models support all values; unsupported values are rejected with a 400 error.
352
+ # When omitted, reasoning models use their default effort level.
353
+ #
354
+ # @see Telnyx::Models::AI::ChatCompletionRequest#reasoning_effort
355
+ module ReasoningEffort
356
+ extend Telnyx::Internal::Type::Enum
357
+
358
+ NONE = :none
359
+ MINIMAL = :minimal
360
+ LOW = :low
361
+ MEDIUM = :medium
362
+ HIGH = :high
363
+ XHIGH = :xhigh
364
+ MAX = :max
365
+
366
+ # @!method self.values
367
+ # @return [Array<Symbol>]
368
+ end
369
+
336
370
  # @see Telnyx::Models::AI::ChatCompletionRequest#response_format
337
371
  class ResponseFormat < Telnyx::Internal::Type::BaseModel
338
372
  # @!attribute type
@@ -8,6 +8,9 @@ module Telnyx
8
8
  # @!attribute retrieval_type
9
9
  # Retrieval strategy. `vector` runs semantic similarity search; `hybrid` combines
10
10
  # vector similarity with keyword matching; `keyword` runs lexical (BM25) matching.
11
+ # `keyword` is not accepted yet: setting it returns 422
12
+ # `unsupported_retrieval_type`. A collection set to `hybrid` is accepted here but
13
+ # cannot be searched until hybrid execution ships.
11
14
  #
12
15
  # @return [Symbol, Telnyx::Models::AI::Collections::RetrievalSettings::RetrievalType, nil]
13
16
  optional :retrieval_type, enum: -> { Telnyx::AI::Collections::RetrievalSettings::RetrievalType }
@@ -30,6 +33,9 @@ module Telnyx
30
33
 
31
34
  # Retrieval strategy. `vector` runs semantic similarity search; `hybrid` combines
32
35
  # vector similarity with keyword matching; `keyword` runs lexical (BM25) matching.
36
+ # `keyword` is not accepted yet: setting it returns 422
37
+ # `unsupported_retrieval_type`. A collection set to `hybrid` is accepted here but
38
+ # cannot be searched until hybrid execution ships.
33
39
  #
34
40
  # @see Telnyx::Models::AI::Collections::RetrievalSettings#retrieval_type
35
41
  module RetrievalType
@@ -37,7 +43,6 @@ module Telnyx
37
43
 
38
44
  VECTOR = :vector
39
45
  HYBRID = :hybrid
40
- KEYWORD = :keyword
41
46
 
42
47
  # @!method self.values
43
48
  # @return [Array<Symbol>]
@@ -111,6 +111,31 @@ module Telnyx
111
111
  # @return [Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters, nil]
112
112
  optional :path_parameters, -> { Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters }
113
113
 
114
+ # @!attribute preset_body_fields
115
+ # Body fields supplied by the assistant configuration rather than by the model.
116
+ # They are never advertised in the tool definition, so the LLM can neither see nor
117
+ # set them, and they take precedence over a `body_parameters` value of the same
118
+ # name. Values support mustache templating, so they can hold dynamic variables
119
+ # (`{{customer_id}}`) and integration secrets
120
+ # (`{{#integration_secret}}my-secret{{/integration_secret}}`). Not sent on `GET`
121
+ # requests, which carry no body.
122
+ #
123
+ # @return [Hash{Symbol=>Object}, nil]
124
+ optional :preset_body_fields, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
125
+
126
+ # @!attribute preset_query_params
127
+ # Query string parameters supplied by the assistant configuration rather than by
128
+ # the model. They are never advertised in the tool definition, so the LLM can
129
+ # neither see nor set them, and they take precedence over a `query_parameters`
130
+ # value of the same name. Values support mustache templating, so they can hold
131
+ # dynamic variables (`{{telnyx_end_user_target}}`) and integration secrets
132
+ # (`{{#integration_secret}}my-secret{{/integration_secret}}`). Unlike values
133
+ # templated directly into the `url`, these are percent-encoded, so a value such as
134
+ # `+15551234567` survives the round trip.
135
+ #
136
+ # @return [Hash{Symbol=>Object}, nil]
137
+ optional :preset_query_params, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
138
+
114
139
  # @!attribute query_parameters
115
140
  # The query parameters the webhook tool accepts, described as a JSON Schema
116
141
  # object. These parameters will be passed to the webhook as the query of the
@@ -138,7 +163,7 @@ module Telnyx
138
163
  # @return [Integer, nil]
139
164
  optional :timeout_ms, Integer
140
165
 
141
- # @!method initialize(description:, name:, url:, async: nil, async_timeout_ms: nil, body_parameters: nil, headers: nil, messages: nil, http_method: nil, path_parameters: nil, query_parameters: nil, store_fields_as_variables: nil, timeout_ms: nil)
166
+ # @!method initialize(description:, name:, url:, async: nil, async_timeout_ms: nil, body_parameters: nil, headers: nil, messages: nil, http_method: nil, path_parameters: nil, preset_body_fields: nil, preset_query_params: nil, query_parameters: nil, store_fields_as_variables: nil, timeout_ms: nil)
142
167
  # Some parameter documentations has been truncated, see
143
168
  # {Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook} for more
144
169
  # details.
@@ -163,6 +188,10 @@ module Telnyx
163
188
  #
164
189
  # @param path_parameters [Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters] The path parameters the webhook tool accepts, described as a JSON Schema object.
165
190
  #
191
+ # @param preset_body_fields [Hash{Symbol=>Object}] Body fields supplied by the assistant configuration rather than by the model. Th
192
+ #
193
+ # @param preset_query_params [Hash{Symbol=>Object}] Query string parameters supplied by the assistant configuration rather than by t
194
+ #
166
195
  # @param query_parameters [Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters] The query parameters the webhook tool accepts, described as a JSON Schema object
167
196
  #
168
197
  # @param store_fields_as_variables [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable>] A list of mappings that extract values from the webhook response and store them
@@ -0,0 +1,114 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ module Knowledge
7
+ # @see Telnyx::Resources::AI::Knowledge::Collections#retrieve_documents
8
+ class CollectionRetrieveDocumentsParams < Telnyx::Internal::Type::BaseModel
9
+ extend Telnyx::Internal::Type::RequestParameters::Converter
10
+ include Telnyx::Internal::Type::RequestParameters
11
+
12
+ # @!attribute slug
13
+ #
14
+ # @return [String]
15
+ required :slug, String
16
+
17
+ # @!attribute filter
18
+ # Field filters applied before ranking, using `filter[field][operator]=value`.
19
+ # Supported operators: `eq` (default), `in`, `gte`, `gt`, `lte`, `lt`, `contains`.
20
+ # Known fields: `record_type`, `record_id`, `user_id`, `record_created_at`,
21
+ # `ingested_at`; any other name resolves to a `metadata.<field>` filter. Example:
22
+ # `filter[record_id][eq]=rec_123`.
23
+ #
24
+ # @return [Hash{Symbol=>Object}, nil]
25
+ optional :filter, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
26
+
27
+ # @!attribute page_number
28
+ # Page number to return (1-based). Defaults to 1.
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :page_number, Integer
32
+
33
+ # @!attribute page_size
34
+ # Number of results per page. Defaults to 20.
35
+ #
36
+ # @return [Integer, nil]
37
+ optional :page_size, Integer
38
+
39
+ # @!attribute query
40
+ # Natural-language search query. When provided, the text is matched against the
41
+ # collection's document chunks using the collection's `retrieval_type` (vector or
42
+ # hybrid). When omitted, documents are returned as a plain catalog listing.
43
+ #
44
+ # @return [String, nil]
45
+ optional :query, String
46
+
47
+ # @!attribute retrieval_type
48
+ # Reserved; not yet functional. A value supplied here is accepted but ignored — it
49
+ # does not override the collection's configured strategy, and it is not echoed
50
+ # back. Searches run `vector` retrieval, and `meta.retrieval_type` reports the
51
+ # mode that actually ran. To change retrieval strategy, set it on the collection's
52
+ # settings subresource.
53
+ #
54
+ # @return [Symbol, Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsParams::RetrievalType, nil]
55
+ optional :retrieval_type,
56
+ enum: -> { Telnyx::AI::Knowledge::CollectionRetrieveDocumentsParams::RetrievalType }
57
+
58
+ # @!attribute sources
59
+ # Comma-separated list of source types to restrict the search to. When omitted,
60
+ # all of the collection's sources are searched.
61
+ #
62
+ # @return [String, nil]
63
+ optional :sources, String
64
+
65
+ # @!attribute top_k
66
+ # Maximum number of ranked results to consider. When omitted, the collection's
67
+ # configured `top_k` setting is used.
68
+ #
69
+ # @return [Integer, nil]
70
+ optional :top_k, Integer
71
+
72
+ # @!method initialize(slug:, filter: nil, page_number: nil, page_size: nil, query: nil, retrieval_type: nil, sources: nil, top_k: nil, request_options: {})
73
+ # Some parameter documentations has been truncated, see
74
+ # {Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsParams} for more
75
+ # details.
76
+ #
77
+ # @param slug [String]
78
+ #
79
+ # @param filter [Hash{Symbol=>Object}] Field filters applied before ranking, using `filter[field][operator]=value`. Sup
80
+ #
81
+ # @param page_number [Integer] Page number to return (1-based). Defaults to 1.
82
+ #
83
+ # @param page_size [Integer] Number of results per page. Defaults to 20.
84
+ #
85
+ # @param query [String] Natural-language search query. When provided, the text is matched against the co
86
+ #
87
+ # @param retrieval_type [Symbol, Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsParams::RetrievalType] Reserved; not yet functional. A value supplied here is accepted but ignored — it
88
+ #
89
+ # @param sources [String] Comma-separated list of source types to restrict the search to. When omitted, al
90
+ #
91
+ # @param top_k [Integer] Maximum number of ranked results to consider. When omitted, the collection's con
92
+ #
93
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
94
+
95
+ # Reserved; not yet functional. A value supplied here is accepted but ignored — it
96
+ # does not override the collection's configured strategy, and it is not echoed
97
+ # back. Searches run `vector` retrieval, and `meta.retrieval_type` reports the
98
+ # mode that actually ran. To change retrieval strategy, set it on the collection's
99
+ # settings subresource.
100
+ module RetrievalType
101
+ extend Telnyx::Internal::Type::Enum
102
+
103
+ VECTOR = :vector
104
+ HYBRID = :hybrid
105
+ KEYWORD = :keyword
106
+
107
+ # @!method self.values
108
+ # @return [Array<Symbol>]
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,182 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ module Knowledge
7
+ # @see Telnyx::Resources::AI::Knowledge::Collections#retrieve_documents
8
+ class CollectionRetrieveDocumentsResponse < Telnyx::Internal::Type::BaseModel
9
+ # @!attribute data
10
+ #
11
+ # @return [Array<Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse::Data>, nil]
12
+ optional :data,
13
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse::Data] }
14
+
15
+ # @!attribute meta
16
+ #
17
+ # @return [Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse::Meta, nil]
18
+ optional :meta, -> { Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse::Meta }
19
+
20
+ # @!method initialize(data: nil, meta: nil)
21
+ # @param data [Array<Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse::Data>]
22
+ # @param meta [Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse::Meta]
23
+
24
+ class Data < Telnyx::Internal::Type::BaseModel
25
+ # @!attribute id
26
+ #
27
+ # @return [String, nil]
28
+ optional :id, String
29
+
30
+ # @!attribute chunk_index
31
+ #
32
+ # @return [Integer, nil]
33
+ optional :chunk_index, Integer
34
+
35
+ # @!attribute chunk_total
36
+ #
37
+ # @return [Integer, nil]
38
+ optional :chunk_total, Integer
39
+
40
+ # @!attribute ingested_at
41
+ #
42
+ # @return [Time, nil]
43
+ optional :ingested_at, Time
44
+
45
+ # @!attribute metadata
46
+ #
47
+ # @return [Hash{Symbol=>Object}, nil]
48
+ optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
49
+
50
+ # @!attribute organization_id
51
+ #
52
+ # @return [String, nil]
53
+ optional :organization_id, String
54
+
55
+ # @!attribute record_created_at
56
+ #
57
+ # @return [Time, nil]
58
+ optional :record_created_at, Time
59
+
60
+ # @!attribute record_id
61
+ #
62
+ # @return [String, nil]
63
+ optional :record_id, String
64
+
65
+ # @!attribute record_type
66
+ # The source record kind this chunk came from (e.g. `voice`, `meeting_bot`,
67
+ # `message`).
68
+ #
69
+ # @return [String, nil]
70
+ optional :record_type, String
71
+
72
+ # @!attribute region
73
+ #
74
+ # @return [String, nil]
75
+ optional :region, String
76
+
77
+ # @!attribute score
78
+ # Relevance score (higher = more relevant) for ranked search. `0.0` for plain
79
+ # catalog listings (when `query` is omitted).
80
+ #
81
+ # @return [Float, nil]
82
+ optional :score, Float
83
+
84
+ # @!attribute text
85
+ #
86
+ # @return [String, nil]
87
+ optional :text, String
88
+
89
+ # @!attribute user_id
90
+ #
91
+ # @return [String, nil]
92
+ optional :user_id, String
93
+
94
+ # @!method initialize(id: nil, chunk_index: nil, chunk_total: nil, ingested_at: nil, metadata: nil, organization_id: nil, record_created_at: nil, record_id: nil, record_type: nil, region: nil, score: nil, text: nil, user_id: nil)
95
+ # Some parameter documentations has been truncated, see
96
+ # {Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse::Data} for
97
+ # more details.
98
+ #
99
+ # @param id [String]
100
+ #
101
+ # @param chunk_index [Integer]
102
+ #
103
+ # @param chunk_total [Integer]
104
+ #
105
+ # @param ingested_at [Time]
106
+ #
107
+ # @param metadata [Hash{Symbol=>Object}]
108
+ #
109
+ # @param organization_id [String]
110
+ #
111
+ # @param record_created_at [Time]
112
+ #
113
+ # @param record_id [String]
114
+ #
115
+ # @param record_type [String] The source record kind this chunk came from (e.g. `voice`, `meeting_bot`, `messa
116
+ #
117
+ # @param region [String]
118
+ #
119
+ # @param score [Float] Relevance score (higher = more relevant) for ranked search. `0.0` for plain cata
120
+ #
121
+ # @param text [String]
122
+ #
123
+ # @param user_id [String]
124
+ end
125
+
126
+ # @see Telnyx::Models::AI::Knowledge::CollectionRetrieveDocumentsResponse#meta
127
+ class Meta < Telnyx::Internal::Type::BaseModel
128
+ # @!attribute collection_slug
129
+ #
130
+ # @return [String, nil]
131
+ optional :collection_slug, String
132
+
133
+ # @!attribute page_number
134
+ #
135
+ # @return [Integer, nil]
136
+ optional :page_number, Integer
137
+
138
+ # @!attribute page_size
139
+ #
140
+ # @return [Integer, nil]
141
+ optional :page_size, Integer
142
+
143
+ # @!attribute retrieval_type
144
+ #
145
+ # @return [String, nil]
146
+ optional :retrieval_type, String
147
+
148
+ # @!attribute searched_sources
149
+ #
150
+ # @return [Array<String>, nil]
151
+ optional :searched_sources, Telnyx::Internal::Type::ArrayOf[String]
152
+
153
+ # @!attribute top_k
154
+ #
155
+ # @return [Integer, nil]
156
+ optional :top_k, Integer
157
+
158
+ # @!attribute total_pages
159
+ #
160
+ # @return [Integer, nil]
161
+ optional :total_pages, Integer
162
+
163
+ # @!attribute total_results
164
+ #
165
+ # @return [Integer, nil]
166
+ optional :total_results, Integer
167
+
168
+ # @!method initialize(collection_slug: nil, page_number: nil, page_size: nil, retrieval_type: nil, searched_sources: nil, top_k: nil, total_pages: nil, total_results: nil)
169
+ # @param collection_slug [String]
170
+ # @param page_number [Integer]
171
+ # @param page_size [Integer]
172
+ # @param retrieval_type [String]
173
+ # @param searched_sources [Array<String>]
174
+ # @param top_k [Integer]
175
+ # @param total_pages [Integer]
176
+ # @param total_results [Integer]
177
+ end
178
+ end
179
+ end
180
+ end
181
+ end
182
+ end