telnyx 5.155.0 → 5.157.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +1 -0
- data/lib/telnyx/internal/type/union.rb +4 -4
- data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +209 -0
- data/lib/telnyx/models/ai/anthropic/v1_messages_response.rb +12 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +2 -2
- data/lib/telnyx/models/ai/assistant_tool.rb +118 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +2 -2
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +2 -2
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rb +103 -0
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rb +54 -0
- data/lib/telnyx/models/ai/inference_embedding.rb +6 -6
- data/lib/telnyx/models/ai/pay_tool_params.rb +46 -0
- data/lib/telnyx/models/ai/tool_create_params.rb +13 -1
- data/lib/telnyx/models/ai/tool_update_params.rb +13 -1
- data/lib/telnyx/models/ai/transcription_settings.rb +3 -3
- data/lib/telnyx/models/call_dial_params.rb +13 -1
- data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +3 -0
- data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +6 -0
- data/lib/telnyx/models/calls/action_speak_params.rb +6 -0
- data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +3 -0
- data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +3 -0
- data/lib/telnyx/models/calls/telnyx_voice_settings.rb +2 -1
- data/lib/telnyx/models/calls/transcription_config.rb +8 -4
- data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -1
- data/lib/telnyx/models/conferences/action_speak_params.rb +6 -0
- data/lib/telnyx/models/conversation_relay_embedded_config.rb +3 -0
- data/lib/telnyx/models/doc_reqs_requirement.rb +29 -4
- data/lib/telnyx/models/inbound_message.rb +278 -28
- data/lib/telnyx/models/inbound_message_webhook_event.rb +70 -3
- data/lib/telnyx/models/managed_account_list_params.rb +45 -3
- data/lib/telnyx/models/models_response.rb +0 -1
- data/lib/telnyx/models/phone_number_delete_response.rb +12 -1
- data/lib/telnyx/models/phone_number_detailed.rb +12 -1
- data/lib/telnyx/models/phone_number_slim_list_response.rb +12 -1
- data/lib/telnyx/models/requirement_list_params.rb +10 -1
- data/lib/telnyx/models/requirement_retrieve_params.rb +14 -1
- data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -1
- data/lib/telnyx/models/storage/cloudf_create_params.rb +56 -0
- data/lib/telnyx/models/storage/cloudf_delete_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_list_params.rb +109 -0
- data/lib/telnyx/models/storage/cloudf_list_response.rb +165 -0
- data/lib/telnyx/models/storage/cloudf_retrieve_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_update_params.rb +36 -0
- data/lib/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rb +30 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_status.rb +28 -0
- data/lib/telnyx/models/text_to_speech_generate_speech_params.rb +13 -8
- data/lib/telnyx/models/text_to_speech_retrieve_speech_params.rb +4 -4
- data/lib/telnyx/models/verify_profile.rb +2 -2
- data/lib/telnyx/models/verify_profile_create_params.rb +2 -2
- data/lib/telnyx/models/verify_profile_update_params.rb +2 -2
- data/lib/telnyx/models.rb +0 -6
- data/lib/telnyx/resources/ai/anthropic/v1.rb +91 -0
- data/lib/telnyx/resources/ai/anthropic.rb +20 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +1 -1
- data/lib/telnyx/resources/ai/assistants.rb +2 -2
- data/lib/telnyx/resources/ai/chat.rb +0 -81
- data/lib/telnyx/resources/ai/conversations/conversation_insights.rb +55 -0
- data/lib/telnyx/resources/ai/conversations.rb +5 -0
- data/lib/telnyx/resources/ai/tools.rb +8 -2
- data/lib/telnyx/resources/ai.rb +3 -56
- data/lib/telnyx/resources/calls.rb +3 -1
- data/lib/telnyx/resources/messages.rb +1 -32
- data/lib/telnyx/resources/requirements.rb +13 -3
- data/lib/telnyx/resources/storage/cloudfs/actions.rb +54 -0
- data/lib/telnyx/resources/storage/cloudfs.rb +187 -0
- data/lib/telnyx/resources/storage.rb +6 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +20 -7
- data/rbi/telnyx/client.rbi +1 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +314 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_response.rbi +15 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +12 -4
- data/rbi/telnyx/models/ai/assistant_tool.rbi +258 -1
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +12 -4
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +12 -4
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbi +188 -0
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbi +94 -0
- data/rbi/telnyx/models/ai/inference_embedding.rbi +18 -6
- data/rbi/telnyx/models/ai/pay_tool_params.rbi +71 -0
- data/rbi/telnyx/models/ai/tool_create_params.rbi +18 -0
- data/rbi/telnyx/models/ai/tool_update_params.rbi +18 -0
- data/rbi/telnyx/models/ai/transcription_settings.rbi +5 -5
- data/rbi/telnyx/models/call_dial_params.rbi +19 -0
- data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +6 -0
- data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +12 -0
- data/rbi/telnyx/models/calls/action_speak_params.rbi +12 -0
- data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +6 -0
- data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +6 -0
- data/rbi/telnyx/models/calls/telnyx_voice_settings.rbi +4 -2
- data/rbi/telnyx/models/calls/transcription_config.rbi +15 -7
- data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +2 -2
- data/rbi/telnyx/models/conferences/action_speak_params.rbi +12 -0
- data/rbi/telnyx/models/conversation_relay_embedded_config.rbi +6 -0
- data/rbi/telnyx/models/doc_reqs_requirement.rbi +38 -9
- data/rbi/telnyx/models/inbound_message.rbi +324 -58
- data/rbi/telnyx/models/inbound_message_webhook_event.rbi +173 -4
- data/rbi/telnyx/models/managed_account_list_params.rbi +130 -6
- data/rbi/telnyx/models/phone_number_delete_response.rbi +14 -0
- data/rbi/telnyx/models/phone_number_detailed.rbi +14 -0
- data/rbi/telnyx/models/phone_number_slim_list_response.rbi +14 -0
- data/rbi/telnyx/models/requirement_list_params.rbi +13 -0
- data/rbi/telnyx/models/requirement_retrieve_params.rbi +21 -2
- data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +2 -2
- data/rbi/telnyx/models/storage/cloudf_create_params.rbi +103 -0
- data/rbi/telnyx/models/storage/cloudf_delete_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_list_params.rbi +232 -0
- data/rbi/telnyx/models/storage/cloudf_list_response.rbi +327 -0
- data/rbi/telnyx/models/storage/cloudf_retrieve_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_update_params.rbi +61 -0
- data/rbi/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbi +50 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbi +229 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbi +227 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_status.rbi +57 -0
- data/rbi/telnyx/models/text_to_speech_generate_speech_params.rbi +21 -13
- data/rbi/telnyx/models/text_to_speech_retrieve_speech_params.rbi +8 -8
- data/rbi/telnyx/models/verify_profile.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_create_params.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_update_params.rbi +2 -2
- data/rbi/telnyx/models.rbi +0 -7
- data/rbi/telnyx/resources/ai/anthropic/v1.rbi +106 -0
- data/rbi/telnyx/resources/ai/anthropic.rbi +17 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -1
- data/rbi/telnyx/resources/ai/assistants.rbi +6 -2
- data/rbi/telnyx/resources/ai/chat.rbi +0 -129
- data/rbi/telnyx/resources/ai/conversations/conversation_insights.rbi +68 -0
- data/rbi/telnyx/resources/ai/conversations.rbi +6 -0
- data/rbi/telnyx/resources/ai/tools.rbi +8 -0
- data/rbi/telnyx/resources/ai.rbi +2 -32
- data/rbi/telnyx/resources/calls/actions.rbi +21 -0
- data/rbi/telnyx/resources/calls.rbi +7 -0
- data/rbi/telnyx/resources/conferences/actions.rbi +6 -0
- data/rbi/telnyx/resources/managed_accounts.rbi +1 -1
- data/rbi/telnyx/resources/messages.rbi +1 -28
- data/rbi/telnyx/resources/requirements.rbi +8 -0
- data/rbi/telnyx/resources/storage/cloudfs/actions.rbi +46 -0
- data/rbi/telnyx/resources/storage/cloudfs.rbi +152 -0
- data/rbi/telnyx/resources/storage.rbi +5 -0
- data/rbi/telnyx/resources/text_to_speech.rbi +11 -9
- data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +175 -0
- data/sig/telnyx/models/ai/anthropic/v1_messages_response.rbs +11 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +108 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbs +74 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbs +34 -0
- data/sig/telnyx/models/ai/pay_tool_params.rbs +41 -0
- data/sig/telnyx/models/ai/tool_create_params.rbs +14 -0
- data/sig/telnyx/models/ai/tool_update_params.rbs +14 -0
- data/sig/telnyx/models/ai/transcription_settings.rbs +2 -2
- data/sig/telnyx/models/call_dial_params.rbs +7 -0
- data/sig/telnyx/models/calls/transcription_config.rbs +2 -2
- data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +2 -2
- data/sig/telnyx/models/doc_reqs_requirement.rbs +25 -8
- data/sig/telnyx/models/inbound_message.rbs +204 -35
- data/sig/telnyx/models/inbound_message_webhook_event.rbs +81 -5
- data/sig/telnyx/models/managed_account_list_params.rbs +47 -3
- data/sig/telnyx/models/phone_number_delete_response.rbs +5 -0
- data/sig/telnyx/models/phone_number_detailed.rbs +5 -0
- data/sig/telnyx/models/phone_number_slim_list_response.rbs +5 -0
- data/sig/telnyx/models/requirement_list_params.rbs +8 -1
- data/sig/telnyx/models/requirement_retrieve_params.rbs +12 -2
- data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -2
- data/sig/telnyx/models/storage/cloudf_create_params.rbs +50 -0
- data/sig/telnyx/models/storage/cloudf_delete_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_list_params.rbs +112 -0
- data/sig/telnyx/models/storage/cloudf_list_response.rbs +163 -0
- data/sig/telnyx/models/storage/cloudf_retrieve_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_update_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_status.rbs +21 -0
- data/sig/telnyx/models.rbs +0 -6
- data/sig/telnyx/resources/ai/anthropic/v1.rbs +35 -0
- data/sig/telnyx/resources/ai/anthropic.rbs +11 -0
- data/sig/telnyx/resources/ai/chat.rbs +0 -30
- data/sig/telnyx/resources/ai/conversations/conversation_insights.rbs +20 -0
- data/sig/telnyx/resources/ai/conversations.rbs +2 -0
- data/sig/telnyx/resources/ai/tools.rbs +4 -0
- data/sig/telnyx/resources/ai.rbs +1 -8
- data/sig/telnyx/resources/calls.rbs +1 -0
- data/sig/telnyx/resources/messages.rbs +0 -10
- data/sig/telnyx/resources/requirements.rbs +2 -0
- data/sig/telnyx/resources/storage/cloudfs/actions.rbs +17 -0
- data/sig/telnyx/resources/storage/cloudfs.rbs +45 -0
- data/sig/telnyx/resources/storage.rbs +2 -0
- metadata +62 -23
- data/lib/telnyx/models/ai/chat_create_completion_params.rb +0 -16
- data/lib/telnyx/models/ai/chat_create_completion_response.rb +0 -10
- data/lib/telnyx/models/ai_create_response_deprecated_params.rb +0 -20
- data/lib/telnyx/models/ai_create_response_deprecated_response.rb +0 -8
- data/lib/telnyx/models/ai_retrieve_models_params.rb +0 -14
- data/lib/telnyx/models/message_send_whatsapp_params.rb +0 -71
- data/lib/telnyx/models/message_send_whatsapp_response.rb +0 -178
- data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +0 -32
- data/rbi/telnyx/models/ai/chat_create_completion_response.rbi +0 -13
- data/rbi/telnyx/models/ai_create_response_deprecated_params.rbi +0 -41
- data/rbi/telnyx/models/ai_create_response_deprecated_response.rbi +0 -11
- data/rbi/telnyx/models/ai_retrieve_models_params.rbi +0 -27
- data/rbi/telnyx/models/message_send_whatsapp_params.rbi +0 -124
- data/rbi/telnyx/models/message_send_whatsapp_response.rbi +0 -379
- data/sig/telnyx/models/ai/chat_create_completion_params.rbs +0 -17
- data/sig/telnyx/models/ai/chat_create_completion_response.rbs +0 -9
- data/sig/telnyx/models/ai_create_response_deprecated_params.rbs +0 -24
- data/sig/telnyx/models/ai_create_response_deprecated_response.rbs +0 -7
- data/sig/telnyx/models/ai_retrieve_models_params.rbs +0 -15
- data/sig/telnyx/models/message_send_whatsapp_params.rbs +0 -69
- data/sig/telnyx/models/message_send_whatsapp_response.rbs +0 -191
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5b9ffed476341dbc8eb0fbd2245dc0554a2d0d2bcb10e483b8565b380f126b8
|
|
4
|
+
data.tar.gz: 928fb90fc99dc45aaa32115149cb68ccc0fd8389eea0b514b077d321f088cce3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c36fe657f30fac2ede9294e51b892997ca7d4842034c340ed7988825fe75d4787b98ba36dd047b9b17595f6aea405daf7cf3eed0f8ec2d0055bf8d775d29409b
|
|
7
|
+
data.tar.gz: 30771b79640ba029739c62938a934ae1095eeea5af831c5db68969a5fb2b844c8171fce515b48001b7fba4bb8ee4d8ab0e92154af543b3f2b5c75250d60a238c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.157.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.156.0...v5.157.0) (2026-07-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **release:** assert a release PR exists for unreleased commits ([#326](https://github.com/team-telnyx/telnyx-ruby/issues/326)) ([d8a97f0](https://github.com/team-telnyx/telnyx-ruby/commit/d8a97f00ce88d2d91f7529644eb36b7bf75ab996))
|
|
9
|
+
* **release:** make the --local scan clone see the repointed release branch ([#324](https://github.com/team-telnyx/telnyx-ruby/issues/324)) ([82dfdae](https://github.com/team-telnyx/telnyx-ruby/commit/82dfdae237576a2a71c3ca8ebc470ae590b81fb9))
|
|
10
|
+
|
|
11
|
+
## [5.156.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.155.0...v5.156.0) (2026-07-09)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **release:** ghost guard also verifies the GitHub Release exists ([#317](https://github.com/team-telnyx/telnyx-ruby/issues/317)) ([1a26287](https://github.com/team-telnyx/telnyx-ruby/commit/1a26287d09ca746144898eb875f64f72447b54b6))
|
|
17
|
+
* **release:** scan next's commits in release-pr (stop depending on master hotfixes) ([#315](https://github.com/team-telnyx/telnyx-ruby/issues/315)) ([67446aa](https://github.com/team-telnyx/telnyx-ruby/commit/67446aa023de85bdbd6143ec50b9f12d447fb0e7))
|
|
18
|
+
|
|
3
19
|
## 5.155.0 (2026-07-03)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v5.154.0...v5.155.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.154.0...v5.155.0)
|
data/README.md
CHANGED
data/lib/telnyx/client.rb
CHANGED
|
@@ -10,10 +10,10 @@ module Telnyx
|
|
|
10
10
|
# case assistant_tool
|
|
11
11
|
# when Telnyx::AI::InferenceEmbeddingWebhookToolParams
|
|
12
12
|
# puts(assistant_tool.type)
|
|
13
|
+
# when Telnyx::AI::AssistantTool::ClientSideTool
|
|
14
|
+
# puts(assistant_tool.client_side_tool)
|
|
13
15
|
# when Telnyx::AI::RetrievalTool
|
|
14
16
|
# puts(assistant_tool.retrieval)
|
|
15
|
-
# when Telnyx::AI::AssistantTool::Handoff
|
|
16
|
-
# puts(assistant_tool.handoff)
|
|
17
17
|
# else
|
|
18
18
|
# puts(assistant_tool)
|
|
19
19
|
# end
|
|
@@ -22,10 +22,10 @@ module Telnyx
|
|
|
22
22
|
# case assistant_tool
|
|
23
23
|
# in {type: :webhook, webhook: webhook}
|
|
24
24
|
# puts(webhook)
|
|
25
|
+
# in {type: :client_side_tool, client_side_tool: client_side_tool}
|
|
26
|
+
# puts(client_side_tool)
|
|
25
27
|
# in {type: :retrieval, retrieval: retrieval}
|
|
26
28
|
# puts(retrieval)
|
|
27
|
-
# in {type: :handoff, handoff: handoff}
|
|
28
|
-
# puts(handoff)
|
|
29
29
|
# else
|
|
30
30
|
# puts(assistant_tool)
|
|
31
31
|
# end
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module Anthropic
|
|
7
|
+
# @see Telnyx::Resources::AI::Anthropic::V1#messages
|
|
8
|
+
class V1MessagesParams < Telnyx::Internal::Type::BaseModel
|
|
9
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute max_tokens
|
|
13
|
+
# The maximum number of tokens to generate in the response.
|
|
14
|
+
#
|
|
15
|
+
# @return [Integer]
|
|
16
|
+
required :max_tokens, Integer
|
|
17
|
+
|
|
18
|
+
# @!attribute messages
|
|
19
|
+
# The messages to send to the model, following the
|
|
20
|
+
# [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) format.
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Hash{Symbol=>Object}>]
|
|
23
|
+
required :messages,
|
|
24
|
+
Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
|
|
25
|
+
|
|
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.
|
|
29
|
+
#
|
|
30
|
+
# @return [String]
|
|
31
|
+
required :model, String
|
|
32
|
+
|
|
33
|
+
# @!attribute api_key_ref
|
|
34
|
+
# If you are using an external inference provider, this field allows you to pass
|
|
35
|
+
# along a reference to your API key. After creating an
|
|
36
|
+
# [integration secret](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
37
|
+
# for your API key, pass the secret's `identifier` in this field.
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :api_key_ref, String
|
|
41
|
+
|
|
42
|
+
# @!attribute billing_group_id
|
|
43
|
+
# The billing group ID to associate with this request.
|
|
44
|
+
#
|
|
45
|
+
# @return [String, nil]
|
|
46
|
+
optional :billing_group_id, String
|
|
47
|
+
|
|
48
|
+
# @!attribute fallback_config
|
|
49
|
+
# Configuration for model fallback behavior when the primary model is unavailable.
|
|
50
|
+
#
|
|
51
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
52
|
+
optional :fallback_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
53
|
+
|
|
54
|
+
# @!attribute max_retries
|
|
55
|
+
# Maximum number of retries for the request.
|
|
56
|
+
#
|
|
57
|
+
# @return [Integer, nil]
|
|
58
|
+
optional :max_retries, Integer
|
|
59
|
+
|
|
60
|
+
# @!attribute mcp_servers
|
|
61
|
+
# List of MCP (Model Context Protocol) servers to make available to the model.
|
|
62
|
+
#
|
|
63
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
64
|
+
optional :mcp_servers,
|
|
65
|
+
Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
|
|
66
|
+
|
|
67
|
+
# @!attribute metadata
|
|
68
|
+
# An object describing metadata about the request.
|
|
69
|
+
#
|
|
70
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
71
|
+
optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
72
|
+
|
|
73
|
+
# @!attribute service_tier
|
|
74
|
+
# Service tier for the request.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
optional :service_tier, String
|
|
78
|
+
|
|
79
|
+
# @!attribute stop_sequences
|
|
80
|
+
# Custom sequences that will cause the model to stop generating.
|
|
81
|
+
#
|
|
82
|
+
# @return [Array<String>, nil]
|
|
83
|
+
optional :stop_sequences, Telnyx::Internal::Type::ArrayOf[String]
|
|
84
|
+
|
|
85
|
+
# @!attribute stream
|
|
86
|
+
# Whether to stream the response as Anthropic-format Server-Sent Events.
|
|
87
|
+
#
|
|
88
|
+
# @return [Boolean, nil]
|
|
89
|
+
optional :stream, Telnyx::Internal::Type::Boolean
|
|
90
|
+
|
|
91
|
+
# @!attribute system_
|
|
92
|
+
# System prompt. Can be a string or an array of content blocks following the
|
|
93
|
+
# Anthropic API format.
|
|
94
|
+
#
|
|
95
|
+
# @return [String, Array<Hash{Symbol=>Object}>, nil]
|
|
96
|
+
optional :system_, union: -> { Telnyx::AI::Anthropic::V1MessagesParams::System }, api_name: :system
|
|
97
|
+
|
|
98
|
+
# @!attribute temperature
|
|
99
|
+
# Amount of randomness injected into the response. Ranges from 0 to 1.
|
|
100
|
+
#
|
|
101
|
+
# @return [Float, nil]
|
|
102
|
+
optional :temperature, Float
|
|
103
|
+
|
|
104
|
+
# @!attribute thinking
|
|
105
|
+
# Extended thinking configuration for models that support it. Set `type` to
|
|
106
|
+
# `enabled` to turn on extended thinking.
|
|
107
|
+
#
|
|
108
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
109
|
+
optional :thinking, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
110
|
+
|
|
111
|
+
# @!attribute timeout
|
|
112
|
+
# Request timeout in seconds.
|
|
113
|
+
#
|
|
114
|
+
# @return [Float, nil]
|
|
115
|
+
optional :timeout, Float
|
|
116
|
+
|
|
117
|
+
# @!attribute tool_choice
|
|
118
|
+
# Controls how the model uses tools, following the Anthropic API format.
|
|
119
|
+
#
|
|
120
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
121
|
+
optional :tool_choice, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
122
|
+
|
|
123
|
+
# @!attribute tools
|
|
124
|
+
# Definitions of tools that the model may use, following the Anthropic API format.
|
|
125
|
+
#
|
|
126
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
127
|
+
optional :tools,
|
|
128
|
+
Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
|
|
129
|
+
|
|
130
|
+
# @!attribute top_k
|
|
131
|
+
# Top-k sampling parameter. Only sample from the top K options for each subsequent
|
|
132
|
+
# token.
|
|
133
|
+
#
|
|
134
|
+
# @return [Integer, nil]
|
|
135
|
+
optional :top_k, Integer
|
|
136
|
+
|
|
137
|
+
# @!attribute top_p
|
|
138
|
+
# Nucleus sampling parameter. Use temperature or top_p, but not both.
|
|
139
|
+
#
|
|
140
|
+
# @return [Float, nil]
|
|
141
|
+
optional :top_p, Float
|
|
142
|
+
|
|
143
|
+
# @!method initialize(max_tokens:, messages:, model:, api_key_ref: nil, billing_group_id: nil, fallback_config: nil, max_retries: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, timeout: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, request_options: {})
|
|
144
|
+
# Some parameter documentations has been truncated, see
|
|
145
|
+
# {Telnyx::Models::AI::Anthropic::V1MessagesParams} for more details.
|
|
146
|
+
#
|
|
147
|
+
# @param max_tokens [Integer] The maximum number of tokens to generate in the response.
|
|
148
|
+
#
|
|
149
|
+
# @param messages [Array<Hash{Symbol=>Object}>] The messages to send to the model, following the [Anthropic Messages API](https:
|
|
150
|
+
#
|
|
151
|
+
# @param model [String] The model to use for generating the response, for example `zai-org/GLM-5.2` or a
|
|
152
|
+
#
|
|
153
|
+
# @param api_key_ref [String] If you are using an external inference provider, this field allows you to pass a
|
|
154
|
+
#
|
|
155
|
+
# @param billing_group_id [String] The billing group ID to associate with this request.
|
|
156
|
+
#
|
|
157
|
+
# @param fallback_config [Hash{Symbol=>Object}] Configuration for model fallback behavior when the primary model is unavailable.
|
|
158
|
+
#
|
|
159
|
+
# @param max_retries [Integer] Maximum number of retries for the request.
|
|
160
|
+
#
|
|
161
|
+
# @param mcp_servers [Array<Hash{Symbol=>Object}>] List of MCP (Model Context Protocol) servers to make available to the model.
|
|
162
|
+
#
|
|
163
|
+
# @param metadata [Hash{Symbol=>Object}] An object describing metadata about the request.
|
|
164
|
+
#
|
|
165
|
+
# @param service_tier [String] Service tier for the request.
|
|
166
|
+
#
|
|
167
|
+
# @param stop_sequences [Array<String>] Custom sequences that will cause the model to stop generating.
|
|
168
|
+
#
|
|
169
|
+
# @param stream [Boolean] Whether to stream the response as Anthropic-format Server-Sent Events.
|
|
170
|
+
#
|
|
171
|
+
# @param system_ [String, Array<Hash{Symbol=>Object}>] System prompt. Can be a string or an array of content blocks following the Anthr
|
|
172
|
+
#
|
|
173
|
+
# @param temperature [Float] Amount of randomness injected into the response. Ranges from 0 to 1.
|
|
174
|
+
#
|
|
175
|
+
# @param thinking [Hash{Symbol=>Object}] Extended thinking configuration for models that support it. Set `type` to `enabl
|
|
176
|
+
#
|
|
177
|
+
# @param timeout [Float] Request timeout in seconds.
|
|
178
|
+
#
|
|
179
|
+
# @param tool_choice [Hash{Symbol=>Object}] Controls how the model uses tools, following the Anthropic API format.
|
|
180
|
+
#
|
|
181
|
+
# @param tools [Array<Hash{Symbol=>Object}>] Definitions of tools that the model may use, following the Anthropic API format.
|
|
182
|
+
#
|
|
183
|
+
# @param top_k [Integer] Top-k sampling parameter. Only sample from the top K options for each subsequent
|
|
184
|
+
#
|
|
185
|
+
# @param top_p [Float] Nucleus sampling parameter. Use temperature or top_p, but not both.
|
|
186
|
+
#
|
|
187
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
188
|
+
|
|
189
|
+
# System prompt. Can be a string or an array of content blocks following the
|
|
190
|
+
# Anthropic API format.
|
|
191
|
+
module System
|
|
192
|
+
extend Telnyx::Internal::Type::Union
|
|
193
|
+
|
|
194
|
+
variant String
|
|
195
|
+
|
|
196
|
+
variant -> { Telnyx::Models::AI::Anthropic::V1MessagesParams::System::UnionMember1Array }
|
|
197
|
+
|
|
198
|
+
# @!method self.variants
|
|
199
|
+
# @return [Array(String, Array<Hash{Symbol=>Object}>)]
|
|
200
|
+
|
|
201
|
+
# @type [Telnyx::Internal::Type::Converter]
|
|
202
|
+
UnionMember1Array =
|
|
203
|
+
Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
end
|
|
@@ -192,7 +192,7 @@ module Telnyx
|
|
|
192
192
|
# assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
193
193
|
# endpoints.
|
|
194
194
|
#
|
|
195
|
-
# @return [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>, nil]
|
|
195
|
+
# @return [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn, Telnyx::Models::AI::AssistantTool::Pay>, nil]
|
|
196
196
|
optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantTool] }
|
|
197
197
|
|
|
198
198
|
# @!attribute transcription
|
|
@@ -263,7 +263,7 @@ module Telnyx
|
|
|
263
263
|
#
|
|
264
264
|
# @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
|
|
265
265
|
#
|
|
266
|
-
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
266
|
+
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn, Telnyx::Models::AI::AssistantTool::Pay>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
267
267
|
#
|
|
268
268
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
269
269
|
#
|
|
@@ -13,6 +13,8 @@ module Telnyx
|
|
|
13
13
|
|
|
14
14
|
variant :webhook, -> { Telnyx::AI::InferenceEmbeddingWebhookToolParams }
|
|
15
15
|
|
|
16
|
+
variant :client_side_tool, -> { Telnyx::AI::AssistantTool::ClientSideTool }
|
|
17
|
+
|
|
16
18
|
variant :retrieval, -> { Telnyx::AI::RetrievalTool }
|
|
17
19
|
|
|
18
20
|
# The handoff tool allows the assistant to hand off control of the conversation to another AI assistant. By default, this will happen transparently to the end user.
|
|
@@ -33,6 +35,100 @@ module Telnyx
|
|
|
33
35
|
|
|
34
36
|
variant :skip_turn, -> { Telnyx::AI::AssistantTool::SkipTurn }
|
|
35
37
|
|
|
38
|
+
# (BETA) The pay tool allows the assistant to collect card payments from the caller via DTMF during the conversation. Recording is automatically paused while the pay tool is active and resumes when the payment flow completes. The connector_name must reference a pay connector configured in the Telnyx API.
|
|
39
|
+
variant :pay, -> { Telnyx::AI::AssistantTool::Pay }
|
|
40
|
+
|
|
41
|
+
class ClientSideTool < Telnyx::Internal::Type::BaseModel
|
|
42
|
+
# @!attribute client_side_tool
|
|
43
|
+
#
|
|
44
|
+
# @return [Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool]
|
|
45
|
+
required :client_side_tool, -> { Telnyx::AI::AssistantTool::ClientSideTool::ClientSideTool }
|
|
46
|
+
|
|
47
|
+
# @!attribute type
|
|
48
|
+
#
|
|
49
|
+
# @return [Symbol, :client_side_tool]
|
|
50
|
+
required :type, const: :client_side_tool
|
|
51
|
+
|
|
52
|
+
# @!method initialize(client_side_tool:, type: :client_side_tool)
|
|
53
|
+
# @param client_side_tool [Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool]
|
|
54
|
+
# @param type [Symbol, :client_side_tool]
|
|
55
|
+
|
|
56
|
+
# @see Telnyx::Models::AI::AssistantTool::ClientSideTool#client_side_tool
|
|
57
|
+
class ClientSideTool < Telnyx::Internal::Type::BaseModel
|
|
58
|
+
# @!attribute description
|
|
59
|
+
# The description of the tool.
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
required :description, String
|
|
63
|
+
|
|
64
|
+
# @!attribute name
|
|
65
|
+
# The name of the tool.
|
|
66
|
+
#
|
|
67
|
+
# @return [String]
|
|
68
|
+
required :name, String
|
|
69
|
+
|
|
70
|
+
# @!attribute parameters
|
|
71
|
+
# The parameters the tool accepts, described as a JSON Schema object. See the
|
|
72
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
73
|
+
# documentation about the format
|
|
74
|
+
#
|
|
75
|
+
# @return [Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool::Parameters]
|
|
76
|
+
required :parameters, -> { Telnyx::AI::AssistantTool::ClientSideTool::ClientSideTool::Parameters }
|
|
77
|
+
|
|
78
|
+
# @!method initialize(description:, name:, parameters:)
|
|
79
|
+
# Some parameter documentations has been truncated, see
|
|
80
|
+
# {Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool} for more
|
|
81
|
+
# details.
|
|
82
|
+
#
|
|
83
|
+
# @param description [String] The description of the tool.
|
|
84
|
+
#
|
|
85
|
+
# @param name [String] The name of the tool.
|
|
86
|
+
#
|
|
87
|
+
# @param parameters [Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool::Parameters] The parameters the tool accepts, described as a JSON Schema object. See the [JSO
|
|
88
|
+
|
|
89
|
+
# @see Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool#parameters
|
|
90
|
+
class Parameters < Telnyx::Internal::Type::BaseModel
|
|
91
|
+
# @!attribute properties
|
|
92
|
+
# The properties of the parameters.
|
|
93
|
+
#
|
|
94
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
95
|
+
optional :properties, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
96
|
+
|
|
97
|
+
# @!attribute required
|
|
98
|
+
# The required properties of the parameters.
|
|
99
|
+
#
|
|
100
|
+
# @return [Array<String>, nil]
|
|
101
|
+
optional :required, Telnyx::Internal::Type::ArrayOf[String]
|
|
102
|
+
|
|
103
|
+
# @!attribute type
|
|
104
|
+
#
|
|
105
|
+
# @return [Symbol, Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool::Parameters::Type, nil]
|
|
106
|
+
optional :type, enum: -> { Telnyx::AI::AssistantTool::ClientSideTool::ClientSideTool::Parameters::Type }
|
|
107
|
+
|
|
108
|
+
# @!method initialize(properties: nil, required: nil, type: nil)
|
|
109
|
+
# The parameters the tool accepts, described as a JSON Schema object. See the
|
|
110
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema) for
|
|
111
|
+
# documentation about the format
|
|
112
|
+
#
|
|
113
|
+
# @param properties [Hash{Symbol=>Object}] The properties of the parameters.
|
|
114
|
+
#
|
|
115
|
+
# @param required [Array<String>] The required properties of the parameters.
|
|
116
|
+
#
|
|
117
|
+
# @param type [Symbol, Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool::Parameters::Type]
|
|
118
|
+
|
|
119
|
+
# @see Telnyx::Models::AI::AssistantTool::ClientSideTool::ClientSideTool::Parameters#type
|
|
120
|
+
module Type
|
|
121
|
+
extend Telnyx::Internal::Type::Enum
|
|
122
|
+
|
|
123
|
+
OBJECT = :object
|
|
124
|
+
|
|
125
|
+
# @!method self.values
|
|
126
|
+
# @return [Array<Symbol>]
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
36
132
|
class Handoff < Telnyx::Internal::Type::BaseModel
|
|
37
133
|
# @!attribute handoff
|
|
38
134
|
#
|
|
@@ -952,8 +1048,29 @@ module Telnyx
|
|
|
952
1048
|
end
|
|
953
1049
|
end
|
|
954
1050
|
|
|
1051
|
+
class Pay < Telnyx::Internal::Type::BaseModel
|
|
1052
|
+
# @!attribute pay
|
|
1053
|
+
#
|
|
1054
|
+
# @return [Telnyx::Models::AI::PayToolParams]
|
|
1055
|
+
required :pay, -> { Telnyx::AI::PayToolParams }
|
|
1056
|
+
|
|
1057
|
+
# @!attribute type
|
|
1058
|
+
#
|
|
1059
|
+
# @return [Symbol, :pay]
|
|
1060
|
+
required :type, const: :pay
|
|
1061
|
+
|
|
1062
|
+
# @!method initialize(pay:, type: :pay)
|
|
1063
|
+
# (BETA) The pay tool allows the assistant to collect card payments from the
|
|
1064
|
+
# caller via DTMF during the conversation. Recording is automatically paused while
|
|
1065
|
+
# the pay tool is active and resumes when the payment flow completes. The
|
|
1066
|
+
# connector_name must reference a pay connector configured in the Telnyx API.
|
|
1067
|
+
#
|
|
1068
|
+
# @param pay [Telnyx::Models::AI::PayToolParams]
|
|
1069
|
+
# @param type [Symbol, :pay]
|
|
1070
|
+
end
|
|
1071
|
+
|
|
955
1072
|
# @!method self.variants
|
|
956
|
-
# @return [Array(Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn)]
|
|
1073
|
+
# @return [Array(Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn, Telnyx::Models::AI::AssistantTool::Pay)]
|
|
957
1074
|
end
|
|
958
1075
|
end
|
|
959
1076
|
end
|
|
@@ -204,7 +204,7 @@ module Telnyx
|
|
|
204
204
|
# assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
205
205
|
# endpoints.
|
|
206
206
|
#
|
|
207
|
-
# @return [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>, nil]
|
|
207
|
+
# @return [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn, Telnyx::Models::AI::AssistantTool::Pay>, nil]
|
|
208
208
|
optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantTool] }
|
|
209
209
|
|
|
210
210
|
# @!attribute transcription
|
|
@@ -285,7 +285,7 @@ module Telnyx
|
|
|
285
285
|
#
|
|
286
286
|
# @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
|
|
287
287
|
#
|
|
288
|
-
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
288
|
+
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn, Telnyx::Models::AI::AssistantTool::Pay>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
289
289
|
#
|
|
290
290
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
291
291
|
#
|
|
@@ -189,7 +189,7 @@ module Telnyx
|
|
|
189
189
|
# assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
190
190
|
# endpoints.
|
|
191
191
|
#
|
|
192
|
-
# @return [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>, nil]
|
|
192
|
+
# @return [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn, Telnyx::Models::AI::AssistantTool::Pay>, nil]
|
|
193
193
|
optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantTool] }
|
|
194
194
|
|
|
195
195
|
# @!attribute transcription
|
|
@@ -266,7 +266,7 @@ module Telnyx
|
|
|
266
266
|
#
|
|
267
267
|
# @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
|
|
268
268
|
#
|
|
269
|
-
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
269
|
+
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn, Telnyx::Models::AI::AssistantTool::Pay>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
270
270
|
#
|
|
271
271
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
272
272
|
#
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module Conversations
|
|
7
|
+
# @see Telnyx::Resources::AI::Conversations::ConversationInsights#retrieve_aggregates
|
|
8
|
+
class ConversationInsightRetrieveAggregatesParams < Telnyx::Internal::Type::BaseModel
|
|
9
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
# Filter by creation datetime to scope the aggregation window. Supports range
|
|
14
|
+
# operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
|
|
15
|
+
# range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
|
|
16
|
+
# series (as the portal does for the 'Insights Over Time' chart), issue one
|
|
17
|
+
# request per day bounded by `created_at=gte.<day_start>` and
|
|
18
|
+
# `created_at=lt.<next_day_start>`.
|
|
19
|
+
#
|
|
20
|
+
# @return [String, nil]
|
|
21
|
+
optional :created_at, String
|
|
22
|
+
|
|
23
|
+
# @!attribute group_by
|
|
24
|
+
# Fields to group by (can be comma-separated or multiple parameters). Prefix a
|
|
25
|
+
# field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
|
|
26
|
+
# conversation's metadata instead of the insight result.
|
|
27
|
+
#
|
|
28
|
+
# Common fields used for over-time charts:
|
|
29
|
+
#
|
|
30
|
+
# - `score` — Group by the insight's score value (e.g. for Agent Instruction
|
|
31
|
+
# Following, User Satisfaction).
|
|
32
|
+
# - `metadata.assistant_id` — Group by the assistant that handled the
|
|
33
|
+
# conversation.
|
|
34
|
+
# - `metadata.assistant_version_id` — Group by the assistant version, useful for
|
|
35
|
+
# comparing performance across versions in the portal's 'Insights Over Time'
|
|
36
|
+
# chart.
|
|
37
|
+
# - `metadata.telnyx_conversation_channel` — Group by conversation channel
|
|
38
|
+
# (phone_call, web_chat, etc.).
|
|
39
|
+
#
|
|
40
|
+
# @return [Array<String>, nil]
|
|
41
|
+
optional :group_by, Telnyx::Internal::Type::ArrayOf[String]
|
|
42
|
+
|
|
43
|
+
# @!attribute insight_id
|
|
44
|
+
# Optional insight ID to filter conversation insights. Only insights matching this
|
|
45
|
+
# ID will be included in the aggregation.
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :insight_id, String
|
|
49
|
+
|
|
50
|
+
# @!attribute metadata
|
|
51
|
+
#
|
|
52
|
+
# @return [Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata, nil]
|
|
53
|
+
optional :metadata,
|
|
54
|
+
-> { Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata }
|
|
55
|
+
|
|
56
|
+
# @!attribute show
|
|
57
|
+
# Fields to include in the result (can be comma-separated or multiple parameters).
|
|
58
|
+
# Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
|
|
59
|
+
# contain the grouped field values plus a `record_count` indicating how many
|
|
60
|
+
# conversation insights match that combination.
|
|
61
|
+
#
|
|
62
|
+
# @return [Array<String>, nil]
|
|
63
|
+
optional :show, Telnyx::Internal::Type::ArrayOf[String]
|
|
64
|
+
|
|
65
|
+
# @!method initialize(created_at: nil, group_by: nil, insight_id: nil, metadata: nil, show: nil, request_options: {})
|
|
66
|
+
# Some parameter documentations has been truncated, see
|
|
67
|
+
# {Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams}
|
|
68
|
+
# for more details.
|
|
69
|
+
#
|
|
70
|
+
# @param created_at [String] Filter by creation datetime to scope the aggregation window. Supports range oper
|
|
71
|
+
#
|
|
72
|
+
# @param group_by [Array<String>] Fields to group by (can be comma-separated or multiple parameters). Prefix a fie
|
|
73
|
+
#
|
|
74
|
+
# @param insight_id [String] Optional insight ID to filter conversation insights. Only insights matching this
|
|
75
|
+
#
|
|
76
|
+
# @param metadata [Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata]
|
|
77
|
+
#
|
|
78
|
+
# @param show [Array<String>] Fields to include in the result (can be comma-separated or multiple parameters).
|
|
79
|
+
#
|
|
80
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
81
|
+
|
|
82
|
+
class Metadata < Telnyx::Internal::Type::BaseModel
|
|
83
|
+
# @!attribute assistant_id
|
|
84
|
+
# Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When
|
|
85
|
+
# provided, only conversation insights for the specified assistant are aggregated.
|
|
86
|
+
# Used by the portal to scope the 'Insights Over Time' chart to a single
|
|
87
|
+
# assistant.
|
|
88
|
+
#
|
|
89
|
+
# @return [String, nil]
|
|
90
|
+
optional :assistant_id, String
|
|
91
|
+
|
|
92
|
+
# @!method initialize(assistant_id: nil)
|
|
93
|
+
# Some parameter documentations has been truncated, see
|
|
94
|
+
# {Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata}
|
|
95
|
+
# for more details.
|
|
96
|
+
#
|
|
97
|
+
# @param assistant_id [String] Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When p
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|