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
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module Storage
|
|
6
|
+
# @see Telnyx::Resources::Storage::Cloudfs#create
|
|
7
|
+
class CloudfsFilesystemResponseWrapper < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# A CloudFS filesystem, including its metadata credential. This shape is returned
|
|
10
|
+
# only by create and rotate-meta-token.
|
|
11
|
+
#
|
|
12
|
+
# @return [Telnyx::Models::Storage::CloudfsFilesystemResponseWrapper::Data, nil]
|
|
13
|
+
optional :data, -> { Telnyx::Storage::CloudfsFilesystemResponseWrapper::Data }
|
|
14
|
+
|
|
15
|
+
# @!method initialize(data: nil)
|
|
16
|
+
# Some parameter documentations has been truncated, see
|
|
17
|
+
# {Telnyx::Models::Storage::CloudfsFilesystemResponseWrapper} for more details.
|
|
18
|
+
#
|
|
19
|
+
# @param data [Telnyx::Models::Storage::CloudfsFilesystemResponseWrapper::Data] A CloudFS filesystem, including its metadata credential. This shape is returned
|
|
20
|
+
|
|
21
|
+
# @see Telnyx::Models::Storage::CloudfsFilesystemResponseWrapper#data
|
|
22
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute id
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :id, String
|
|
27
|
+
|
|
28
|
+
# @!attribute created_at
|
|
29
|
+
#
|
|
30
|
+
# @return [Time, nil]
|
|
31
|
+
optional :created_at, Time
|
|
32
|
+
|
|
33
|
+
# @!attribute meta_token
|
|
34
|
+
# Metadata access token, in cleartext. Returned only by create and
|
|
35
|
+
# rotate-meta-token and not retrievable afterwards — store it securely.
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :meta_token, String
|
|
39
|
+
|
|
40
|
+
# @!attribute meta_url
|
|
41
|
+
# PostgreSQL connection URL for the filesystem's metadata database. In create and
|
|
42
|
+
# rotate-meta-token responses it embeds the metadata token as the password:
|
|
43
|
+
# `postgres://<database>:<meta_token>@us-east-1.telnyxcloudfs.com:5432/<database>?sslmode=require`
|
|
44
|
+
# (the example below is shown without the credential; the actual response includes
|
|
45
|
+
# it). Pass it to `juicefs mount`: the storage configuration is baked in at
|
|
46
|
+
# provisioning, so the metadata URL is all a client needs to mount the filesystem.
|
|
47
|
+
#
|
|
48
|
+
# @return [String, nil]
|
|
49
|
+
optional :meta_url, String
|
|
50
|
+
|
|
51
|
+
# @!attribute name
|
|
52
|
+
#
|
|
53
|
+
# @return [String, nil]
|
|
54
|
+
optional :name, String
|
|
55
|
+
|
|
56
|
+
# @!attribute record_type
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :record_type, String
|
|
60
|
+
|
|
61
|
+
# @!attribute region
|
|
62
|
+
#
|
|
63
|
+
# @return [String, nil]
|
|
64
|
+
optional :region, String
|
|
65
|
+
|
|
66
|
+
# @!attribute s3_bucket
|
|
67
|
+
# Name of the bucket that stores this filesystem's data. Created during
|
|
68
|
+
# provisioning.
|
|
69
|
+
#
|
|
70
|
+
# @return [String, nil]
|
|
71
|
+
optional :s3_bucket, String
|
|
72
|
+
|
|
73
|
+
# @!attribute s3_endpoint
|
|
74
|
+
# URL of the Telnyx Cloud Storage endpoint backing this filesystem.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
optional :s3_endpoint, String
|
|
78
|
+
|
|
79
|
+
# @!attribute status
|
|
80
|
+
# Lifecycle status of the filesystem. `ready` means it is fully provisioned and
|
|
81
|
+
# usable. `needs_format` means the storage bucket and metadata database were
|
|
82
|
+
# provisioned but the filesystem has not yet been formatted — run `juicefs format`
|
|
83
|
+
# with the filesystem's `meta_url` before mounting. `failed` means the last
|
|
84
|
+
# lifecycle action failed — see the filesystem's `error` message. `deleted`
|
|
85
|
+
# appears only in the delete response: deleted filesystems are excluded from list
|
|
86
|
+
# results and return a `404` on retrieval.
|
|
87
|
+
#
|
|
88
|
+
# @return [Symbol, Telnyx::Models::Storage::CloudfsFilesystemStatus, nil]
|
|
89
|
+
optional :status, enum: -> { Telnyx::Storage::CloudfsFilesystemStatus }
|
|
90
|
+
|
|
91
|
+
# @!attribute updated_at
|
|
92
|
+
#
|
|
93
|
+
# @return [Time, nil]
|
|
94
|
+
optional :updated_at, Time
|
|
95
|
+
|
|
96
|
+
# @!method initialize(id: nil, created_at: nil, meta_token: nil, meta_url: nil, name: nil, record_type: nil, region: nil, s3_bucket: nil, s3_endpoint: nil, status: nil, updated_at: nil)
|
|
97
|
+
# Some parameter documentations has been truncated, see
|
|
98
|
+
# {Telnyx::Models::Storage::CloudfsFilesystemResponseWrapper::Data} for more
|
|
99
|
+
# details.
|
|
100
|
+
#
|
|
101
|
+
# A CloudFS filesystem, including its metadata credential. This shape is returned
|
|
102
|
+
# only by create and rotate-meta-token.
|
|
103
|
+
#
|
|
104
|
+
# @param id [String]
|
|
105
|
+
#
|
|
106
|
+
# @param created_at [Time]
|
|
107
|
+
#
|
|
108
|
+
# @param meta_token [String] Metadata access token, in cleartext. Returned only by create and rotate-meta-tok
|
|
109
|
+
#
|
|
110
|
+
# @param meta_url [String] PostgreSQL connection URL for the filesystem's metadata database. In create and
|
|
111
|
+
#
|
|
112
|
+
# @param name [String]
|
|
113
|
+
#
|
|
114
|
+
# @param record_type [String]
|
|
115
|
+
#
|
|
116
|
+
# @param region [String]
|
|
117
|
+
#
|
|
118
|
+
# @param s3_bucket [String] Name of the bucket that stores this filesystem's data. Created during provisioni
|
|
119
|
+
#
|
|
120
|
+
# @param s3_endpoint [String] URL of the Telnyx Cloud Storage endpoint backing this filesystem.
|
|
121
|
+
#
|
|
122
|
+
# @param status [Symbol, Telnyx::Models::Storage::CloudfsFilesystemStatus] Lifecycle status of the filesystem. `ready` means it is fully provisioned and us
|
|
123
|
+
#
|
|
124
|
+
# @param updated_at [Time]
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module Storage
|
|
6
|
+
# Lifecycle status of the filesystem. `ready` means it is fully provisioned and
|
|
7
|
+
# usable. `needs_format` means the storage bucket and metadata database were
|
|
8
|
+
# provisioned but the filesystem has not yet been formatted — run `juicefs format`
|
|
9
|
+
# with the filesystem's `meta_url` before mounting. `failed` means the last
|
|
10
|
+
# lifecycle action failed — see the filesystem's `error` message. `deleted`
|
|
11
|
+
# appears only in the delete response: deleted filesystems are excluded from list
|
|
12
|
+
# results and return a `404` on retrieval.
|
|
13
|
+
module CloudfsFilesystemStatus
|
|
14
|
+
extend Telnyx::Internal::Type::Enum
|
|
15
|
+
|
|
16
|
+
PROVISIONING = :provisioning
|
|
17
|
+
READY = :ready
|
|
18
|
+
NEEDS_FORMAT = :needs_format
|
|
19
|
+
DELETING = :deleting
|
|
20
|
+
FAILED = :failed
|
|
21
|
+
DELETED = :deleted
|
|
22
|
+
|
|
23
|
+
# @!method self.values
|
|
24
|
+
# @return [Array<Symbol>]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -71,7 +71,9 @@ module Telnyx
|
|
|
71
71
|
# @!attribute telnyx
|
|
72
72
|
# Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
|
|
73
73
|
# `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
|
|
74
|
-
# `volume`, and `emotion`.
|
|
74
|
+
# `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
|
|
75
|
+
# or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
|
|
76
|
+
# restricted to `mp3` or `pcm` (no `wav`).
|
|
75
77
|
#
|
|
76
78
|
# @return [::Telnyx::Models::TextToSpeechGenerateSpeechParams::Telnyx, nil]
|
|
77
79
|
optional :telnyx, -> { ::Telnyx::TextToSpeechGenerateSpeechParams::Telnyx }
|
|
@@ -91,10 +93,10 @@ module Telnyx
|
|
|
91
93
|
# @!attribute voice
|
|
92
94
|
# Voice identifier in the format `provider.model_id.voice_id` or
|
|
93
95
|
# `provider.voice_id`. Examples: `telnyx.NaturalHD.Alloy`,
|
|
94
|
-
# `Telnyx.Ultra.<voice_id>`, `
|
|
95
|
-
# `aws.Polly.Generative.Lucia`. When
|
|
96
|
-
# `voice_id` are extracted automatically and
|
|
97
|
-
# parameters.
|
|
96
|
+
# `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
|
|
97
|
+
# `azure.en-US-AvaMultilingualNeural`, `aws.Polly.Generative.Lucia`. When
|
|
98
|
+
# provided, `provider`, `model_id`, and `voice_id` are extracted automatically and
|
|
99
|
+
# take precedence over individual parameters.
|
|
98
100
|
#
|
|
99
101
|
# @return [String, nil]
|
|
100
102
|
optional :voice, String
|
|
@@ -486,7 +488,8 @@ module Telnyx
|
|
|
486
488
|
optional :temperature, Float
|
|
487
489
|
|
|
488
490
|
# @!attribute voice_speed
|
|
489
|
-
# Voice speed multiplier. Applies to all models
|
|
491
|
+
# Voice speed multiplier. Applies to all models except `Bayan` and `Sukhan`, which
|
|
492
|
+
# don't support it. Range: 0.5 to 2.0.
|
|
490
493
|
#
|
|
491
494
|
# @return [Float, nil]
|
|
492
495
|
optional :voice_speed, Float
|
|
@@ -503,7 +506,9 @@ module Telnyx
|
|
|
503
506
|
#
|
|
504
507
|
# Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
|
|
505
508
|
# `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
|
|
506
|
-
# `volume`, and `emotion`.
|
|
509
|
+
# `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
|
|
510
|
+
# or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
|
|
511
|
+
# restricted to `mp3` or `pcm` (no `wav`).
|
|
507
512
|
#
|
|
508
513
|
# @param emotion [Symbol, ::Telnyx::Models::TextToSpeechGenerateSpeechParams::Telnyx::Emotion] Emotion control for the Ultra model. Adjusts the emotional tone of the synthesiz
|
|
509
514
|
#
|
|
@@ -513,7 +518,7 @@ module Telnyx
|
|
|
513
518
|
#
|
|
514
519
|
# @param temperature [Float] Sampling temperature. Applies to `Natural` and `NaturalHD` models only.
|
|
515
520
|
#
|
|
516
|
-
# @param voice_speed [Float] Voice speed multiplier. Applies to all models
|
|
521
|
+
# @param voice_speed [Float] Voice speed multiplier. Applies to all models except `Bayan` and `Sukhan`, which
|
|
517
522
|
#
|
|
518
523
|
# @param volume [Float] Volume level for the Ultra model. Range: 0.0 to 2.0.
|
|
519
524
|
|
|
@@ -45,10 +45,10 @@ module Telnyx
|
|
|
45
45
|
# @!attribute voice
|
|
46
46
|
# Voice identifier in the format `provider.model_id.voice_id` or
|
|
47
47
|
# `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy`,
|
|
48
|
-
# `Telnyx.Ultra.<voice_id>`,
|
|
49
|
-
# provided, the `provider`,
|
|
50
|
-
# automatically. Takes precedence over
|
|
51
|
-
# parameters.
|
|
48
|
+
# `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
|
|
49
|
+
# or `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`,
|
|
50
|
+
# `model_id`, and `voice_id` are extracted automatically. Takes precedence over
|
|
51
|
+
# individual `provider`/`model_id`/`voice_id` parameters.
|
|
52
52
|
#
|
|
53
53
|
# @return [String, nil]
|
|
54
54
|
optional :voice, String
|
|
@@ -301,7 +301,7 @@ module Telnyx
|
|
|
301
301
|
optional :sender_phone_number, String, nil?: true
|
|
302
302
|
|
|
303
303
|
# @!attribute template_id
|
|
304
|
-
# Customer pre-approved authentication template
|
|
304
|
+
# Customer pre-approved authentication template ID registered on Meta
|
|
305
305
|
#
|
|
306
306
|
# @return [String, nil]
|
|
307
307
|
optional :template_id, String, nil?: true
|
|
@@ -336,7 +336,7 @@ module Telnyx
|
|
|
336
336
|
#
|
|
337
337
|
# @param sender_phone_number [String, nil] Phone number registered on the customer WABA to send OTPs from
|
|
338
338
|
#
|
|
339
|
-
# @param template_id [String, nil] Customer pre-approved authentication template
|
|
339
|
+
# @param template_id [String, nil] Customer pre-approved authentication template ID registered on Meta
|
|
340
340
|
#
|
|
341
341
|
# @param waba_id [String, nil] Customer Meta WABA ID for Bring-Your-Own-WABA sending
|
|
342
342
|
#
|
|
@@ -254,7 +254,7 @@ module Telnyx
|
|
|
254
254
|
optional :sender_phone_number, String, nil?: true
|
|
255
255
|
|
|
256
256
|
# @!attribute template_id
|
|
257
|
-
# Customer pre-approved authentication template
|
|
257
|
+
# Customer pre-approved authentication template ID registered on Meta
|
|
258
258
|
#
|
|
259
259
|
# @return [String, nil]
|
|
260
260
|
optional :template_id, String, nil?: true
|
|
@@ -283,7 +283,7 @@ module Telnyx
|
|
|
283
283
|
#
|
|
284
284
|
# @param sender_phone_number [String, nil] Phone number registered on the customer WABA to send OTPs from
|
|
285
285
|
#
|
|
286
|
-
# @param template_id [String, nil] Customer pre-approved authentication template
|
|
286
|
+
# @param template_id [String, nil] Customer pre-approved authentication template ID registered on Meta
|
|
287
287
|
#
|
|
288
288
|
# @param waba_id [String, nil] Customer Meta WABA ID for Bring-Your-Own-WABA sending
|
|
289
289
|
#
|
|
@@ -216,7 +216,7 @@ module Telnyx
|
|
|
216
216
|
optional :sender_phone_number, String, nil?: true
|
|
217
217
|
|
|
218
218
|
# @!attribute template_id
|
|
219
|
-
# Customer pre-approved authentication template
|
|
219
|
+
# Customer pre-approved authentication template ID registered on Meta
|
|
220
220
|
#
|
|
221
221
|
# @return [String, nil]
|
|
222
222
|
optional :template_id, String, nil?: true
|
|
@@ -245,7 +245,7 @@ module Telnyx
|
|
|
245
245
|
#
|
|
246
246
|
# @param sender_phone_number [String, nil] Phone number registered on the customer WABA to send OTPs from
|
|
247
247
|
#
|
|
248
|
-
# @param template_id [String, nil] Customer pre-approved authentication template
|
|
248
|
+
# @param template_id [String, nil] Customer pre-approved authentication template ID registered on Meta
|
|
249
249
|
#
|
|
250
250
|
# @param waba_id [String, nil] Customer Meta WABA ID for Bring-Your-Own-WABA sending
|
|
251
251
|
#
|
data/lib/telnyx/models.rb
CHANGED
|
@@ -85,12 +85,8 @@ module Telnyx
|
|
|
85
85
|
|
|
86
86
|
AI = Telnyx::Models::AI
|
|
87
87
|
|
|
88
|
-
AICreateResponseDeprecatedParams = Telnyx::Models::AICreateResponseDeprecatedParams
|
|
89
|
-
|
|
90
88
|
AIRetrieveConversationHistoriesParams = Telnyx::Models::AIRetrieveConversationHistoriesParams
|
|
91
89
|
|
|
92
|
-
AIRetrieveModelsParams = Telnyx::Models::AIRetrieveModelsParams
|
|
93
|
-
|
|
94
90
|
AISummarizeParams = Telnyx::Models::AISummarizeParams
|
|
95
91
|
|
|
96
92
|
AlphanumericSenderID = Telnyx::Models::AlphanumericSenderID
|
|
@@ -930,8 +926,6 @@ module Telnyx
|
|
|
930
926
|
|
|
931
927
|
MessageSendShortCodeParams = Telnyx::Models::MessageSendShortCodeParams
|
|
932
928
|
|
|
933
|
-
MessageSendWhatsappParams = Telnyx::Models::MessageSendWhatsappParams
|
|
934
|
-
|
|
935
929
|
MessageSendWithAlphanumericSenderParams = Telnyx::Models::MessageSendWithAlphanumericSenderParams
|
|
936
930
|
|
|
937
931
|
MessageTemplate = Telnyx::Models::MessageTemplate
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Anthropic
|
|
7
|
+
class V1
|
|
8
|
+
# Some parameter documentations has been truncated, see
|
|
9
|
+
# {Telnyx::Models::AI::Anthropic::V1MessagesParams} for more details.
|
|
10
|
+
#
|
|
11
|
+
# Send a message to a language model using the Anthropic Messages API format. This
|
|
12
|
+
# endpoint is compatible with the
|
|
13
|
+
# [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) and may be
|
|
14
|
+
# used with the Anthropic JS or Python SDK by setting the base URL to
|
|
15
|
+
# `https://api.telnyx.com/v2/ai/anthropic`.
|
|
16
|
+
#
|
|
17
|
+
# The endpoint translates Anthropic-format requests into Telnyx's inference
|
|
18
|
+
# internals, then translates the response back to the Anthropic message shape.
|
|
19
|
+
# Streaming responses use Anthropic SSE event types (`message_start`,
|
|
20
|
+
# `content_block_start`, `content_block_delta`, `content_block_stop`,
|
|
21
|
+
# `message_delta`, `message_stop`).
|
|
22
|
+
#
|
|
23
|
+
# @overload messages(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: {})
|
|
24
|
+
#
|
|
25
|
+
# @param max_tokens [Integer] The maximum number of tokens to generate in the response.
|
|
26
|
+
#
|
|
27
|
+
# @param messages [Array<Hash{Symbol=>Object}>] The messages to send to the model, following the [Anthropic Messages API](https:
|
|
28
|
+
#
|
|
29
|
+
# @param model [String] The model to use for generating the response, for example `zai-org/GLM-5.2` or a
|
|
30
|
+
#
|
|
31
|
+
# @param api_key_ref [String] If you are using an external inference provider, this field allows you to pass a
|
|
32
|
+
#
|
|
33
|
+
# @param billing_group_id [String] The billing group ID to associate with this request.
|
|
34
|
+
#
|
|
35
|
+
# @param fallback_config [Hash{Symbol=>Object}] Configuration for model fallback behavior when the primary model is unavailable.
|
|
36
|
+
#
|
|
37
|
+
# @param max_retries [Integer] Maximum number of retries for the request.
|
|
38
|
+
#
|
|
39
|
+
# @param mcp_servers [Array<Hash{Symbol=>Object}>] List of MCP (Model Context Protocol) servers to make available to the model.
|
|
40
|
+
#
|
|
41
|
+
# @param metadata [Hash{Symbol=>Object}] An object describing metadata about the request.
|
|
42
|
+
#
|
|
43
|
+
# @param service_tier [String] Service tier for the request.
|
|
44
|
+
#
|
|
45
|
+
# @param stop_sequences [Array<String>] Custom sequences that will cause the model to stop generating.
|
|
46
|
+
#
|
|
47
|
+
# @param stream [Boolean] Whether to stream the response as Anthropic-format Server-Sent Events.
|
|
48
|
+
#
|
|
49
|
+
# @param system_ [String, Array<Hash{Symbol=>Object}>] System prompt. Can be a string or an array of content blocks following the Anthr
|
|
50
|
+
#
|
|
51
|
+
# @param temperature [Float] Amount of randomness injected into the response. Ranges from 0 to 1.
|
|
52
|
+
#
|
|
53
|
+
# @param thinking [Hash{Symbol=>Object}] Extended thinking configuration for models that support it. Set `type` to `enabl
|
|
54
|
+
#
|
|
55
|
+
# @param timeout [Float] Request timeout in seconds.
|
|
56
|
+
#
|
|
57
|
+
# @param tool_choice [Hash{Symbol=>Object}] Controls how the model uses tools, following the Anthropic API format.
|
|
58
|
+
#
|
|
59
|
+
# @param tools [Array<Hash{Symbol=>Object}>] Definitions of tools that the model may use, following the Anthropic API format.
|
|
60
|
+
#
|
|
61
|
+
# @param top_k [Integer] Top-k sampling parameter. Only sample from the top K options for each subsequent
|
|
62
|
+
#
|
|
63
|
+
# @param top_p [Float] Nucleus sampling parameter. Use temperature or top_p, but not both.
|
|
64
|
+
#
|
|
65
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
66
|
+
#
|
|
67
|
+
# @return [Hash{Symbol=>Object}]
|
|
68
|
+
#
|
|
69
|
+
# @see Telnyx::Models::AI::Anthropic::V1MessagesParams
|
|
70
|
+
def messages(params)
|
|
71
|
+
parsed, options = Telnyx::AI::Anthropic::V1MessagesParams.dump_request(params)
|
|
72
|
+
@client.request(
|
|
73
|
+
method: :post,
|
|
74
|
+
path: "ai/anthropic/v1/messages",
|
|
75
|
+
body: parsed,
|
|
76
|
+
model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
|
|
77
|
+
options: options
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# @api private
|
|
82
|
+
#
|
|
83
|
+
# @param client [Telnyx::Client]
|
|
84
|
+
def initialize(client:)
|
|
85
|
+
@client = client
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Anthropic
|
|
7
|
+
# @return [Telnyx::Resources::AI::Anthropic::V1]
|
|
8
|
+
attr_reader :v1
|
|
9
|
+
|
|
10
|
+
# @api private
|
|
11
|
+
#
|
|
12
|
+
# @param client [Telnyx::Client]
|
|
13
|
+
def initialize(client:)
|
|
14
|
+
@client = client
|
|
15
|
+
@v1 = Telnyx::Resources::AI::Anthropic::V1.new(client: client)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -97,7 +97,7 @@ module Telnyx
|
|
|
97
97
|
#
|
|
98
98
|
# @param tool_ids [Array<String>] Body param: IDs of shared tools to attach to the assistant. New integrations sho
|
|
99
99
|
#
|
|
100
|
-
# @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>] Body param: Deprecated for new integrations. Inline tool definitions available t
|
|
100
|
+
# @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>] Body param: Deprecated for new integrations. Inline tool definitions available t
|
|
101
101
|
#
|
|
102
102
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings] Body param
|
|
103
103
|
#
|
|
@@ -88,7 +88,7 @@ module Telnyx
|
|
|
88
88
|
#
|
|
89
89
|
# @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
|
|
90
90
|
#
|
|
91
|
-
# @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
|
|
91
|
+
# @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
|
|
92
92
|
#
|
|
93
93
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
94
94
|
#
|
|
@@ -202,7 +202,7 @@ module Telnyx
|
|
|
202
202
|
#
|
|
203
203
|
# @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
|
|
204
204
|
#
|
|
205
|
-
# @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
|
|
205
|
+
# @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
|
|
206
206
|
#
|
|
207
207
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
208
208
|
#
|
|
@@ -3,88 +3,7 @@
|
|
|
3
3
|
module Telnyx
|
|
4
4
|
module Resources
|
|
5
5
|
class AI
|
|
6
|
-
# Generate text with LLMs
|
|
7
6
|
class Chat
|
|
8
|
-
# @deprecated
|
|
9
|
-
#
|
|
10
|
-
# Some parameter documentations has been truncated, see
|
|
11
|
-
# {Telnyx::Models::AI::ChatCreateCompletionParams} for more details.
|
|
12
|
-
#
|
|
13
|
-
# **Deprecated**: Use `POST /v2/ai/openai/chat/completions` instead. Chat with a
|
|
14
|
-
# language model. This endpoint is consistent with the
|
|
15
|
-
# [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat)
|
|
16
|
-
# and may be used with the OpenAI JS or Python SDK.
|
|
17
|
-
#
|
|
18
|
-
# @overload create_completion(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, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil, request_options: {})
|
|
19
|
-
#
|
|
20
|
-
# @param messages [Array<Telnyx::Models::AI::ChatCompletionRequest::Message>] A list of the previous chat messages for context.
|
|
21
|
-
#
|
|
22
|
-
# @param api_key_ref [String] If you are using an external inference provider like xAI or OpenAI, this field a
|
|
23
|
-
#
|
|
24
|
-
# @param best_of [Integer] This is used with `use_beam_search` to determine how many candidate beams to exp
|
|
25
|
-
#
|
|
26
|
-
# @param early_stopping [Boolean] This is used with `use_beam_search`. If `true`, generation stops as soon as ther
|
|
27
|
-
#
|
|
28
|
-
# @param enable_thinking [Boolean] Whether to enable the thinking/reasoning phase for models that support it (e.g.,
|
|
29
|
-
#
|
|
30
|
-
# @param frequency_penalty [Float] Higher values will penalize the model from repeating the same output tokens.
|
|
31
|
-
#
|
|
32
|
-
# @param guided_choice [Array<String>] If specified, the output will be exactly one of the choices.
|
|
33
|
-
#
|
|
34
|
-
# @param guided_json [Hash{Symbol=>Object}] Must be a valid JSON schema. If specified, the output will follow the JSON schem
|
|
35
|
-
#
|
|
36
|
-
# @param guided_regex [String] If specified, the output will follow the regex pattern.
|
|
37
|
-
#
|
|
38
|
-
# @param length_penalty [Float] This is used with `use_beam_search` to prefer shorter or longer completions.
|
|
39
|
-
#
|
|
40
|
-
# @param logprobs [Boolean] Whether to return log probabilities of the output tokens or not. If true, return
|
|
41
|
-
#
|
|
42
|
-
# @param max_tokens [Integer] Maximum number of completion tokens the model should generate.
|
|
43
|
-
#
|
|
44
|
-
# @param min_p [Float] This is an alternative to `top_p` that [many prefer](https://github.com/huggingf
|
|
45
|
-
#
|
|
46
|
-
# @param model [String] The language model to chat with.
|
|
47
|
-
#
|
|
48
|
-
# @param n [Float] This will return multiple choices for you instead of a single chat completion.
|
|
49
|
-
#
|
|
50
|
-
# @param presence_penalty [Float] Higher values will penalize the model from repeating the same output tokens.
|
|
51
|
-
#
|
|
52
|
-
# @param response_format [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat] Use this is you want to guarantee a JSON output without defining a schema. For c
|
|
53
|
-
#
|
|
54
|
-
# @param seed [Integer] If specified, the system will make a best effort to sample deterministically, su
|
|
55
|
-
#
|
|
56
|
-
# @param stop [String, Array<String>] Up to 4 sequences where the API will stop generating further tokens. The returne
|
|
57
|
-
#
|
|
58
|
-
# @param stream [Boolean] Whether or not to stream data-only server-sent events as they become available.
|
|
59
|
-
#
|
|
60
|
-
# @param temperature [Float] Adjusts the "creativity" of the model. Lower values make the model more determin
|
|
61
|
-
#
|
|
62
|
-
# @param tool_choice [Symbol, Telnyx::Models::AI::ChatCompletionRequest::ToolChoice]
|
|
63
|
-
#
|
|
64
|
-
# @param tools [Array<Telnyx::Models::AI::ChatCompletionRequest::Tool::Function, Telnyx::Models::AI::ChatCompletionRequest::Tool::Retrieval>] The `function` tool type follows the same schema as the [OpenAI Chat Completions
|
|
65
|
-
#
|
|
66
|
-
# @param top_logprobs [Integer] This is used with `logprobs`. An integer between 0 and 20 specifying the number
|
|
67
|
-
#
|
|
68
|
-
# @param top_p [Float] An alternative or complement to `temperature`. This adjusts how many of the top
|
|
69
|
-
#
|
|
70
|
-
# @param use_beam_search [Boolean] Setting this to `true` will allow the model to [explore more completion options]
|
|
71
|
-
#
|
|
72
|
-
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
73
|
-
#
|
|
74
|
-
# @return [Hash{Symbol=>Object}]
|
|
75
|
-
#
|
|
76
|
-
# @see Telnyx::Models::AI::ChatCreateCompletionParams
|
|
77
|
-
def create_completion(params)
|
|
78
|
-
parsed, options = Telnyx::AI::ChatCreateCompletionParams.dump_request(params)
|
|
79
|
-
@client.request(
|
|
80
|
-
method: :post,
|
|
81
|
-
path: "ai/chat/completions",
|
|
82
|
-
body: parsed,
|
|
83
|
-
model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
|
|
84
|
-
options: options
|
|
85
|
-
)
|
|
86
|
-
end
|
|
87
|
-
|
|
88
7
|
# @api private
|
|
89
8
|
#
|
|
90
9
|
# @param client [Telnyx::Client]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Conversations
|
|
7
|
+
# Manage historical AI assistant conversations
|
|
8
|
+
class ConversationInsights
|
|
9
|
+
# Some parameter documentations has been truncated, see
|
|
10
|
+
# {Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams}
|
|
11
|
+
# for more details.
|
|
12
|
+
#
|
|
13
|
+
# Aggregate conversation insights by specified fields
|
|
14
|
+
#
|
|
15
|
+
# @overload retrieve_aggregates(created_at: nil, group_by: nil, insight_id: nil, metadata: nil, show: nil, request_options: {})
|
|
16
|
+
#
|
|
17
|
+
# @param created_at [String] Filter by creation datetime to scope the aggregation window. Supports range oper
|
|
18
|
+
#
|
|
19
|
+
# @param group_by [Array<String>] Fields to group by (can be comma-separated or multiple parameters). Prefix a fie
|
|
20
|
+
#
|
|
21
|
+
# @param insight_id [String] Optional insight ID to filter conversation insights. Only insights matching this
|
|
22
|
+
#
|
|
23
|
+
# @param metadata [Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata]
|
|
24
|
+
#
|
|
25
|
+
# @param show [Array<String>] Fields to include in the result (can be comma-separated or multiple parameters).
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
28
|
+
#
|
|
29
|
+
# @return [Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse]
|
|
30
|
+
#
|
|
31
|
+
# @see Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams
|
|
32
|
+
def retrieve_aggregates(params = {})
|
|
33
|
+
parsed, options =
|
|
34
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams.dump_request(params)
|
|
35
|
+
query = Telnyx::Internal::Util.encode_query_params(parsed)
|
|
36
|
+
@client.request(
|
|
37
|
+
method: :get,
|
|
38
|
+
path: "ai/conversations/conversation-insights/aggregates",
|
|
39
|
+
query: query,
|
|
40
|
+
model: Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse,
|
|
41
|
+
options: options
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# @api private
|
|
46
|
+
#
|
|
47
|
+
# @param client [Telnyx::Client]
|
|
48
|
+
def initialize(client:)
|
|
49
|
+
@client = client
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -17,6 +17,10 @@ module Telnyx
|
|
|
17
17
|
# @return [Telnyx::Resources::AI::Conversations::Messages]
|
|
18
18
|
attr_reader :messages
|
|
19
19
|
|
|
20
|
+
# Manage historical AI assistant conversations
|
|
21
|
+
# @return [Telnyx::Resources::AI::Conversations::ConversationInsights]
|
|
22
|
+
attr_reader :conversation_insights
|
|
23
|
+
|
|
20
24
|
# Some parameter documentations has been truncated, see
|
|
21
25
|
# {Telnyx::Models::AI::ConversationCreateParams} for more details.
|
|
22
26
|
#
|
|
@@ -237,6 +241,7 @@ module Telnyx
|
|
|
237
241
|
@insight_groups = Telnyx::Resources::AI::Conversations::InsightGroups.new(client: client)
|
|
238
242
|
@insights = Telnyx::Resources::AI::Conversations::Insights.new(client: client)
|
|
239
243
|
@messages = Telnyx::Resources::AI::Conversations::Messages.new(client: client)
|
|
244
|
+
@conversation_insights = Telnyx::Resources::AI::Conversations::ConversationInsights.new(client: client)
|
|
240
245
|
end
|
|
241
246
|
end
|
|
242
247
|
end
|
|
@@ -7,13 +7,15 @@ module Telnyx
|
|
|
7
7
|
class Tools
|
|
8
8
|
# Create Tool
|
|
9
9
|
#
|
|
10
|
-
# @overload create(display_name:, type:, function: nil, handoff: nil, invite: nil, retrieval: nil, timeout_ms: nil, webhook: nil, request_options: {})
|
|
10
|
+
# @overload create(display_name:, type:, client_side_tool: nil, function: nil, handoff: nil, invite: nil, pay: nil, retrieval: nil, timeout_ms: nil, webhook: nil, request_options: {})
|
|
11
11
|
#
|
|
12
12
|
# @param display_name [String]
|
|
13
13
|
# @param type [String]
|
|
14
|
+
# @param client_side_tool [Hash{Symbol=>Object}]
|
|
14
15
|
# @param function [Hash{Symbol=>Object}]
|
|
15
16
|
# @param handoff [Hash{Symbol=>Object}]
|
|
16
17
|
# @param invite [Hash{Symbol=>Object}]
|
|
18
|
+
# @param pay [Telnyx::Models::AI::PayToolParams]
|
|
17
19
|
# @param retrieval [Hash{Symbol=>Object}]
|
|
18
20
|
# @param timeout_ms [Integer]
|
|
19
21
|
# @param webhook [Hash{Symbol=>Object}]
|
|
@@ -55,10 +57,12 @@ module Telnyx
|
|
|
55
57
|
|
|
56
58
|
# Update Tool
|
|
57
59
|
#
|
|
58
|
-
# @overload update(tool_id, display_name: nil, function: nil, handoff: nil, invite: nil, retrieval: nil, timeout_ms: nil, type: nil, webhook: nil, request_options: {})
|
|
60
|
+
# @overload update(tool_id, client_side_tool: nil, display_name: nil, function: nil, handoff: nil, invite: nil, pay: nil, retrieval: nil, timeout_ms: nil, type: nil, webhook: nil, request_options: {})
|
|
59
61
|
#
|
|
60
62
|
# @param tool_id [String] Unique identifier of the tool.
|
|
61
63
|
#
|
|
64
|
+
# @param client_side_tool [Hash{Symbol=>Object}]
|
|
65
|
+
#
|
|
62
66
|
# @param display_name [String]
|
|
63
67
|
#
|
|
64
68
|
# @param function [Hash{Symbol=>Object}]
|
|
@@ -67,6 +71,8 @@ module Telnyx
|
|
|
67
71
|
#
|
|
68
72
|
# @param invite [Hash{Symbol=>Object}]
|
|
69
73
|
#
|
|
74
|
+
# @param pay [Telnyx::Models::AI::PayToolParams]
|
|
75
|
+
#
|
|
70
76
|
# @param retrieval [Hash{Symbol=>Object}]
|
|
71
77
|
#
|
|
72
78
|
# @param timeout_ms [Integer]
|