telnyx 5.127.0 → 5.129.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/assistants/instruction_enhance_params.rb +47 -0
- data/lib/telnyx/models/ai/assistants/instruction_enhance_response.rb +11 -0
- data/lib/telnyx/models/call_dial_params.rb +70 -3
- data/lib/telnyx/models/calls/action_answer_params.rb +70 -3
- data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +2 -1
- data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +37 -2
- data/lib/telnyx/models/calls/action_speak_params.rb +37 -2
- data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +2 -1
- data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +104 -4
- data/lib/telnyx/models/conferences/action_speak_params.rb +37 -2
- data/lib/telnyx/resources/ai/assistants/instructions.rb +64 -0
- data/lib/telnyx/resources/ai/assistants.rb +5 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +3 -0
- data/rbi/telnyx/models/ai/assistants/instruction_enhance_params.rbi +70 -0
- data/rbi/telnyx/models/ai/assistants/instruction_enhance_response.rbi +11 -0
- data/rbi/telnyx/models/call_dial_params.rbi +174 -6
- data/rbi/telnyx/models/calls/action_answer_params.rbi +174 -6
- data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +4 -2
- data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +91 -4
- data/rbi/telnyx/models/calls/action_speak_params.rbi +91 -4
- data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +4 -2
- data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +259 -8
- data/rbi/telnyx/models/conferences/action_speak_params.rbi +91 -4
- data/rbi/telnyx/resources/ai/assistants/instructions.rbi +55 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +4 -0
- data/rbi/telnyx/resources/calls/actions.rbi +12 -5
- data/rbi/telnyx/resources/conferences/actions.rbi +3 -1
- data/sig/telnyx/models/ai/assistants/instruction_enhance_params.rbs +40 -0
- data/sig/telnyx/models/ai/assistants/instruction_enhance_response.rbs +9 -0
- data/sig/telnyx/models/call_dial_params.rbs +62 -6
- data/sig/telnyx/models/calls/action_answer_params.rbs +62 -6
- data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +31 -3
- data/sig/telnyx/models/calls/action_speak_params.rbs +31 -3
- data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +93 -9
- data/sig/telnyx/models/conferences/action_speak_params.rbs +31 -3
- data/sig/telnyx/resources/ai/assistants/instructions.rbs +18 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- metadata +11 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Assistants
|
|
7
|
+
# Configure AI assistant specifications
|
|
8
|
+
class Instructions
|
|
9
|
+
# Some parameter documentations has been truncated, see
|
|
10
|
+
# {Telnyx::Models::AI::Assistants::InstructionEnhanceParams} for more details.
|
|
11
|
+
#
|
|
12
|
+
# Enhance an assistant's instructions using an LLM. The endpoint reads the
|
|
13
|
+
# assistant's current instructions and tools, then streams back improved
|
|
14
|
+
# instructions as they are generated.
|
|
15
|
+
#
|
|
16
|
+
# Optionally provide an `enhancement_prompt` to steer the changes (for example,
|
|
17
|
+
# "make the instructions more concise" or "add error handling guidance"). When
|
|
18
|
+
# omitted, the assistant's existing instructions are used as the basis for the
|
|
19
|
+
# enhancement.
|
|
20
|
+
#
|
|
21
|
+
# The enhancement focuses on tool-calling reliability, clarity and precision,
|
|
22
|
+
# completeness and error handling, tool schema alignment, and conversation flow
|
|
23
|
+
# structure.
|
|
24
|
+
#
|
|
25
|
+
# The response is streamed as `text/plain` using chunked transfer encoding;
|
|
26
|
+
# consume the body incrementally to render the enhanced instructions as they
|
|
27
|
+
# arrive.
|
|
28
|
+
#
|
|
29
|
+
# @overload enhance(assistant_id, enhancement_prompt: nil, instructions: nil, request_options: {})
|
|
30
|
+
#
|
|
31
|
+
# @param assistant_id [String] Unique identifier of the assistant.
|
|
32
|
+
#
|
|
33
|
+
# @param enhancement_prompt [String, nil] Optional guidance describing how the instructions should be enhanced. When provi
|
|
34
|
+
#
|
|
35
|
+
# @param instructions [String, nil] The instructions to enhance. When omitted, the assistant's existing instructions
|
|
36
|
+
#
|
|
37
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
#
|
|
41
|
+
# @see Telnyx::Models::AI::Assistants::InstructionEnhanceParams
|
|
42
|
+
def enhance(assistant_id, params = {})
|
|
43
|
+
parsed, options = Telnyx::AI::Assistants::InstructionEnhanceParams.dump_request(params)
|
|
44
|
+
@client.request(
|
|
45
|
+
method: :post,
|
|
46
|
+
path: ["ai/assistants/%1$s/instructions/enhance", assistant_id],
|
|
47
|
+
headers: {"accept" => "text/plain"},
|
|
48
|
+
body: parsed,
|
|
49
|
+
model: String,
|
|
50
|
+
options: options
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# @api private
|
|
55
|
+
#
|
|
56
|
+
# @param client [Telnyx::Client]
|
|
57
|
+
def initialize(client:)
|
|
58
|
+
@client = client
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -29,6 +29,10 @@ module Telnyx
|
|
|
29
29
|
# @return [Telnyx::Resources::AI::Assistants::Tags]
|
|
30
30
|
attr_reader :tags
|
|
31
31
|
|
|
32
|
+
# Configure AI assistant specifications
|
|
33
|
+
# @return [Telnyx::Resources::AI::Assistants::Instructions]
|
|
34
|
+
attr_reader :instructions
|
|
35
|
+
|
|
32
36
|
# Some parameter documentations has been truncated, see
|
|
33
37
|
# {Telnyx::Models::AI::AssistantCreateParams} for more details.
|
|
34
38
|
#
|
|
@@ -421,6 +425,7 @@ module Telnyx
|
|
|
421
425
|
@tools = Telnyx::Resources::AI::Assistants::Tools.new(client: client)
|
|
422
426
|
@versions = Telnyx::Resources::AI::Assistants::Versions.new(client: client)
|
|
423
427
|
@tags = Telnyx::Resources::AI::Assistants::Tags.new(client: client)
|
|
428
|
+
@instructions = Telnyx::Resources::AI::Assistants::Instructions.new(client: client)
|
|
424
429
|
end
|
|
425
430
|
end
|
|
426
431
|
end
|
data/lib/telnyx/version.rb
CHANGED
data/lib/telnyx.rb
CHANGED
|
@@ -146,6 +146,8 @@ require_relative "telnyx/models/ai/assistants/canary_deploy_retrieve_params"
|
|
|
146
146
|
require_relative "telnyx/models/ai/assistants/canary_deploy_update_params"
|
|
147
147
|
require_relative "telnyx/models/ai/assistants/conversation_channel_type"
|
|
148
148
|
require_relative "telnyx/models/ai/assistants/event_status"
|
|
149
|
+
require_relative "telnyx/models/ai/assistants/instruction_enhance_params"
|
|
150
|
+
require_relative "telnyx/models/ai/assistants/instruction_enhance_response"
|
|
149
151
|
require_relative "telnyx/models/ai/assistants/scheduled_event_create_params"
|
|
150
152
|
require_relative "telnyx/models/ai/assistants/scheduled_event_delete_params"
|
|
151
153
|
require_relative "telnyx/models/ai/assistants/scheduled_event_list_params"
|
|
@@ -2501,6 +2503,7 @@ require_relative "telnyx/resources/advanced_orders"
|
|
|
2501
2503
|
require_relative "telnyx/resources/ai"
|
|
2502
2504
|
require_relative "telnyx/resources/ai/assistants"
|
|
2503
2505
|
require_relative "telnyx/resources/ai/assistants/canary_deploys"
|
|
2506
|
+
require_relative "telnyx/resources/ai/assistants/instructions"
|
|
2504
2507
|
require_relative "telnyx/resources/ai/assistants/scheduled_events"
|
|
2505
2508
|
require_relative "telnyx/resources/ai/assistants/tags"
|
|
2506
2509
|
require_relative "telnyx/resources/ai/assistants/tests"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module Assistants
|
|
7
|
+
class InstructionEnhanceParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Telnyx::AI::Assistants::InstructionEnhanceParams,
|
|
15
|
+
Telnyx::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :assistant_id
|
|
21
|
+
|
|
22
|
+
# Optional guidance describing how the instructions should be enhanced. When
|
|
23
|
+
# provided, the LLM applies these requested changes in addition to fixing any
|
|
24
|
+
# identified issues.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :enhancement_prompt
|
|
27
|
+
|
|
28
|
+
# The instructions to enhance. When omitted, the assistant's existing instructions
|
|
29
|
+
# are used.
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_accessor :instructions
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
assistant_id: String,
|
|
36
|
+
enhancement_prompt: T.nilable(String),
|
|
37
|
+
instructions: T.nilable(String),
|
|
38
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
assistant_id:,
|
|
43
|
+
# Optional guidance describing how the instructions should be enhanced. When
|
|
44
|
+
# provided, the LLM applies these requested changes in addition to fixing any
|
|
45
|
+
# identified issues.
|
|
46
|
+
enhancement_prompt: nil,
|
|
47
|
+
# The instructions to enhance. When omitted, the assistant's existing instructions
|
|
48
|
+
# are used.
|
|
49
|
+
instructions: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
override.returns(
|
|
56
|
+
{
|
|
57
|
+
assistant_id: String,
|
|
58
|
+
enhancement_prompt: T.nilable(String),
|
|
59
|
+
instructions: T.nilable(String),
|
|
60
|
+
request_options: Telnyx::RequestOptions
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
def to_hash
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -1869,7 +1869,8 @@ module Telnyx
|
|
|
1869
1869
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
1870
1870
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
1871
1871
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
1872
|
-
# `Inworld.Max.Oliver`). Supported models: `Mini`,
|
|
1872
|
+
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
1873
|
+
# `Max`, `TTS2`.
|
|
1873
1874
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1874
1875
|
# `ara`, `rex`, `sal`, `leo`.
|
|
1875
1876
|
sig { returns(T.nilable(String)) }
|
|
@@ -2027,7 +2028,8 @@ module Telnyx
|
|
|
2027
2028
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
2028
2029
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
2029
2030
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
2030
|
-
# `Inworld.Max.Oliver`). Supported models: `Mini`,
|
|
2031
|
+
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
2032
|
+
# `Max`, `TTS2`.
|
|
2031
2033
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
2032
2034
|
# `ara`, `rex`, `sal`, `leo`.
|
|
2033
2035
|
voice: nil,
|
|
@@ -2751,16 +2753,99 @@ module Telnyx
|
|
|
2751
2753
|
sig { returns(Symbol) }
|
|
2752
2754
|
attr_accessor :type
|
|
2753
2755
|
|
|
2754
|
-
|
|
2756
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
2757
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
2758
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
2759
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
2760
|
+
sig do
|
|
2761
|
+
returns(
|
|
2762
|
+
T.nilable(
|
|
2763
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
2764
|
+
)
|
|
2765
|
+
)
|
|
2766
|
+
end
|
|
2767
|
+
attr_reader :delivery_mode
|
|
2768
|
+
|
|
2769
|
+
sig do
|
|
2770
|
+
params(
|
|
2771
|
+
delivery_mode:
|
|
2772
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
2773
|
+
).void
|
|
2774
|
+
end
|
|
2775
|
+
attr_writer :delivery_mode
|
|
2776
|
+
|
|
2777
|
+
sig do
|
|
2778
|
+
params(
|
|
2779
|
+
delivery_mode:
|
|
2780
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol,
|
|
2781
|
+
type: Symbol
|
|
2782
|
+
).returns(T.attached_class)
|
|
2783
|
+
end
|
|
2755
2784
|
def self.new(
|
|
2785
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
2786
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
2787
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
2788
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
2789
|
+
delivery_mode: nil,
|
|
2756
2790
|
# Voice settings provider type
|
|
2757
2791
|
type: :inworld
|
|
2758
2792
|
)
|
|
2759
2793
|
end
|
|
2760
2794
|
|
|
2761
|
-
sig
|
|
2795
|
+
sig do
|
|
2796
|
+
override.returns(
|
|
2797
|
+
{
|
|
2798
|
+
type: Symbol,
|
|
2799
|
+
delivery_mode:
|
|
2800
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
2801
|
+
}
|
|
2802
|
+
)
|
|
2803
|
+
end
|
|
2762
2804
|
def to_hash
|
|
2763
2805
|
end
|
|
2806
|
+
|
|
2807
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
2808
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
2809
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
2810
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
2811
|
+
module DeliveryMode
|
|
2812
|
+
extend Telnyx::Internal::Type::Enum
|
|
2813
|
+
|
|
2814
|
+
TaggedSymbol =
|
|
2815
|
+
T.type_alias do
|
|
2816
|
+
T.all(
|
|
2817
|
+
Symbol,
|
|
2818
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode
|
|
2819
|
+
)
|
|
2820
|
+
end
|
|
2821
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2822
|
+
|
|
2823
|
+
STABLE =
|
|
2824
|
+
T.let(
|
|
2825
|
+
:STABLE,
|
|
2826
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2827
|
+
)
|
|
2828
|
+
BALANCED =
|
|
2829
|
+
T.let(
|
|
2830
|
+
:BALANCED,
|
|
2831
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2832
|
+
)
|
|
2833
|
+
CREATIVE =
|
|
2834
|
+
T.let(
|
|
2835
|
+
:CREATIVE,
|
|
2836
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2837
|
+
)
|
|
2838
|
+
|
|
2839
|
+
sig do
|
|
2840
|
+
override.returns(
|
|
2841
|
+
T::Array[
|
|
2842
|
+
Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2843
|
+
]
|
|
2844
|
+
)
|
|
2845
|
+
end
|
|
2846
|
+
def self.values
|
|
2847
|
+
end
|
|
2848
|
+
end
|
|
2764
2849
|
end
|
|
2765
2850
|
|
|
2766
2851
|
class Xai < Telnyx::Internal::Type::BaseModel
|
|
@@ -2921,16 +3006,99 @@ module Telnyx
|
|
|
2921
3006
|
sig { returns(Symbol) }
|
|
2922
3007
|
attr_accessor :type
|
|
2923
3008
|
|
|
2924
|
-
|
|
3009
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
3010
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
3011
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
3012
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
3013
|
+
sig do
|
|
3014
|
+
returns(
|
|
3015
|
+
T.nilable(
|
|
3016
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
3017
|
+
)
|
|
3018
|
+
)
|
|
3019
|
+
end
|
|
3020
|
+
attr_reader :delivery_mode
|
|
3021
|
+
|
|
3022
|
+
sig do
|
|
3023
|
+
params(
|
|
3024
|
+
delivery_mode:
|
|
3025
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
3026
|
+
).void
|
|
3027
|
+
end
|
|
3028
|
+
attr_writer :delivery_mode
|
|
3029
|
+
|
|
3030
|
+
sig do
|
|
3031
|
+
params(
|
|
3032
|
+
delivery_mode:
|
|
3033
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol,
|
|
3034
|
+
type: Symbol
|
|
3035
|
+
).returns(T.attached_class)
|
|
3036
|
+
end
|
|
2925
3037
|
def self.new(
|
|
3038
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
3039
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
3040
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
3041
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
3042
|
+
delivery_mode: nil,
|
|
2926
3043
|
# Voice settings provider type
|
|
2927
3044
|
type: :inworld
|
|
2928
3045
|
)
|
|
2929
3046
|
end
|
|
2930
3047
|
|
|
2931
|
-
sig
|
|
3048
|
+
sig do
|
|
3049
|
+
override.returns(
|
|
3050
|
+
{
|
|
3051
|
+
type: Symbol,
|
|
3052
|
+
delivery_mode:
|
|
3053
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
3054
|
+
}
|
|
3055
|
+
)
|
|
3056
|
+
end
|
|
2932
3057
|
def to_hash
|
|
2933
3058
|
end
|
|
3059
|
+
|
|
3060
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
3061
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
3062
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
3063
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
3064
|
+
module DeliveryMode
|
|
3065
|
+
extend Telnyx::Internal::Type::Enum
|
|
3066
|
+
|
|
3067
|
+
TaggedSymbol =
|
|
3068
|
+
T.type_alias do
|
|
3069
|
+
T.all(
|
|
3070
|
+
Symbol,
|
|
3071
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode
|
|
3072
|
+
)
|
|
3073
|
+
end
|
|
3074
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3075
|
+
|
|
3076
|
+
STABLE =
|
|
3077
|
+
T.let(
|
|
3078
|
+
:STABLE,
|
|
3079
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
3080
|
+
)
|
|
3081
|
+
BALANCED =
|
|
3082
|
+
T.let(
|
|
3083
|
+
:BALANCED,
|
|
3084
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
3085
|
+
)
|
|
3086
|
+
CREATIVE =
|
|
3087
|
+
T.let(
|
|
3088
|
+
:CREATIVE,
|
|
3089
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
3090
|
+
)
|
|
3091
|
+
|
|
3092
|
+
sig do
|
|
3093
|
+
override.returns(
|
|
3094
|
+
T::Array[
|
|
3095
|
+
Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
3096
|
+
]
|
|
3097
|
+
)
|
|
3098
|
+
end
|
|
3099
|
+
def self.values
|
|
3100
|
+
end
|
|
3101
|
+
end
|
|
2934
3102
|
end
|
|
2935
3103
|
|
|
2936
3104
|
class Xai < Telnyx::Internal::Type::BaseModel
|
|
@@ -843,7 +843,8 @@ module Telnyx
|
|
|
843
843
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
844
844
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
845
845
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
846
|
-
# `Inworld.Max.Oliver`). Supported models: `Mini`,
|
|
846
|
+
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
847
|
+
# `Max`, `TTS2`.
|
|
847
848
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
848
849
|
# `ara`, `rex`, `sal`, `leo`.
|
|
849
850
|
sig { returns(T.nilable(String)) }
|
|
@@ -1001,7 +1002,8 @@ module Telnyx
|
|
|
1001
1002
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
1002
1003
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
1003
1004
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
1004
|
-
# `Inworld.Max.Oliver`). Supported models: `Mini`,
|
|
1005
|
+
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
1006
|
+
# `Max`, `TTS2`.
|
|
1005
1007
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1006
1008
|
# `ara`, `rex`, `sal`, `leo`.
|
|
1007
1009
|
voice: nil,
|
|
@@ -1725,16 +1727,99 @@ module Telnyx
|
|
|
1725
1727
|
sig { returns(Symbol) }
|
|
1726
1728
|
attr_accessor :type
|
|
1727
1729
|
|
|
1728
|
-
|
|
1730
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
1731
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
1732
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
1733
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
1734
|
+
sig do
|
|
1735
|
+
returns(
|
|
1736
|
+
T.nilable(
|
|
1737
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
1738
|
+
)
|
|
1739
|
+
)
|
|
1740
|
+
end
|
|
1741
|
+
attr_reader :delivery_mode
|
|
1742
|
+
|
|
1743
|
+
sig do
|
|
1744
|
+
params(
|
|
1745
|
+
delivery_mode:
|
|
1746
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
1747
|
+
).void
|
|
1748
|
+
end
|
|
1749
|
+
attr_writer :delivery_mode
|
|
1750
|
+
|
|
1751
|
+
sig do
|
|
1752
|
+
params(
|
|
1753
|
+
delivery_mode:
|
|
1754
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol,
|
|
1755
|
+
type: Symbol
|
|
1756
|
+
).returns(T.attached_class)
|
|
1757
|
+
end
|
|
1729
1758
|
def self.new(
|
|
1759
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
1760
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
1761
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
1762
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
1763
|
+
delivery_mode: nil,
|
|
1730
1764
|
# Voice settings provider type
|
|
1731
1765
|
type: :inworld
|
|
1732
1766
|
)
|
|
1733
1767
|
end
|
|
1734
1768
|
|
|
1735
|
-
sig
|
|
1769
|
+
sig do
|
|
1770
|
+
override.returns(
|
|
1771
|
+
{
|
|
1772
|
+
type: Symbol,
|
|
1773
|
+
delivery_mode:
|
|
1774
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
1775
|
+
}
|
|
1776
|
+
)
|
|
1777
|
+
end
|
|
1736
1778
|
def to_hash
|
|
1737
1779
|
end
|
|
1780
|
+
|
|
1781
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
1782
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
1783
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
1784
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
1785
|
+
module DeliveryMode
|
|
1786
|
+
extend Telnyx::Internal::Type::Enum
|
|
1787
|
+
|
|
1788
|
+
TaggedSymbol =
|
|
1789
|
+
T.type_alias do
|
|
1790
|
+
T.all(
|
|
1791
|
+
Symbol,
|
|
1792
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode
|
|
1793
|
+
)
|
|
1794
|
+
end
|
|
1795
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1796
|
+
|
|
1797
|
+
STABLE =
|
|
1798
|
+
T.let(
|
|
1799
|
+
:STABLE,
|
|
1800
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
1801
|
+
)
|
|
1802
|
+
BALANCED =
|
|
1803
|
+
T.let(
|
|
1804
|
+
:BALANCED,
|
|
1805
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
1806
|
+
)
|
|
1807
|
+
CREATIVE =
|
|
1808
|
+
T.let(
|
|
1809
|
+
:CREATIVE,
|
|
1810
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
1811
|
+
)
|
|
1812
|
+
|
|
1813
|
+
sig do
|
|
1814
|
+
override.returns(
|
|
1815
|
+
T::Array[
|
|
1816
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
1817
|
+
]
|
|
1818
|
+
)
|
|
1819
|
+
end
|
|
1820
|
+
def self.values
|
|
1821
|
+
end
|
|
1822
|
+
end
|
|
1738
1823
|
end
|
|
1739
1824
|
|
|
1740
1825
|
class Xai < Telnyx::Internal::Type::BaseModel
|
|
@@ -1897,16 +1982,99 @@ module Telnyx
|
|
|
1897
1982
|
sig { returns(Symbol) }
|
|
1898
1983
|
attr_accessor :type
|
|
1899
1984
|
|
|
1900
|
-
|
|
1985
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
1986
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
1987
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
1988
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
1989
|
+
sig do
|
|
1990
|
+
returns(
|
|
1991
|
+
T.nilable(
|
|
1992
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
1993
|
+
)
|
|
1994
|
+
)
|
|
1995
|
+
end
|
|
1996
|
+
attr_reader :delivery_mode
|
|
1997
|
+
|
|
1998
|
+
sig do
|
|
1999
|
+
params(
|
|
2000
|
+
delivery_mode:
|
|
2001
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
2002
|
+
).void
|
|
2003
|
+
end
|
|
2004
|
+
attr_writer :delivery_mode
|
|
2005
|
+
|
|
2006
|
+
sig do
|
|
2007
|
+
params(
|
|
2008
|
+
delivery_mode:
|
|
2009
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol,
|
|
2010
|
+
type: Symbol
|
|
2011
|
+
).returns(T.attached_class)
|
|
2012
|
+
end
|
|
1901
2013
|
def self.new(
|
|
2014
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
2015
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
2016
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
2017
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
2018
|
+
delivery_mode: nil,
|
|
1902
2019
|
# Voice settings provider type
|
|
1903
2020
|
type: :inworld
|
|
1904
2021
|
)
|
|
1905
2022
|
end
|
|
1906
2023
|
|
|
1907
|
-
sig
|
|
2024
|
+
sig do
|
|
2025
|
+
override.returns(
|
|
2026
|
+
{
|
|
2027
|
+
type: Symbol,
|
|
2028
|
+
delivery_mode:
|
|
2029
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::OrSymbol
|
|
2030
|
+
}
|
|
2031
|
+
)
|
|
2032
|
+
end
|
|
1908
2033
|
def to_hash
|
|
1909
2034
|
end
|
|
2035
|
+
|
|
2036
|
+
# Controls the expressiveness and consistency of the Inworld `TTS2` model's speech
|
|
2037
|
+
# synthesis. `STABLE` favors consistent, predictable output, `CREATIVE` allows
|
|
2038
|
+
# more expressive variation, and `BALANCED` sits in between. Optional and only
|
|
2039
|
+
# supported by `TTS2`; when omitted, the provider default applies.
|
|
2040
|
+
module DeliveryMode
|
|
2041
|
+
extend Telnyx::Internal::Type::Enum
|
|
2042
|
+
|
|
2043
|
+
TaggedSymbol =
|
|
2044
|
+
T.type_alias do
|
|
2045
|
+
T.all(
|
|
2046
|
+
Symbol,
|
|
2047
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode
|
|
2048
|
+
)
|
|
2049
|
+
end
|
|
2050
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2051
|
+
|
|
2052
|
+
STABLE =
|
|
2053
|
+
T.let(
|
|
2054
|
+
:STABLE,
|
|
2055
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2056
|
+
)
|
|
2057
|
+
BALANCED =
|
|
2058
|
+
T.let(
|
|
2059
|
+
:BALANCED,
|
|
2060
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2061
|
+
)
|
|
2062
|
+
CREATIVE =
|
|
2063
|
+
T.let(
|
|
2064
|
+
:CREATIVE,
|
|
2065
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2066
|
+
)
|
|
2067
|
+
|
|
2068
|
+
sig do
|
|
2069
|
+
override.returns(
|
|
2070
|
+
T::Array[
|
|
2071
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::DeliveryMode::TaggedSymbol
|
|
2072
|
+
]
|
|
2073
|
+
)
|
|
2074
|
+
end
|
|
2075
|
+
def self.values
|
|
2076
|
+
end
|
|
2077
|
+
end
|
|
1910
2078
|
end
|
|
1911
2079
|
|
|
1912
2080
|
class Xai < Telnyx::Internal::Type::BaseModel
|
|
@@ -174,7 +174,8 @@ module Telnyx
|
|
|
174
174
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
175
175
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
176
176
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
177
|
-
# `Inworld.Max.Oliver`). Supported models: `Mini`,
|
|
177
|
+
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
178
|
+
# `Max`, `TTS2`.
|
|
178
179
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
179
180
|
# `ara`, `rex`, `sal`, `leo`.
|
|
180
181
|
sig { returns(T.nilable(String)) }
|
|
@@ -319,7 +320,8 @@ module Telnyx
|
|
|
319
320
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
320
321
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
321
322
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
322
|
-
# `Inworld.Max.Oliver`). Supported models: `Mini`,
|
|
323
|
+
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
324
|
+
# `Max`, `TTS2`.
|
|
323
325
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
324
326
|
# `ara`, `rex`, `sal`, `leo`.
|
|
325
327
|
voice: nil,
|