Class: Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb,
sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs

Overview

See Also:

  • Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams#webhook

Defined Under Namespace

Modules: Message, Method Classes: BodyParameters, Header, PathParameters, QueryParameters, StoreFieldsAsVariable

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(content:, timing_ms:, type: :request_response_delayed) ⇒ Object

Parameters:

  • content (String)

    The text the assistant speaks.

  • timing_ms (Integer)

    The delay in milliseconds from the start of the webhook request.

  • type (Symbol, :request_response_delayed) (defaults to: :request_response_delayed)

    Speak the filler message after the configured delay if the webhook response is s



# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 166

Instance Attribute Details

#asyncBoolean?

If async, the assistant will move forward without waiting for your server to respond.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


59
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 59

optional :async, Telnyx::Internal::Type::Boolean

#async_timeout_msInteger?

Maximum time in milliseconds that the conversation worker waits for an async webhook response before returning "Submitted" to the LLM. If unset, the platform default (currently 300ms) is used.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


67
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 67

optional :async_timeout_ms, Integer

#body_parametersTelnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::BodyParameters?

The body parameters the webhook tool accepts, described as a JSON Schema object. These parameters will be passed to the webhook as the body of the request. See the JSON Schema reference for documentation about the format



76
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 76

optional :body_parameters, -> { Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::BodyParameters }

#descriptionString

The description of the tool.

Parameters:

  • value (String)

Returns:

  • (String)


37
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 37

required :description, String

#headersArray<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::Header>?

The headers to be sent to the external tool.



82
83
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 82

optional :headers,
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::Header] }

#http_methodSymbol, ...

The HTTP method to be used when calling the external tool.



100
101
102
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 100

optional :http_method,
enum: -> { Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::Method },
api_name: :method

#messagesArray<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::Message::WebhookToolRequestStartMessage, Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::Message::WebhookToolRequestResponseDelayedMessage>?

Filler messages spoken while a synchronous webhook request is in progress. request_start messages are spoken immediately when the request begins. request_response_delayed messages are spoken after timing_ms has elapsed only if the webhook response is still pending. Filler messages are not used for asynchronous webhooks.



93
94
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 93

optional :messages,
-> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::Message] }

#nameString

The name of the tool.

Parameters:

  • value (String)

Returns:

  • (String)


43
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 43

required :name, String

#path_parametersTelnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters?

The path parameters the webhook tool accepts, described as a JSON Schema object. These parameters will be passed to the webhook as the path of the request if the URL contains a placeholder for a value. See the JSON Schema reference for documentation about the format



112
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 112

optional :path_parameters, -> { Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::PathParameters }

#preset_body_fieldsHash{Symbol=>Object}?

Body fields supplied by the assistant configuration rather than by the model. They are never advertised in the tool definition, so the LLM can neither see nor set them, and they take precedence over a body_parameters value of the same name. Values support mustache templating, so they can hold dynamic variables ({{customer_id}}) and integration secrets ({{#integration_secret}}my-secret{{/integration_secret}}). Not sent on GET requests, which carry no body.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


124
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 124

optional :preset_body_fields, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#preset_query_paramsHash{Symbol=>Object}?

Query string parameters supplied by the assistant configuration rather than by the model. They are never advertised in the tool definition, so the LLM can neither see nor set them, and they take precedence over a query_parameters value of the same name. Values support mustache templating, so they can hold dynamic variables ({{telnyx_end_user_target}}) and integration secrets ({{#integration_secret}}my-secret{{/integration_secret}}). Unlike values templated directly into the url, these are percent-encoded, so a value such as +15551234567 survives the round trip.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


137
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 137

optional :preset_query_params, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#query_parametersTelnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters?

The query parameters the webhook tool accepts, described as a JSON Schema object. These parameters will be passed to the webhook as the query of the request. See the JSON Schema reference for documentation about the format



147
148
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 147

optional :query_parameters,
-> { Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::QueryParameters }

#store_fields_as_variablesArray<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable>?

A list of mappings that extract values from the webhook response and store them as dynamic variables. Each mapping specifies a dynamic variable name and a dot-notation path to the value in the response body.



156
157
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 156

optional :store_fields_as_variables,
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook::StoreFieldsAsVariable] }

#timeout_msInteger?

The maximum number of milliseconds to wait for the webhook to respond. Only applicable when async is false.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


164
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 164

optional :timeout_ms, Integer

#urlString

The URL of the external tool to be called. This URL is going to be used by the assistant. The URL can be templated like: https://example.com/api/v1/{id}, where {id} is a placeholder for a value that will be provided by the assistant if path_parameters are provided with the id attribute.

Parameters:

  • value (String)

Returns:

  • (String)


52
# File 'lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb', line 52

required :url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


141
# File 'sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs', line 141

def to_hash: -> {