telnyx 5.127.0 → 5.128.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1ea8e5f0025fa1bed93aff26966ede1f904b29d60f7129ab45c5da31e940a30
4
- data.tar.gz: 2e55973cf269d3cbf3a0fd0bb759ebc37afb9e0b6fceba582127da8604ae51ea
3
+ metadata.gz: de5c23fe7fe804e74d3c3162bfa71160c7e9d926da8b49946f583fe0714d32ed
4
+ data.tar.gz: 8ed2365501197fcca7af44f61273475cf952b0294e3fa5e40bdb285bd13be001
5
5
  SHA512:
6
- metadata.gz: 82c4d6fd7a0d79f3c98205932067d2ca0a4b498634daed7f7a1b4ba1de4c974f43a9be2b2010edc6cf3bef8ccf6d7cf6da07f6f7db0740c4e33ec0f6d953713b
7
- data.tar.gz: 7ba21797f695d19c2126b50d00ea1b25493c8f01687053bbd8b197220187bcfae35af511c3140a61ad11822a95e7710e9afe40bd6c6834b9ca86ba5aaa6e201a
6
+ metadata.gz: 786a447fda785006672c675d62b67b1a5e55aa6946d4f825a8c3f4927517448619065c05b0be3bbee56df543f54849a1c58451cf6f69b63a0a661e3ad7dbff93
7
+ data.tar.gz: dd3351dac15a6ba5f81d399685e087a77c5b165fa70cde6aab6d6d984b0fc7c37a0c65fd18f4d5f3bce4b3dfed98d241a69d8b2916a9cd9ae7e67df61e8c0089
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.128.0 (2026-06-15)
4
+
5
+ Full Changelog: [v5.127.0...v5.128.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.127.0...v5.128.0)
6
+
7
+ ### Features
8
+
9
+ * Document POST /ai/assistants/{assistant_id}/instructions/enhance ([f07ac06](https://github.com/team-telnyx/telnyx-ruby/commit/f07ac069ef9d4690e5d5ac74e7ce4a61fa238957))
10
+
3
11
  ## 5.127.0 (2026-06-11)
4
12
 
5
13
  Full Changelog: [v5.126.0...v5.127.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.126.0...v5.127.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.127.0"
27
+ gem "telnyx", "~> 5.128.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ module Assistants
7
+ # @see Telnyx::Resources::AI::Assistants::Instructions#enhance
8
+ class InstructionEnhanceParams < Telnyx::Internal::Type::BaseModel
9
+ extend Telnyx::Internal::Type::RequestParameters::Converter
10
+ include Telnyx::Internal::Type::RequestParameters
11
+
12
+ # @!attribute assistant_id
13
+ #
14
+ # @return [String]
15
+ required :assistant_id, String
16
+
17
+ # @!attribute enhancement_prompt
18
+ # Optional guidance describing how the instructions should be enhanced. When
19
+ # provided, the LLM applies these requested changes in addition to fixing any
20
+ # identified issues.
21
+ #
22
+ # @return [String, nil]
23
+ optional :enhancement_prompt, String, nil?: true
24
+
25
+ # @!attribute instructions
26
+ # The instructions to enhance. When omitted, the assistant's existing instructions
27
+ # are used.
28
+ #
29
+ # @return [String, nil]
30
+ optional :instructions, String, nil?: true
31
+
32
+ # @!method initialize(assistant_id:, enhancement_prompt: nil, instructions: nil, request_options: {})
33
+ # Some parameter documentations has been truncated, see
34
+ # {Telnyx::Models::AI::Assistants::InstructionEnhanceParams} for more details.
35
+ #
36
+ # @param assistant_id [String]
37
+ #
38
+ # @param enhancement_prompt [String, nil] Optional guidance describing how the instructions should be enhanced. When provi
39
+ #
40
+ # @param instructions [String, nil] The instructions to enhance. When omitted, the assistant's existing instructions
41
+ #
42
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ module Assistants
7
+ InstructionEnhanceResponse = String
8
+ end
9
+ end
10
+ end
11
+ end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.127.0"
4
+ VERSION = "5.128.0"
5
5
  end
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
@@ -0,0 +1,11 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ module Assistants
7
+ InstructionEnhanceResponse = String
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,55 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class AI
6
+ class Assistants
7
+ # Configure AI assistant specifications
8
+ class Instructions
9
+ # Enhance an assistant's instructions using an LLM. The endpoint reads the
10
+ # assistant's current instructions and tools, then streams back improved
11
+ # instructions as they are generated.
12
+ #
13
+ # Optionally provide an `enhancement_prompt` to steer the changes (for example,
14
+ # "make the instructions more concise" or "add error handling guidance"). When
15
+ # omitted, the assistant's existing instructions are used as the basis for the
16
+ # enhancement.
17
+ #
18
+ # The enhancement focuses on tool-calling reliability, clarity and precision,
19
+ # completeness and error handling, tool schema alignment, and conversation flow
20
+ # structure.
21
+ #
22
+ # The response is streamed as `text/plain` using chunked transfer encoding;
23
+ # consume the body incrementally to render the enhanced instructions as they
24
+ # arrive.
25
+ sig do
26
+ params(
27
+ assistant_id: String,
28
+ enhancement_prompt: T.nilable(String),
29
+ instructions: T.nilable(String),
30
+ request_options: Telnyx::RequestOptions::OrHash
31
+ ).returns(String)
32
+ end
33
+ def enhance(
34
+ # Unique identifier of the assistant.
35
+ assistant_id,
36
+ # Optional guidance describing how the instructions should be enhanced. When
37
+ # provided, the LLM applies these requested changes in addition to fixing any
38
+ # identified issues.
39
+ enhancement_prompt: nil,
40
+ # The instructions to enhance. When omitted, the assistant's existing instructions
41
+ # are used.
42
+ instructions: nil,
43
+ request_options: {}
44
+ )
45
+ end
46
+
47
+ # @api private
48
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
49
+ def self.new(client:)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -29,6 +29,10 @@ module Telnyx
29
29
  sig { returns(Telnyx::Resources::AI::Assistants::Tags) }
30
30
  attr_reader :tags
31
31
 
32
+ # Configure AI assistant specifications
33
+ sig { returns(Telnyx::Resources::AI::Assistants::Instructions) }
34
+ attr_reader :instructions
35
+
32
36
  # Create a new AI Assistant.
33
37
  sig do
34
38
  params(
@@ -0,0 +1,40 @@
1
+ module Telnyx
2
+ module Models
3
+ module AI
4
+ module Assistants
5
+ type instruction_enhance_params =
6
+ {
7
+ assistant_id: String,
8
+ enhancement_prompt: String?,
9
+ instructions: String?
10
+ }
11
+ & Telnyx::Internal::Type::request_parameters
12
+
13
+ class InstructionEnhanceParams < Telnyx::Internal::Type::BaseModel
14
+ extend Telnyx::Internal::Type::RequestParameters::Converter
15
+ include Telnyx::Internal::Type::RequestParameters
16
+
17
+ attr_accessor assistant_id: String
18
+
19
+ attr_accessor enhancement_prompt: String?
20
+
21
+ attr_accessor instructions: String?
22
+
23
+ def initialize: (
24
+ assistant_id: String,
25
+ ?enhancement_prompt: String?,
26
+ ?instructions: String?,
27
+ ?request_options: Telnyx::request_opts
28
+ ) -> void
29
+
30
+ def to_hash: -> {
31
+ assistant_id: String,
32
+ enhancement_prompt: String?,
33
+ instructions: String?,
34
+ request_options: Telnyx::RequestOptions
35
+ }
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,9 @@
1
+ module Telnyx
2
+ module Models
3
+ module AI
4
+ module Assistants
5
+ class InstructionEnhanceResponse = String
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,18 @@
1
+ module Telnyx
2
+ module Resources
3
+ class AI
4
+ class Assistants
5
+ class Instructions
6
+ def enhance: (
7
+ String assistant_id,
8
+ ?enhancement_prompt: String?,
9
+ ?instructions: String?,
10
+ ?request_options: Telnyx::request_opts
11
+ ) -> String
12
+
13
+ def initialize: (client: Telnyx::Client) -> void
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -14,6 +14,8 @@ module Telnyx
14
14
 
15
15
  attr_reader tags: Telnyx::Resources::AI::Assistants::Tags
16
16
 
17
+ attr_reader instructions: Telnyx::Resources::AI::Assistants::Instructions
18
+
17
19
  def create: (
18
20
  instructions: String,
19
21
  name: String,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telnyx
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.127.0
4
+ version: 5.128.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Telnyx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-11 00:00:00.000000000 Z
11
+ date: 2026-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -166,6 +166,8 @@ files:
166
166
  - lib/telnyx/models/ai/assistants/canary_deploy_update_params.rb
167
167
  - lib/telnyx/models/ai/assistants/conversation_channel_type.rb
168
168
  - lib/telnyx/models/ai/assistants/event_status.rb
169
+ - lib/telnyx/models/ai/assistants/instruction_enhance_params.rb
170
+ - lib/telnyx/models/ai/assistants/instruction_enhance_response.rb
169
171
  - lib/telnyx/models/ai/assistants/scheduled_event_create_params.rb
170
172
  - lib/telnyx/models/ai/assistants/scheduled_event_delete_params.rb
171
173
  - lib/telnyx/models/ai/assistants/scheduled_event_list_params.rb
@@ -2547,6 +2549,7 @@ files:
2547
2549
  - lib/telnyx/resources/ai.rb
2548
2550
  - lib/telnyx/resources/ai/assistants.rb
2549
2551
  - lib/telnyx/resources/ai/assistants/canary_deploys.rb
2552
+ - lib/telnyx/resources/ai/assistants/instructions.rb
2550
2553
  - lib/telnyx/resources/ai/assistants/scheduled_events.rb
2551
2554
  - lib/telnyx/resources/ai/assistants/tags.rb
2552
2555
  - lib/telnyx/resources/ai/assistants/tests.rb
@@ -2974,6 +2977,8 @@ files:
2974
2977
  - rbi/telnyx/models/ai/assistants/canary_deploy_update_params.rbi
2975
2978
  - rbi/telnyx/models/ai/assistants/conversation_channel_type.rbi
2976
2979
  - rbi/telnyx/models/ai/assistants/event_status.rbi
2980
+ - rbi/telnyx/models/ai/assistants/instruction_enhance_params.rbi
2981
+ - rbi/telnyx/models/ai/assistants/instruction_enhance_response.rbi
2977
2982
  - rbi/telnyx/models/ai/assistants/scheduled_event_create_params.rbi
2978
2983
  - rbi/telnyx/models/ai/assistants/scheduled_event_delete_params.rbi
2979
2984
  - rbi/telnyx/models/ai/assistants/scheduled_event_list_params.rbi
@@ -5355,6 +5360,7 @@ files:
5355
5360
  - rbi/telnyx/resources/ai.rbi
5356
5361
  - rbi/telnyx/resources/ai/assistants.rbi
5357
5362
  - rbi/telnyx/resources/ai/assistants/canary_deploys.rbi
5363
+ - rbi/telnyx/resources/ai/assistants/instructions.rbi
5358
5364
  - rbi/telnyx/resources/ai/assistants/scheduled_events.rbi
5359
5365
  - rbi/telnyx/resources/ai/assistants/tags.rbi
5360
5366
  - rbi/telnyx/resources/ai/assistants/tests.rbi
@@ -5773,6 +5779,8 @@ files:
5773
5779
  - sig/telnyx/models/ai/assistants/canary_deploy_update_params.rbs
5774
5780
  - sig/telnyx/models/ai/assistants/conversation_channel_type.rbs
5775
5781
  - sig/telnyx/models/ai/assistants/event_status.rbs
5782
+ - sig/telnyx/models/ai/assistants/instruction_enhance_params.rbs
5783
+ - sig/telnyx/models/ai/assistants/instruction_enhance_response.rbs
5776
5784
  - sig/telnyx/models/ai/assistants/scheduled_event_create_params.rbs
5777
5785
  - sig/telnyx/models/ai/assistants/scheduled_event_delete_params.rbs
5778
5786
  - sig/telnyx/models/ai/assistants/scheduled_event_list_params.rbs
@@ -8154,6 +8162,7 @@ files:
8154
8162
  - sig/telnyx/resources/ai.rbs
8155
8163
  - sig/telnyx/resources/ai/assistants.rbs
8156
8164
  - sig/telnyx/resources/ai/assistants/canary_deploys.rbs
8165
+ - sig/telnyx/resources/ai/assistants/instructions.rbs
8157
8166
  - sig/telnyx/resources/ai/assistants/scheduled_events.rbs
8158
8167
  - sig/telnyx/resources/ai/assistants/tags.rbs
8159
8168
  - sig/telnyx/resources/ai/assistants/tests.rbs