telnyx 5.109.0 → 5.110.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 +8 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/openai_create_response_params.rb +49 -5
- data/lib/telnyx/resources/ai/openai.rb +43 -9
- data/lib/telnyx/resources/ai.rb +5 -5
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/ai/openai_create_response_params.rbi +71 -5
- data/rbi/telnyx/resources/ai/openai.rbi +52 -7
- data/rbi/telnyx/resources/ai.rbi +5 -5
- data/sig/telnyx/models/ai/openai_create_response_params.rbs +36 -4
- data/sig/telnyx/resources/ai/openai.rbs +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd41e8d04d8ad1117446ad9873c0d1b5d31f2e21a3b0ea372fa8613e27279071
|
|
4
|
+
data.tar.gz: 7d5c22cc65293f1dc3e9d3475010077a35ffe06665bed71712ed6e1175b67035
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf38dc0775b7725483a70461e39a35592497109ca2d5bdc963993d706a2cefea674f651dd4d7e7149670435a93f34ee9506b694164b589cebefff5df5851a320
|
|
7
|
+
data.tar.gz: 496d527a14db94b9cea4ccb0134a82909e88d9770abfb54f0bb3570da7c17b05c264b045ed4020085c41ca3da21882065c18dba91465dca4443411d87345ba6f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.110.0 (2026-05-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.109.0...v5.110.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.109.0...v5.110.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Document OpenAI responses conversation flow ([6f06f24](https://github.com/team-telnyx/telnyx-ruby/commit/6f06f243b406719fcf17b1b3339b6f74b54854fb))
|
|
10
|
+
|
|
3
11
|
## 5.109.0 (2026-05-11)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v5.108.0...v5.109.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.108.0...v5.109.0)
|
data/README.md
CHANGED
|
@@ -8,13 +8,57 @@ module Telnyx
|
|
|
8
8
|
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Telnyx::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
11
|
+
# @!attribute conversation
|
|
12
|
+
# Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
|
|
13
|
+
# Telnyx stores this turn on that conversation and uses the conversation's prior
|
|
14
|
+
# messages as context. Reuse the same ID for subsequent turns and tool-result
|
|
15
|
+
# followups. Omit it for a non-persisted, stateless response.
|
|
12
16
|
#
|
|
13
|
-
# @return [
|
|
14
|
-
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
optional :conversation, String
|
|
15
19
|
|
|
16
|
-
# @!
|
|
17
|
-
#
|
|
20
|
+
# @!attribute input
|
|
21
|
+
# The input items for this turn, using the OpenAI Responses API input format.
|
|
22
|
+
#
|
|
23
|
+
# @return [Object, nil]
|
|
24
|
+
optional :input, Telnyx::Internal::Type::Unknown
|
|
25
|
+
|
|
26
|
+
# @!attribute instructions
|
|
27
|
+
# Optional system/developer instructions for the model. When used with a persisted
|
|
28
|
+
# `conversation`, send these on the first request that creates the thread;
|
|
29
|
+
# subsequent turns can rely on the stored history.
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :instructions, String
|
|
33
|
+
|
|
34
|
+
# @!attribute model
|
|
35
|
+
# Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
|
|
36
|
+
# another model available from the Telnyx OpenAI-compatible models endpoint.
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
optional :model, String
|
|
40
|
+
|
|
41
|
+
# @!attribute stream
|
|
42
|
+
# Set to `true` to stream Server-Sent Events, matching OpenAI's Responses
|
|
43
|
+
# streaming format.
|
|
44
|
+
#
|
|
45
|
+
# @return [Boolean, nil]
|
|
46
|
+
optional :stream, Telnyx::Internal::Type::Boolean
|
|
47
|
+
|
|
48
|
+
# @!method initialize(conversation: nil, input: nil, instructions: nil, model: nil, stream: nil, request_options: {})
|
|
49
|
+
# Some parameter documentations has been truncated, see
|
|
50
|
+
# {Telnyx::Models::AI::OpenAICreateResponseParams} for more details.
|
|
51
|
+
#
|
|
52
|
+
# @param conversation [String] Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided, Te
|
|
53
|
+
#
|
|
54
|
+
# @param input [Object] The input items for this turn, using the OpenAI Responses API input format.
|
|
55
|
+
#
|
|
56
|
+
# @param instructions [String] Optional system/developer instructions for the model. When used with a persisted
|
|
57
|
+
#
|
|
58
|
+
# @param model [String] Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or a
|
|
59
|
+
#
|
|
60
|
+
# @param stream [Boolean] Set to `true` to stream Server-Sent Events, matching OpenAI's Responses streamin
|
|
61
|
+
#
|
|
18
62
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
19
63
|
end
|
|
20
64
|
end
|
|
@@ -12,26 +12,60 @@ module Telnyx
|
|
|
12
12
|
# @return [Telnyx::Resources::AI::OpenAI::Chat]
|
|
13
13
|
attr_reader :chat
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
# and may be used with the OpenAI JS or Python SDK. Response id parameter is not
|
|
18
|
-
# supported at the moment. Use 'conversation' parameter to leverage persistent
|
|
19
|
-
# conversations feature.
|
|
15
|
+
# Some parameter documentations has been truncated, see
|
|
16
|
+
# {Telnyx::Models::AI::OpenAICreateResponseParams} for more details.
|
|
20
17
|
#
|
|
21
|
-
#
|
|
18
|
+
# Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint
|
|
19
|
+
# is compatible with the
|
|
20
|
+
# [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
|
|
21
|
+
# and may be used with the OpenAI JS or Python SDK by setting the base URL to
|
|
22
|
+
# `https://api.telnyx.com/v2/ai/openai`.
|
|
23
|
+
#
|
|
24
|
+
# The `conversation` parameter refers to a Telnyx Conversation rather than an
|
|
25
|
+
# OpenAI-hosted conversation object. To persist a thread across turns, first
|
|
26
|
+
# [create a conversation](https://developers.telnyx.com/api-reference/conversations/create-a-conversation)
|
|
27
|
+
# with `POST /ai/conversations`, then pass that conversation's `id` in the
|
|
28
|
+
# Responses request as `conversation`. The endpoint appends the new input,
|
|
29
|
+
# assistant output, reasoning, and tool-call messages to that conversation. Reuse
|
|
30
|
+
# the same `conversation` id on subsequent Responses requests, including
|
|
31
|
+
# tool-result followups, so the model receives the prior context.
|
|
32
|
+
#
|
|
33
|
+
# If `conversation` is omitted, the request is processed without persisting
|
|
34
|
+
# messages to a Telnyx conversation. Use the Conversations API to manage history:
|
|
35
|
+
# [list conversations](https://developers.telnyx.com/api-reference/conversations/list-conversations)
|
|
36
|
+
# (optionally filtered by metadata),
|
|
37
|
+
# [fetch messages](https://developers.telnyx.com/api-reference/conversations/get-conversation-messages)
|
|
38
|
+
# for a conversation, and optionally
|
|
39
|
+
# [add messages](https://developers.telnyx.com/api-reference/conversations/create-message)
|
|
40
|
+
# outside the Responses flow.
|
|
41
|
+
#
|
|
42
|
+
# You can attach arbitrary metadata when creating a conversation (for example to
|
|
43
|
+
# tag the conversation's source, channel, or user) and later filter by it when
|
|
44
|
+
# listing conversations.
|
|
45
|
+
#
|
|
46
|
+
# @overload create_response(conversation: nil, input: nil, instructions: nil, model: nil, stream: nil, request_options: {})
|
|
47
|
+
#
|
|
48
|
+
# @param conversation [String] Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided, Te
|
|
49
|
+
#
|
|
50
|
+
# @param input [Object] The input items for this turn, using the OpenAI Responses API input format.
|
|
51
|
+
#
|
|
52
|
+
# @param instructions [String] Optional system/developer instructions for the model. When used with a persisted
|
|
53
|
+
#
|
|
54
|
+
# @param model [String] Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or a
|
|
55
|
+
#
|
|
56
|
+
# @param stream [Boolean] Set to `true` to stream Server-Sent Events, matching OpenAI's Responses streamin
|
|
22
57
|
#
|
|
23
|
-
# @param body [Hash{Symbol=>Object}]
|
|
24
58
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
25
59
|
#
|
|
26
60
|
# @return [Hash{Symbol=>Object}]
|
|
27
61
|
#
|
|
28
62
|
# @see Telnyx::Models::AI::OpenAICreateResponseParams
|
|
29
|
-
def create_response(params)
|
|
63
|
+
def create_response(params = {})
|
|
30
64
|
parsed, options = Telnyx::AI::OpenAICreateResponseParams.dump_request(params)
|
|
31
65
|
@client.request(
|
|
32
66
|
method: :post,
|
|
33
67
|
path: "ai/openai/responses",
|
|
34
|
-
body: parsed
|
|
68
|
+
body: parsed,
|
|
35
69
|
model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
|
|
36
70
|
options: options
|
|
37
71
|
)
|
data/lib/telnyx/resources/ai.rb
CHANGED
|
@@ -48,12 +48,12 @@ module Telnyx
|
|
|
48
48
|
|
|
49
49
|
# @deprecated
|
|
50
50
|
#
|
|
51
|
-
# **Deprecated**: Use `POST /v2/ai/openai/responses` instead.
|
|
52
|
-
#
|
|
53
|
-
# [OpenAI Responses API](https://
|
|
51
|
+
# **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
|
|
52
|
+
# compatible with the
|
|
53
|
+
# [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
|
|
54
54
|
# and may be used with the OpenAI JS or Python SDK. Response id parameter is not
|
|
55
|
-
# supported at the moment. Use
|
|
56
|
-
# conversations
|
|
55
|
+
# supported at the moment. Use the `conversation` parameter with a Telnyx
|
|
56
|
+
# Conversation ID to leverage persistent conversations.
|
|
57
57
|
#
|
|
58
58
|
# @overload create_response(body:, request_options: {})
|
|
59
59
|
#
|
data/lib/telnyx/version.rb
CHANGED
|
@@ -15,22 +15,88 @@ module Telnyx
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
# Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
|
|
19
|
+
# Telnyx stores this turn on that conversation and uses the conversation's prior
|
|
20
|
+
# messages as context. Reuse the same ID for subsequent turns and tool-result
|
|
21
|
+
# followups. Omit it for a non-persisted, stateless response.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :conversation
|
|
24
|
+
|
|
25
|
+
sig { params(conversation: String).void }
|
|
26
|
+
attr_writer :conversation
|
|
27
|
+
|
|
28
|
+
# The input items for this turn, using the OpenAI Responses API input format.
|
|
29
|
+
sig { returns(T.nilable(T.anything)) }
|
|
30
|
+
attr_reader :input
|
|
31
|
+
|
|
32
|
+
sig { params(input: T.anything).void }
|
|
33
|
+
attr_writer :input
|
|
34
|
+
|
|
35
|
+
# Optional system/developer instructions for the model. When used with a persisted
|
|
36
|
+
# `conversation`, send these on the first request that creates the thread;
|
|
37
|
+
# subsequent turns can rely on the stored history.
|
|
38
|
+
sig { returns(T.nilable(String)) }
|
|
39
|
+
attr_reader :instructions
|
|
40
|
+
|
|
41
|
+
sig { params(instructions: String).void }
|
|
42
|
+
attr_writer :instructions
|
|
43
|
+
|
|
44
|
+
# Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
|
|
45
|
+
# another model available from the Telnyx OpenAI-compatible models endpoint.
|
|
46
|
+
sig { returns(T.nilable(String)) }
|
|
47
|
+
attr_reader :model
|
|
48
|
+
|
|
49
|
+
sig { params(model: String).void }
|
|
50
|
+
attr_writer :model
|
|
51
|
+
|
|
52
|
+
# Set to `true` to stream Server-Sent Events, matching OpenAI's Responses
|
|
53
|
+
# streaming format.
|
|
54
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
55
|
+
attr_reader :stream
|
|
56
|
+
|
|
57
|
+
sig { params(stream: T::Boolean).void }
|
|
58
|
+
attr_writer :stream
|
|
20
59
|
|
|
21
60
|
sig do
|
|
22
61
|
params(
|
|
23
|
-
|
|
62
|
+
conversation: String,
|
|
63
|
+
input: T.anything,
|
|
64
|
+
instructions: String,
|
|
65
|
+
model: String,
|
|
66
|
+
stream: T::Boolean,
|
|
24
67
|
request_options: Telnyx::RequestOptions::OrHash
|
|
25
68
|
).returns(T.attached_class)
|
|
26
69
|
end
|
|
27
|
-
def self.new(
|
|
70
|
+
def self.new(
|
|
71
|
+
# Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
|
|
72
|
+
# Telnyx stores this turn on that conversation and uses the conversation's prior
|
|
73
|
+
# messages as context. Reuse the same ID for subsequent turns and tool-result
|
|
74
|
+
# followups. Omit it for a non-persisted, stateless response.
|
|
75
|
+
conversation: nil,
|
|
76
|
+
# The input items for this turn, using the OpenAI Responses API input format.
|
|
77
|
+
input: nil,
|
|
78
|
+
# Optional system/developer instructions for the model. When used with a persisted
|
|
79
|
+
# `conversation`, send these on the first request that creates the thread;
|
|
80
|
+
# subsequent turns can rely on the stored history.
|
|
81
|
+
instructions: nil,
|
|
82
|
+
# Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
|
|
83
|
+
# another model available from the Telnyx OpenAI-compatible models endpoint.
|
|
84
|
+
model: nil,
|
|
85
|
+
# Set to `true` to stream Server-Sent Events, matching OpenAI's Responses
|
|
86
|
+
# streaming format.
|
|
87
|
+
stream: nil,
|
|
88
|
+
request_options: {}
|
|
89
|
+
)
|
|
28
90
|
end
|
|
29
91
|
|
|
30
92
|
sig do
|
|
31
93
|
override.returns(
|
|
32
94
|
{
|
|
33
|
-
|
|
95
|
+
conversation: String,
|
|
96
|
+
input: T.anything,
|
|
97
|
+
instructions: String,
|
|
98
|
+
model: String,
|
|
99
|
+
stream: T::Boolean,
|
|
34
100
|
request_options: Telnyx::RequestOptions
|
|
35
101
|
}
|
|
36
102
|
)
|
|
@@ -12,18 +12,63 @@ module Telnyx
|
|
|
12
12
|
sig { returns(Telnyx::Resources::AI::OpenAI::Chat) }
|
|
13
13
|
attr_reader :chat
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
15
|
+
# Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint
|
|
16
|
+
# is compatible with the
|
|
17
|
+
# [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
|
|
18
|
+
# and may be used with the OpenAI JS or Python SDK by setting the base URL to
|
|
19
|
+
# `https://api.telnyx.com/v2/ai/openai`.
|
|
20
|
+
#
|
|
21
|
+
# The `conversation` parameter refers to a Telnyx Conversation rather than an
|
|
22
|
+
# OpenAI-hosted conversation object. To persist a thread across turns, first
|
|
23
|
+
# [create a conversation](https://developers.telnyx.com/api-reference/conversations/create-a-conversation)
|
|
24
|
+
# with `POST /ai/conversations`, then pass that conversation's `id` in the
|
|
25
|
+
# Responses request as `conversation`. The endpoint appends the new input,
|
|
26
|
+
# assistant output, reasoning, and tool-call messages to that conversation. Reuse
|
|
27
|
+
# the same `conversation` id on subsequent Responses requests, including
|
|
28
|
+
# tool-result followups, so the model receives the prior context.
|
|
29
|
+
#
|
|
30
|
+
# If `conversation` is omitted, the request is processed without persisting
|
|
31
|
+
# messages to a Telnyx conversation. Use the Conversations API to manage history:
|
|
32
|
+
# [list conversations](https://developers.telnyx.com/api-reference/conversations/list-conversations)
|
|
33
|
+
# (optionally filtered by metadata),
|
|
34
|
+
# [fetch messages](https://developers.telnyx.com/api-reference/conversations/get-conversation-messages)
|
|
35
|
+
# for a conversation, and optionally
|
|
36
|
+
# [add messages](https://developers.telnyx.com/api-reference/conversations/create-message)
|
|
37
|
+
# outside the Responses flow.
|
|
38
|
+
#
|
|
39
|
+
# You can attach arbitrary metadata when creating a conversation (for example to
|
|
40
|
+
# tag the conversation's source, channel, or user) and later filter by it when
|
|
41
|
+
# listing conversations.
|
|
20
42
|
sig do
|
|
21
43
|
params(
|
|
22
|
-
|
|
44
|
+
conversation: String,
|
|
45
|
+
input: T.anything,
|
|
46
|
+
instructions: String,
|
|
47
|
+
model: String,
|
|
48
|
+
stream: T::Boolean,
|
|
23
49
|
request_options: Telnyx::RequestOptions::OrHash
|
|
24
50
|
).returns(T::Hash[Symbol, T.anything])
|
|
25
51
|
end
|
|
26
|
-
def create_response(
|
|
52
|
+
def create_response(
|
|
53
|
+
# Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,
|
|
54
|
+
# Telnyx stores this turn on that conversation and uses the conversation's prior
|
|
55
|
+
# messages as context. Reuse the same ID for subsequent turns and tool-result
|
|
56
|
+
# followups. Omit it for a non-persisted, stateless response.
|
|
57
|
+
conversation: nil,
|
|
58
|
+
# The input items for this turn, using the OpenAI Responses API input format.
|
|
59
|
+
input: nil,
|
|
60
|
+
# Optional system/developer instructions for the model. When used with a persisted
|
|
61
|
+
# `conversation`, send these on the first request that creates the thread;
|
|
62
|
+
# subsequent turns can rely on the stored history.
|
|
63
|
+
instructions: nil,
|
|
64
|
+
# Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
|
|
65
|
+
# another model available from the Telnyx OpenAI-compatible models endpoint.
|
|
66
|
+
model: nil,
|
|
67
|
+
# Set to `true` to stream Server-Sent Events, matching OpenAI's Responses
|
|
68
|
+
# streaming format.
|
|
69
|
+
stream: nil,
|
|
70
|
+
request_options: {}
|
|
71
|
+
)
|
|
27
72
|
end
|
|
28
73
|
|
|
29
74
|
# Lists every model currently available to your account on Telnyx Inference,
|
data/rbi/telnyx/resources/ai.rbi
CHANGED
|
@@ -46,12 +46,12 @@ module Telnyx
|
|
|
46
46
|
sig { returns(Telnyx::Resources::AI::Tools) }
|
|
47
47
|
attr_reader :tools
|
|
48
48
|
|
|
49
|
-
# **Deprecated**: Use `POST /v2/ai/openai/responses` instead.
|
|
50
|
-
#
|
|
51
|
-
# [OpenAI Responses API](https://
|
|
49
|
+
# **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
|
|
50
|
+
# compatible with the
|
|
51
|
+
# [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
|
|
52
52
|
# and may be used with the OpenAI JS or Python SDK. Response id parameter is not
|
|
53
|
-
# supported at the moment. Use
|
|
54
|
-
# conversations
|
|
53
|
+
# supported at the moment. Use the `conversation` parameter with a Telnyx
|
|
54
|
+
# Conversation ID to leverage persistent conversations.
|
|
55
55
|
sig do
|
|
56
56
|
params(
|
|
57
57
|
body: T::Hash[Symbol, T.anything],
|
|
@@ -2,22 +2,54 @@ module Telnyx
|
|
|
2
2
|
module Models
|
|
3
3
|
module AI
|
|
4
4
|
type openai_create_response_params =
|
|
5
|
-
{
|
|
5
|
+
{
|
|
6
|
+
conversation: String,
|
|
7
|
+
input: top,
|
|
8
|
+
instructions: String,
|
|
9
|
+
model: String,
|
|
10
|
+
stream: bool
|
|
11
|
+
}
|
|
6
12
|
& Telnyx::Internal::Type::request_parameters
|
|
7
13
|
|
|
8
14
|
class OpenAICreateResponseParams < Telnyx::Internal::Type::BaseModel
|
|
9
15
|
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
10
16
|
include Telnyx::Internal::Type::RequestParameters
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
attr_reader conversation: String?
|
|
19
|
+
|
|
20
|
+
def conversation=: (String) -> String
|
|
21
|
+
|
|
22
|
+
attr_reader input: top?
|
|
23
|
+
|
|
24
|
+
def input=: (top) -> top
|
|
25
|
+
|
|
26
|
+
attr_reader instructions: String?
|
|
27
|
+
|
|
28
|
+
def instructions=: (String) -> String
|
|
29
|
+
|
|
30
|
+
attr_reader model: String?
|
|
31
|
+
|
|
32
|
+
def model=: (String) -> String
|
|
33
|
+
|
|
34
|
+
attr_reader stream: bool?
|
|
35
|
+
|
|
36
|
+
def stream=: (bool) -> bool
|
|
13
37
|
|
|
14
38
|
def initialize: (
|
|
15
|
-
|
|
39
|
+
?conversation: String,
|
|
40
|
+
?input: top,
|
|
41
|
+
?instructions: String,
|
|
42
|
+
?model: String,
|
|
43
|
+
?stream: bool,
|
|
16
44
|
?request_options: Telnyx::request_opts
|
|
17
45
|
) -> void
|
|
18
46
|
|
|
19
47
|
def to_hash: -> {
|
|
20
|
-
|
|
48
|
+
conversation: String,
|
|
49
|
+
input: top,
|
|
50
|
+
instructions: String,
|
|
51
|
+
model: String,
|
|
52
|
+
stream: bool,
|
|
21
53
|
request_options: Telnyx::RequestOptions
|
|
22
54
|
}
|
|
23
55
|
end
|
|
@@ -7,7 +7,11 @@ module Telnyx
|
|
|
7
7
|
attr_reader chat: Telnyx::Resources::AI::OpenAI::Chat
|
|
8
8
|
|
|
9
9
|
def create_response: (
|
|
10
|
-
|
|
10
|
+
?conversation: String,
|
|
11
|
+
?input: top,
|
|
12
|
+
?instructions: String,
|
|
13
|
+
?model: String,
|
|
14
|
+
?stream: bool,
|
|
11
15
|
?request_options: Telnyx::request_opts
|
|
12
16
|
) -> Telnyx::Models::AI::openai_create_response_response
|
|
13
17
|
|