Class: Telnyx::Models::AI::Anthropic::V1MessagesParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Telnyx::Models::AI::Anthropic::V1MessagesParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/telnyx/models/ai/anthropic/v1_messages_params.rb,
sig/telnyx/models/ai/anthropic/v1_messages_params.rbs
Overview
Defined Under Namespace
Modules: System
Instance Attribute Summary collapse
-
#api_key_ref ⇒ String?
If you are using an external inference provider, this field allows you to pass along a reference to your API key.
-
#billing_group_id ⇒ String?
The billing group ID to associate with this request.
-
#fallback_config ⇒ Hash{Symbol=>Object}?
Configuration for model fallback behavior when the primary model is unavailable.
-
#max_retries ⇒ Integer?
Maximum number of retries for the request.
-
#max_tokens ⇒ Integer
The maximum number of tokens to generate in the response.
-
#mcp_servers ⇒ Array<Hash{Symbol=>Object}>?
List of MCP (Model Context Protocol) servers to make available to the model.
-
#messages ⇒ Array<Hash{Symbol=>Object}>
The messages to send to the model, following the Anthropic Messages API format.
-
#metadata ⇒ Hash{Symbol=>Object}?
An object describing metadata about the request.
-
#model ⇒ String
The model to use for generating the response, for example
zai-org/GLM-5.2or another model available from the Telnyx models endpoint. -
#service_tier ⇒ String?
Service tier for the request.
-
#stop_sequences ⇒ Array<String>?
Custom sequences that will cause the model to stop generating.
-
#stream ⇒ Boolean?
Whether to stream the response as Anthropic-format Server-Sent Events.
-
#system_ ⇒ String, ...
System prompt.
-
#temperature ⇒ Float?
Amount of randomness injected into the response.
-
#thinking ⇒ Hash{Symbol=>Object}?
Extended thinking configuration for models that support it.
-
#timeout ⇒ Float?
Request timeout in seconds.
-
#tool_choice ⇒ Hash{Symbol=>Object}?
Controls how the model uses tools, following the Anthropic API format.
-
#tools ⇒ Array<Hash{Symbol=>Object}>?
Definitions of tools that the model may use, following the Anthropic API format.
-
#top_k ⇒ Integer?
Top-k sampling parameter.
-
#top_p ⇒ Float?
Nucleus sampling parameter.
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
-
#initialize(max_tokens:, messages:, model:, api_key_ref: nil, billing_group_id: nil, fallback_config: nil, max_retries: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, timeout: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see V1MessagesParams for more details.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(max_tokens:, messages:, model:, api_key_ref: nil, billing_group_id: nil, fallback_config: nil, max_retries: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, timeout: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see Telnyx::Models::AI::Anthropic::V1MessagesParams for more details.
|
|
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 143
|
Instance Attribute Details
#api_key_ref ⇒ String?
If you are using an external inference provider, this field allows you to pass
along a reference to your API key. After creating an
integration secret
for your API key, pass the secret's identifier in this field.
40 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 40 optional :api_key_ref, String |
#billing_group_id ⇒ String?
The billing group ID to associate with this request.
46 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 46 optional :billing_group_id, String |
#fallback_config ⇒ Hash{Symbol=>Object}?
Configuration for model fallback behavior when the primary model is unavailable.
52 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 52 optional :fallback_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] |
#max_retries ⇒ Integer?
Maximum number of retries for the request.
58 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 58 optional :max_retries, Integer |
#max_tokens ⇒ Integer
The maximum number of tokens to generate in the response.
16 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 16 required :max_tokens, Integer |
#mcp_servers ⇒ Array<Hash{Symbol=>Object}>?
List of MCP (Model Context Protocol) servers to make available to the model.
64 65 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 64 optional :mcp_servers, Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]] |
#messages ⇒ Array<Hash{Symbol=>Object}>
The messages to send to the model, following the Anthropic Messages API format.
23 24 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 23 required :messages, Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]] |
#metadata ⇒ Hash{Symbol=>Object}?
An object describing metadata about the request.
71 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 71 optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] |
#model ⇒ String
The model to use for generating the response, for example zai-org/GLM-5.2 or
another model available from the Telnyx models endpoint.
31 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 31 required :model, String |
#service_tier ⇒ String?
Service tier for the request.
77 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 77 optional :service_tier, String |
#stop_sequences ⇒ Array<String>?
Custom sequences that will cause the model to stop generating.
83 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 83 optional :stop_sequences, Telnyx::Internal::Type::ArrayOf[String] |
#stream ⇒ Boolean?
Whether to stream the response as Anthropic-format Server-Sent Events.
89 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 89 optional :stream, Telnyx::Internal::Type::Boolean |
#system_ ⇒ String, ...
System prompt. Can be a string or an array of content blocks following the Anthropic API format.
96 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 96 optional :system_, union: -> { Telnyx::AI::Anthropic::V1MessagesParams::System }, api_name: :system |
#temperature ⇒ Float?
Amount of randomness injected into the response. Ranges from 0 to 1.
102 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 102 optional :temperature, Float |
#thinking ⇒ Hash{Symbol=>Object}?
Extended thinking configuration for models that support it. Set type to
enabled to turn on extended thinking.
109 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 109 optional :thinking, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] |
#timeout ⇒ Float?
Request timeout in seconds.
115 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 115 optional :timeout, Float |
#tool_choice ⇒ Hash{Symbol=>Object}?
Controls how the model uses tools, following the Anthropic API format.
121 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 121 optional :tool_choice, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] |
#tools ⇒ Array<Hash{Symbol=>Object}>?
Definitions of tools that the model may use, following the Anthropic API format.
127 128 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 127 optional :tools, Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]] |
#top_k ⇒ Integer?
Top-k sampling parameter. Only sample from the top K options for each subsequent token.
135 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 135 optional :top_k, Integer |
#top_p ⇒ Float?
Nucleus sampling parameter. Use temperature or top_p, but not both.
141 |
# File 'lib/telnyx/models/ai/anthropic/v1_messages_params.rb', line 141 optional :top_p, Float |
Instance Method Details
#to_hash ⇒ {
138 |
# File 'sig/telnyx/models/ai/anthropic/v1_messages_params.rbs', line 138
def to_hash: -> {
|