telnyx 5.63.0 → 5.65.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/models/ai/assistant_create_params.rb +8 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +8 -1
- data/lib/telnyx/models/ai/assistants/tool_add_params.rb +30 -0
- data/lib/telnyx/models/ai/assistants/tool_add_response.rb +12 -0
- data/lib/telnyx/models/ai/assistants/tool_remove_params.rb +30 -0
- data/lib/telnyx/models/ai/assistants/tool_remove_response.rb +12 -0
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +8 -1
- data/lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb +36 -1
- data/lib/telnyx/models/ai/tool_create_params.rb +64 -0
- data/lib/telnyx/models/ai/tool_create_response.rb +48 -0
- data/lib/telnyx/models/ai/tool_delete_params.rb +22 -0
- data/lib/telnyx/models/ai/tool_delete_response.rb +10 -0
- data/lib/telnyx/models/ai/tool_list_params.rb +40 -0
- data/lib/telnyx/models/ai/tool_list_response.rb +48 -0
- data/lib/telnyx/models/ai/tool_retrieve_params.rb +22 -0
- data/lib/telnyx/models/ai/tool_retrieve_response.rb +48 -0
- data/lib/telnyx/models/ai/tool_update_params.rb +70 -0
- data/lib/telnyx/models/ai/tool_update_response.rb +48 -0
- data/lib/telnyx/resources/ai/assistants/tools.rb +50 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/ai/tools.rb +143 -0
- data/lib/telnyx/resources/ai.rb +5 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +15 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +9 -0
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +9 -0
- data/rbi/telnyx/models/ai/assistants/tool_add_params.rbi +50 -0
- data/rbi/telnyx/models/ai/assistants/tool_add_response.rbi +11 -0
- data/rbi/telnyx/models/ai/assistants/tool_remove_params.rbi +50 -0
- data/rbi/telnyx/models/ai/assistants/tool_remove_response.rbi +12 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +9 -0
- data/rbi/telnyx/models/ai/inference_embedding_webhook_tool_params.rbi +71 -0
- data/rbi/telnyx/models/ai/tool_create_params.rbi +103 -0
- data/rbi/telnyx/models/ai/tool_create_response.rbi +79 -0
- data/rbi/telnyx/models/ai/tool_delete_params.rbi +37 -0
- data/rbi/telnyx/models/ai/tool_delete_response.rbi +9 -0
- data/rbi/telnyx/models/ai/tool_list_params.rbi +73 -0
- data/rbi/telnyx/models/ai/tool_list_response.rbi +79 -0
- data/rbi/telnyx/models/ai/tool_retrieve_params.rbi +37 -0
- data/rbi/telnyx/models/ai/tool_retrieve_response.rbi +79 -0
- data/rbi/telnyx/models/ai/tool_update_params.rbi +115 -0
- data/rbi/telnyx/models/ai/tool_update_response.rbi +79 -0
- data/rbi/telnyx/resources/ai/assistants/tools.rbi +22 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +4 -0
- data/rbi/telnyx/resources/ai/tools.rbi +114 -0
- data/rbi/telnyx/resources/ai.rbi +4 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +7 -0
- data/sig/telnyx/models/ai/assistant_update_params.rbs +7 -0
- data/sig/telnyx/models/ai/assistants/tool_add_params.rbs +32 -0
- data/sig/telnyx/models/ai/assistants/tool_add_response.rbs +9 -0
- data/sig/telnyx/models/ai/assistants/tool_remove_params.rbs +32 -0
- data/sig/telnyx/models/ai/assistants/tool_remove_response.rbs +9 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +7 -0
- data/sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs +21 -0
- data/sig/telnyx/models/ai/tool_create_params.rbs +75 -0
- data/sig/telnyx/models/ai/tool_create_response.rbs +53 -0
- data/sig/telnyx/models/ai/tool_delete_params.rbs +25 -0
- data/sig/telnyx/models/ai/tool_delete_response.rbs +7 -0
- data/sig/telnyx/models/ai/tool_list_params.rbs +51 -0
- data/sig/telnyx/models/ai/tool_list_response.rbs +53 -0
- data/sig/telnyx/models/ai/tool_retrieve_params.rbs +25 -0
- data/sig/telnyx/models/ai/tool_retrieve_response.rbs +53 -0
- data/sig/telnyx/models/ai/tool_update_params.rbs +84 -0
- data/sig/telnyx/models/ai/tool_update_response.rbs +53 -0
- data/sig/telnyx/resources/ai/assistants/tools.rbs +12 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/ai/tools.rbs +52 -0
- data/sig/telnyx/resources/ai.rbs +2 -0
- metadata +46 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
class ToolUpdateParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(Telnyx::AI::ToolUpdateParams, Telnyx::Internal::AnyHash)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :tool_id
|
|
17
|
+
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :display_name
|
|
20
|
+
|
|
21
|
+
sig { params(display_name: String).void }
|
|
22
|
+
attr_writer :display_name
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
25
|
+
attr_reader :function
|
|
26
|
+
|
|
27
|
+
sig { params(function: T::Hash[Symbol, T.anything]).void }
|
|
28
|
+
attr_writer :function
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
31
|
+
attr_reader :handoff
|
|
32
|
+
|
|
33
|
+
sig { params(handoff: T::Hash[Symbol, T.anything]).void }
|
|
34
|
+
attr_writer :handoff
|
|
35
|
+
|
|
36
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
37
|
+
attr_reader :invite
|
|
38
|
+
|
|
39
|
+
sig { params(invite: T::Hash[Symbol, T.anything]).void }
|
|
40
|
+
attr_writer :invite
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
43
|
+
attr_reader :retrieval
|
|
44
|
+
|
|
45
|
+
sig { params(retrieval: T::Hash[Symbol, T.anything]).void }
|
|
46
|
+
attr_writer :retrieval
|
|
47
|
+
|
|
48
|
+
sig { returns(T.nilable(Integer)) }
|
|
49
|
+
attr_reader :timeout_ms
|
|
50
|
+
|
|
51
|
+
sig { params(timeout_ms: Integer).void }
|
|
52
|
+
attr_writer :timeout_ms
|
|
53
|
+
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :type
|
|
56
|
+
|
|
57
|
+
sig { params(type: String).void }
|
|
58
|
+
attr_writer :type
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
61
|
+
attr_reader :webhook
|
|
62
|
+
|
|
63
|
+
sig { params(webhook: T::Hash[Symbol, T.anything]).void }
|
|
64
|
+
attr_writer :webhook
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
params(
|
|
68
|
+
tool_id: String,
|
|
69
|
+
display_name: String,
|
|
70
|
+
function: T::Hash[Symbol, T.anything],
|
|
71
|
+
handoff: T::Hash[Symbol, T.anything],
|
|
72
|
+
invite: T::Hash[Symbol, T.anything],
|
|
73
|
+
retrieval: T::Hash[Symbol, T.anything],
|
|
74
|
+
timeout_ms: Integer,
|
|
75
|
+
type: String,
|
|
76
|
+
webhook: T::Hash[Symbol, T.anything],
|
|
77
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
78
|
+
).returns(T.attached_class)
|
|
79
|
+
end
|
|
80
|
+
def self.new(
|
|
81
|
+
tool_id:,
|
|
82
|
+
display_name: nil,
|
|
83
|
+
function: nil,
|
|
84
|
+
handoff: nil,
|
|
85
|
+
invite: nil,
|
|
86
|
+
retrieval: nil,
|
|
87
|
+
timeout_ms: nil,
|
|
88
|
+
type: nil,
|
|
89
|
+
webhook: nil,
|
|
90
|
+
request_options: {}
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
sig do
|
|
95
|
+
override.returns(
|
|
96
|
+
{
|
|
97
|
+
tool_id: String,
|
|
98
|
+
display_name: String,
|
|
99
|
+
function: T::Hash[Symbol, T.anything],
|
|
100
|
+
handoff: T::Hash[Symbol, T.anything],
|
|
101
|
+
invite: T::Hash[Symbol, T.anything],
|
|
102
|
+
retrieval: T::Hash[Symbol, T.anything],
|
|
103
|
+
timeout_ms: Integer,
|
|
104
|
+
type: String,
|
|
105
|
+
webhook: T::Hash[Symbol, T.anything],
|
|
106
|
+
request_options: Telnyx::RequestOptions
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
def to_hash
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
class ToolUpdateResponse < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Telnyx::Models::AI::ToolUpdateResponse,
|
|
11
|
+
Telnyx::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
19
|
+
attr_accessor :tool_definition
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :created_at
|
|
26
|
+
|
|
27
|
+
sig { params(created_at: String).void }
|
|
28
|
+
attr_writer :created_at
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_reader :display_name
|
|
32
|
+
|
|
33
|
+
sig { params(display_name: String).void }
|
|
34
|
+
attr_writer :display_name
|
|
35
|
+
|
|
36
|
+
sig { returns(T.nilable(Integer)) }
|
|
37
|
+
attr_reader :timeout_ms
|
|
38
|
+
|
|
39
|
+
sig { params(timeout_ms: Integer).void }
|
|
40
|
+
attr_writer :timeout_ms
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
params(
|
|
44
|
+
id: String,
|
|
45
|
+
tool_definition: T::Hash[Symbol, T.anything],
|
|
46
|
+
type: String,
|
|
47
|
+
created_at: String,
|
|
48
|
+
display_name: String,
|
|
49
|
+
timeout_ms: Integer
|
|
50
|
+
).returns(T.attached_class)
|
|
51
|
+
end
|
|
52
|
+
def self.new(
|
|
53
|
+
id:,
|
|
54
|
+
tool_definition:,
|
|
55
|
+
type:,
|
|
56
|
+
created_at: nil,
|
|
57
|
+
display_name: nil,
|
|
58
|
+
timeout_ms: nil
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
override.returns(
|
|
64
|
+
{
|
|
65
|
+
id: String,
|
|
66
|
+
tool_definition: T::Hash[Symbol, T.anything],
|
|
67
|
+
type: String,
|
|
68
|
+
created_at: String,
|
|
69
|
+
display_name: String,
|
|
70
|
+
timeout_ms: Integer
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
def to_hash
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -6,6 +6,28 @@ module Telnyx
|
|
|
6
6
|
class Assistants
|
|
7
7
|
# Configure AI assistant specifications
|
|
8
8
|
class Tools
|
|
9
|
+
# Add Assistant Tool
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
tool_id: String,
|
|
13
|
+
assistant_id: String,
|
|
14
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
15
|
+
).returns(T.anything)
|
|
16
|
+
end
|
|
17
|
+
def add(tool_id, assistant_id:, request_options: {})
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Remove Assistant Tool
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
tool_id: String,
|
|
24
|
+
assistant_id: String,
|
|
25
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
26
|
+
).returns(T.anything)
|
|
27
|
+
end
|
|
28
|
+
def remove(tool_id, assistant_id:, request_options: {})
|
|
29
|
+
end
|
|
30
|
+
|
|
9
31
|
# Test a webhook tool for an assistant
|
|
10
32
|
sig do
|
|
11
33
|
params(
|
|
@@ -45,6 +45,7 @@ module Telnyx
|
|
|
45
45
|
name: String,
|
|
46
46
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
47
47
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
48
|
+
tool_ids: T::Array[String],
|
|
48
49
|
tools:
|
|
49
50
|
T::Array[
|
|
50
51
|
T.any(
|
|
@@ -112,6 +113,8 @@ module Telnyx
|
|
|
112
113
|
privacy_settings: nil,
|
|
113
114
|
# Body param
|
|
114
115
|
telephony_settings: nil,
|
|
116
|
+
# Body param
|
|
117
|
+
tool_ids: nil,
|
|
115
118
|
# Body param: The tools that the assistant can use. These may be templated with
|
|
116
119
|
# [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
117
120
|
tools: nil,
|
|
@@ -45,6 +45,7 @@ module Telnyx
|
|
|
45
45
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
46
46
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
47
47
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
48
|
+
tool_ids: T::Array[String],
|
|
48
49
|
tools:
|
|
49
50
|
T::Array[
|
|
50
51
|
T.any(
|
|
@@ -101,6 +102,7 @@ module Telnyx
|
|
|
101
102
|
messaging_settings: nil,
|
|
102
103
|
privacy_settings: nil,
|
|
103
104
|
telephony_settings: nil,
|
|
105
|
+
tool_ids: nil,
|
|
104
106
|
# The tools that the assistant can use. These may be templated with
|
|
105
107
|
# [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
106
108
|
tools: nil,
|
|
@@ -151,6 +153,7 @@ module Telnyx
|
|
|
151
153
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
152
154
|
promote_to_main: T::Boolean,
|
|
153
155
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
156
|
+
tool_ids: T::Array[String],
|
|
154
157
|
tools:
|
|
155
158
|
T::Array[
|
|
156
159
|
T.any(
|
|
@@ -211,6 +214,7 @@ module Telnyx
|
|
|
211
214
|
# to true.
|
|
212
215
|
promote_to_main: nil,
|
|
213
216
|
telephony_settings: nil,
|
|
217
|
+
tool_ids: nil,
|
|
214
218
|
# The tools that the assistant can use. These may be templated with
|
|
215
219
|
# [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
216
220
|
tools: nil,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
# Configure AI assistant specifications
|
|
7
|
+
class Tools
|
|
8
|
+
# Create Tool
|
|
9
|
+
sig do
|
|
10
|
+
params(
|
|
11
|
+
display_name: String,
|
|
12
|
+
type: String,
|
|
13
|
+
function: T::Hash[Symbol, T.anything],
|
|
14
|
+
handoff: T::Hash[Symbol, T.anything],
|
|
15
|
+
invite: T::Hash[Symbol, T.anything],
|
|
16
|
+
retrieval: T::Hash[Symbol, T.anything],
|
|
17
|
+
timeout_ms: Integer,
|
|
18
|
+
webhook: T::Hash[Symbol, T.anything],
|
|
19
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
20
|
+
).returns(Telnyx::Models::AI::ToolCreateResponse)
|
|
21
|
+
end
|
|
22
|
+
def create(
|
|
23
|
+
display_name:,
|
|
24
|
+
type:,
|
|
25
|
+
function: nil,
|
|
26
|
+
handoff: nil,
|
|
27
|
+
invite: nil,
|
|
28
|
+
retrieval: nil,
|
|
29
|
+
timeout_ms: nil,
|
|
30
|
+
webhook: nil,
|
|
31
|
+
request_options: {}
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Get Tool
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
tool_id: String,
|
|
39
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
40
|
+
).returns(Telnyx::Models::AI::ToolRetrieveResponse)
|
|
41
|
+
end
|
|
42
|
+
def retrieve(tool_id, request_options: {})
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Update Tool
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
tool_id: String,
|
|
49
|
+
display_name: String,
|
|
50
|
+
function: T::Hash[Symbol, T.anything],
|
|
51
|
+
handoff: T::Hash[Symbol, T.anything],
|
|
52
|
+
invite: T::Hash[Symbol, T.anything],
|
|
53
|
+
retrieval: T::Hash[Symbol, T.anything],
|
|
54
|
+
timeout_ms: Integer,
|
|
55
|
+
type: String,
|
|
56
|
+
webhook: T::Hash[Symbol, T.anything],
|
|
57
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
58
|
+
).returns(Telnyx::Models::AI::ToolUpdateResponse)
|
|
59
|
+
end
|
|
60
|
+
def update(
|
|
61
|
+
tool_id,
|
|
62
|
+
display_name: nil,
|
|
63
|
+
function: nil,
|
|
64
|
+
handoff: nil,
|
|
65
|
+
invite: nil,
|
|
66
|
+
retrieval: nil,
|
|
67
|
+
timeout_ms: nil,
|
|
68
|
+
type: nil,
|
|
69
|
+
webhook: nil,
|
|
70
|
+
request_options: {}
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List Tools
|
|
75
|
+
sig do
|
|
76
|
+
params(
|
|
77
|
+
filter_name: String,
|
|
78
|
+
filter_type: String,
|
|
79
|
+
page_number: Integer,
|
|
80
|
+
page_size: Integer,
|
|
81
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
82
|
+
).returns(
|
|
83
|
+
Telnyx::Internal::DefaultFlatPagination[
|
|
84
|
+
Telnyx::Models::AI::ToolListResponse
|
|
85
|
+
]
|
|
86
|
+
)
|
|
87
|
+
end
|
|
88
|
+
def list(
|
|
89
|
+
filter_name: nil,
|
|
90
|
+
filter_type: nil,
|
|
91
|
+
page_number: nil,
|
|
92
|
+
page_size: nil,
|
|
93
|
+
request_options: {}
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Delete Tool
|
|
98
|
+
sig do
|
|
99
|
+
params(
|
|
100
|
+
tool_id: String,
|
|
101
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
102
|
+
).returns(T.anything)
|
|
103
|
+
end
|
|
104
|
+
def delete(tool_id, request_options: {})
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @api private
|
|
108
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
109
|
+
def self.new(client:)
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
data/rbi/telnyx/resources/ai.rbi
CHANGED
|
@@ -42,6 +42,10 @@ module Telnyx
|
|
|
42
42
|
sig { returns(Telnyx::Resources::AI::OpenAI) }
|
|
43
43
|
attr_reader :openai
|
|
44
44
|
|
|
45
|
+
# Configure AI assistant specifications
|
|
46
|
+
sig { returns(Telnyx::Resources::AI::Tools) }
|
|
47
|
+
attr_reader :tools
|
|
48
|
+
|
|
45
49
|
# This endpoint returns a list of Open Source and OpenAI models that are available
|
|
46
50
|
# for use. <br /><br /> **Note**: Model `id`'s will be in the form
|
|
47
51
|
# `{source}/{model_name}`. For example `openai/gpt-4` or
|
|
@@ -16,6 +16,7 @@ module Telnyx
|
|
|
16
16
|
messaging_settings: Telnyx::AI::MessagingSettings,
|
|
17
17
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
18
18
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
19
|
+
tool_ids: ::Array[String],
|
|
19
20
|
tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
20
21
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
21
22
|
voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -83,6 +84,10 @@ module Telnyx
|
|
|
83
84
|
Telnyx::AI::TelephonySettings
|
|
84
85
|
) -> Telnyx::AI::TelephonySettings
|
|
85
86
|
|
|
87
|
+
attr_reader tool_ids: ::Array[String]?
|
|
88
|
+
|
|
89
|
+
def tool_ids=: (::Array[String]) -> ::Array[String]
|
|
90
|
+
|
|
86
91
|
attr_reader tools: ::Array[Telnyx::Models::AI::assistant_tool]?
|
|
87
92
|
|
|
88
93
|
def tools=: (
|
|
@@ -121,6 +126,7 @@ module Telnyx
|
|
|
121
126
|
?messaging_settings: Telnyx::AI::MessagingSettings,
|
|
122
127
|
?privacy_settings: Telnyx::AI::PrivacySettings,
|
|
123
128
|
?telephony_settings: Telnyx::AI::TelephonySettings,
|
|
129
|
+
?tool_ids: ::Array[String],
|
|
124
130
|
?tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
125
131
|
?transcription: Telnyx::AI::TranscriptionSettings,
|
|
126
132
|
?voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -142,6 +148,7 @@ module Telnyx
|
|
|
142
148
|
messaging_settings: Telnyx::AI::MessagingSettings,
|
|
143
149
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
144
150
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
151
|
+
tool_ids: ::Array[String],
|
|
145
152
|
tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
146
153
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
147
154
|
voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -18,6 +18,7 @@ module Telnyx
|
|
|
18
18
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
19
19
|
promote_to_main: bool,
|
|
20
20
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
21
|
+
tool_ids: ::Array[String],
|
|
21
22
|
tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
22
23
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
23
24
|
voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -97,6 +98,10 @@ module Telnyx
|
|
|
97
98
|
Telnyx::AI::TelephonySettings
|
|
98
99
|
) -> Telnyx::AI::TelephonySettings
|
|
99
100
|
|
|
101
|
+
attr_reader tool_ids: ::Array[String]?
|
|
102
|
+
|
|
103
|
+
def tool_ids=: (::Array[String]) -> ::Array[String]
|
|
104
|
+
|
|
100
105
|
attr_reader tools: ::Array[Telnyx::Models::AI::assistant_tool]?
|
|
101
106
|
|
|
102
107
|
def tools=: (
|
|
@@ -137,6 +142,7 @@ module Telnyx
|
|
|
137
142
|
?privacy_settings: Telnyx::AI::PrivacySettings,
|
|
138
143
|
?promote_to_main: bool,
|
|
139
144
|
?telephony_settings: Telnyx::AI::TelephonySettings,
|
|
145
|
+
?tool_ids: ::Array[String],
|
|
140
146
|
?tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
141
147
|
?transcription: Telnyx::AI::TranscriptionSettings,
|
|
142
148
|
?voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -160,6 +166,7 @@ module Telnyx
|
|
|
160
166
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
161
167
|
promote_to_main: bool,
|
|
162
168
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
169
|
+
tool_ids: ::Array[String],
|
|
163
170
|
tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
164
171
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
165
172
|
voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Telnyx
|
|
2
|
+
module Models
|
|
3
|
+
module AI
|
|
4
|
+
module Assistants
|
|
5
|
+
type tool_add_params =
|
|
6
|
+
{ assistant_id: String, tool_id: String }
|
|
7
|
+
& Telnyx::Internal::Type::request_parameters
|
|
8
|
+
|
|
9
|
+
class ToolAddParams < Telnyx::Internal::Type::BaseModel
|
|
10
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
attr_accessor assistant_id: String
|
|
14
|
+
|
|
15
|
+
attr_accessor tool_id: String
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
assistant_id: String,
|
|
19
|
+
tool_id: String,
|
|
20
|
+
?request_options: Telnyx::request_opts
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
assistant_id: String,
|
|
25
|
+
tool_id: String,
|
|
26
|
+
request_options: Telnyx::RequestOptions
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Telnyx
|
|
2
|
+
module Models
|
|
3
|
+
module AI
|
|
4
|
+
module Assistants
|
|
5
|
+
type tool_remove_params =
|
|
6
|
+
{ assistant_id: String, tool_id: String }
|
|
7
|
+
& Telnyx::Internal::Type::request_parameters
|
|
8
|
+
|
|
9
|
+
class ToolRemoveParams < Telnyx::Internal::Type::BaseModel
|
|
10
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
attr_accessor assistant_id: String
|
|
14
|
+
|
|
15
|
+
attr_accessor tool_id: String
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
assistant_id: String,
|
|
19
|
+
tool_id: String,
|
|
20
|
+
?request_options: Telnyx::request_opts
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
assistant_id: String,
|
|
25
|
+
tool_id: String,
|
|
26
|
+
request_options: Telnyx::RequestOptions
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -19,6 +19,7 @@ module Telnyx
|
|
|
19
19
|
name: String,
|
|
20
20
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
21
21
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
22
|
+
tool_ids: ::Array[String],
|
|
22
23
|
tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
23
24
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
24
25
|
voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -88,6 +89,10 @@ module Telnyx
|
|
|
88
89
|
Telnyx::AI::TelephonySettings
|
|
89
90
|
) -> Telnyx::AI::TelephonySettings
|
|
90
91
|
|
|
92
|
+
attr_reader tool_ids: ::Array[String]?
|
|
93
|
+
|
|
94
|
+
def tool_ids=: (::Array[String]) -> ::Array[String]
|
|
95
|
+
|
|
91
96
|
attr_reader tools: ::Array[Telnyx::Models::AI::assistant_tool]?
|
|
92
97
|
|
|
93
98
|
def tools=: (
|
|
@@ -126,6 +131,7 @@ module Telnyx
|
|
|
126
131
|
?name: String,
|
|
127
132
|
?privacy_settings: Telnyx::AI::PrivacySettings,
|
|
128
133
|
?telephony_settings: Telnyx::AI::TelephonySettings,
|
|
134
|
+
?tool_ids: ::Array[String],
|
|
129
135
|
?tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
130
136
|
?transcription: Telnyx::AI::TranscriptionSettings,
|
|
131
137
|
?voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -146,6 +152,7 @@ module Telnyx
|
|
|
146
152
|
name: String,
|
|
147
153
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
148
154
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
155
|
+
tool_ids: ::Array[String],
|
|
149
156
|
tools: ::Array[Telnyx::Models::AI::assistant_tool],
|
|
150
157
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
151
158
|
voice_settings: Telnyx::AI::VoiceSettings,
|
|
@@ -43,6 +43,7 @@ module Telnyx
|
|
|
43
43
|
http_method: Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::method_,
|
|
44
44
|
path_parameters: Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters,
|
|
45
45
|
query_parameters: Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters,
|
|
46
|
+
store_fields_as_variables: ::Array[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable],
|
|
46
47
|
timeout_ms: Integer
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -87,6 +88,12 @@ module Telnyx
|
|
|
87
88
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters
|
|
88
89
|
) -> Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters
|
|
89
90
|
|
|
91
|
+
attr_reader store_fields_as_variables: ::Array[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable]?
|
|
92
|
+
|
|
93
|
+
def store_fields_as_variables=: (
|
|
94
|
+
::Array[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable]
|
|
95
|
+
) -> ::Array[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable]
|
|
96
|
+
|
|
90
97
|
attr_reader timeout_ms: Integer?
|
|
91
98
|
|
|
92
99
|
def timeout_ms=: (Integer) -> Integer
|
|
@@ -101,6 +108,7 @@ module Telnyx
|
|
|
101
108
|
?http_method: Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::method_,
|
|
102
109
|
?path_parameters: Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters,
|
|
103
110
|
?query_parameters: Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters,
|
|
111
|
+
?store_fields_as_variables: ::Array[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable],
|
|
104
112
|
?timeout_ms: Integer
|
|
105
113
|
) -> void
|
|
106
114
|
|
|
@@ -114,6 +122,7 @@ module Telnyx
|
|
|
114
122
|
http_method: Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::method_,
|
|
115
123
|
path_parameters: Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters,
|
|
116
124
|
query_parameters: Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters,
|
|
125
|
+
store_fields_as_variables: ::Array[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable],
|
|
117
126
|
timeout_ms: Integer
|
|
118
127
|
}
|
|
119
128
|
|
|
@@ -281,6 +290,18 @@ module Telnyx
|
|
|
281
290
|
def self?.values: -> ::Array[Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters::type_]
|
|
282
291
|
end
|
|
283
292
|
end
|
|
293
|
+
|
|
294
|
+
type store_fields_as_variable = { name: String, value_path: String }
|
|
295
|
+
|
|
296
|
+
class StoreFieldsAsVariable < Telnyx::Internal::Type::BaseModel
|
|
297
|
+
attr_accessor name: String
|
|
298
|
+
|
|
299
|
+
attr_accessor value_path: String
|
|
300
|
+
|
|
301
|
+
def initialize: (name: String, value_path: String) -> void
|
|
302
|
+
|
|
303
|
+
def to_hash: -> { name: String, value_path: String }
|
|
304
|
+
end
|
|
284
305
|
end
|
|
285
306
|
end
|
|
286
307
|
end
|