Class: Telnyx::Models::AI::AssistantCreateParams::ExternalLlm

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/ai/assistant_create_params.rb

Defined Under Namespace

Modules: AuthenticationMethod

Instance Attribute 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(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::AI::AssistantCreateParams::ExternalLlm for more details.

Parameters:

  • base_url (String)

    Base URL for the external LLM endpoint.

  • model (String)

    Model identifier to use with the external LLM endpoint.

  • authentication_method (Symbol, Telnyx::Models::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod) (defaults to: nil)

    Authentication method used when connecting to the external LLM endpoint.

  • certificate_ref (String) (defaults to: nil)

    Integration secret identifier for the client certificate used with certificate a

  • forward_metadata (Boolean) (defaults to: nil)

    When ‘true`, Telnyx forwards the assistant’s dynamic variables to the external L

  • llm_api_key_ref (String) (defaults to: nil)

    Integration secret identifier for the external LLM API key.

  • token_retrieval_url (String) (defaults to: nil)

    URL used to retrieve an access token when certificate authentication is enabled.



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 266

class ExternalLlm < Telnyx::Internal::Type::BaseModel
  # @!attribute base_url
  #   Base URL for the external LLM endpoint.
  #
  #   @return [String]
  required :base_url, String

  # @!attribute model
  #   Model identifier to use with the external LLM endpoint.
  #
  #   @return [String]
  required :model, String

  # @!attribute authentication_method
  #   Authentication method used when connecting to the external LLM endpoint.
  #
  #   @return [Symbol, Telnyx::Models::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod, nil]
  optional :authentication_method,
           enum: -> { Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod }

  # @!attribute certificate_ref
  #   Integration secret identifier for the client certificate used with certificate
  #   authentication.
  #
  #   @return [String, nil]
  optional :certificate_ref, String

  # @!attribute forward_metadata
  #   When `true`, Telnyx forwards the assistant's dynamic variables to the external
  #   LLM endpoint as a top-level `extra_metadata` object on the chat completion
  #   request body. Defaults to `false`. Example payload sent to the external
  #   endpoint:
  #   `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
  #   Distinct from OpenAI's native `metadata` field, which has its own size and type
  #   limits.
  #
  #   @return [Boolean, nil]
  optional :forward_metadata, Telnyx::Internal::Type::Boolean

  # @!attribute llm_api_key_ref
  #   Integration secret identifier for the external LLM API key.
  #
  #   @return [String, nil]
  optional :llm_api_key_ref, String

  # @!attribute token_retrieval_url
  #   URL used to retrieve an access token when certificate authentication is enabled.
  #
  #   @return [String, nil]
  optional :token_retrieval_url, String

  # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::AI::AssistantCreateParams::ExternalLlm} for more details.
  #
  #   @param base_url [String] Base URL for the external LLM endpoint.
  #
  #   @param model [String] Model identifier to use with the external LLM endpoint.
  #
  #   @param authentication_method [Symbol, Telnyx::Models::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
  #
  #   @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
  #
  #   @param forward_metadata [Boolean] When `true`, Telnyx forwards the assistant's dynamic variables to the external L
  #
  #   @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
  #
  #   @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.

  # Authentication method used when connecting to the external LLM endpoint.
  #
  # @see Telnyx::Models::AI::AssistantCreateParams::ExternalLlm#authentication_method
  module AuthenticationMethod
    extend Telnyx::Internal::Type::Enum

    TOKEN = :token
    CERTIFICATE = :certificate

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#authentication_methodSymbol, ...

Authentication method used when connecting to the external LLM endpoint.



283
284
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 283

optional :authentication_method,
enum: -> { Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod }

#base_urlString

Base URL for the external LLM endpoint.

Returns:

  • (String)


271
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 271

required :base_url, String

#certificate_refString?

Integration secret identifier for the client certificate used with certificate authentication.

Returns:

  • (String, nil)


291
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 291

optional :certificate_ref, String

#forward_metadataBoolean?

When ‘true`, Telnyx forwards the assistant’s dynamic variables to the external LLM endpoint as a top-level ‘extra_metadata` object on the chat completion request body. Defaults to `false`. Example payload sent to the external endpoint: `{“customer_name”: “Jane”, “account_id”: “acct_789”, “telnyx_agent_target”: “+13125550100”, “telnyx_end_user_target”: “+13125550123”}`. Distinct from OpenAI’s native ‘metadata` field, which has its own size and type limits.

Returns:

  • (Boolean, nil)


303
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 303

optional :forward_metadata, Telnyx::Internal::Type::Boolean

#llm_api_key_refString?

Integration secret identifier for the external LLM API key.

Returns:

  • (String, nil)


309
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 309

optional :llm_api_key_ref, String

#modelString

Model identifier to use with the external LLM endpoint.

Returns:

  • (String)


277
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 277

required :model, String

#token_retrieval_urlString?

URL used to retrieve an access token when certificate authentication is enabled.

Returns:

  • (String, nil)


315
# File 'lib/telnyx/models/ai/assistant_create_params.rb', line 315

optional :token_retrieval_url, String