Class: Telnyx::Models::ModelMetadata
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Telnyx::Models::ModelMetadata
- Defined in:
- lib/telnyx/models/model_metadata.rb,
sig/telnyx/models/model_metadata.rbs
Defined Under Namespace
Modules: Tier
Instance Attribute Summary collapse
-
#base_model ⇒ String?
Base model the fine-tuned model was trained from.
-
#context_length ⇒ Integer
Maximum total tokens (prompt + completion) supported by the model in a single request.
-
#created ⇒ Time
Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
-
#description ⇒ String?
Short, human-readable summary of what the model is best suited for.
-
#id ⇒ String
Model identifier.
-
#is_fine_tunable ⇒ Boolean?
Whether the model can be used as a base for a fine-tuning job via
POST /v2/ai/fine_tuning/jobs. -
#is_vision_supported ⇒ Boolean?
Whether the model accepts image inputs in chat completions (multimodal vision support).
-
#languages ⇒ Array<String>
ISO language codes the model supports (e.g.
en,es). -
#license ⇒ String
License the model is distributed under, e.g.
-
#max_completion_tokens ⇒ Integer?
Maximum number of completion (output) tokens the model will generate per request.
-
#object ⇒ String?
Object type.
-
#organization ⇒ String
Organization that originally published the model, matching the prefix of
idfor open-source models. -
#owned_by ⇒ String
Owner of the model.
-
#parameters ⇒ Integer
Total parameter count of the model.
-
#parameters_str ⇒ String?
Human-readable parameter count, e.g.
-
#pricing ⇒ Hash{Symbol=>String}?
Mapping of token kind to price, as strings to preserve precision.
-
#recommended_for_assistants ⇒ Boolean?
Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI Assistant.
-
#regions ⇒ Array<String>?
Public region names where the model is currently deployed (e.g.
us-central-1,eu-central-1). -
#task ⇒ String?
Primary task the model is intended for, e.g.
-
#tier ⇒ Symbol, Telnyx::Models::ModelMetadata::Tier
Billing tier the model belongs to.
Instance Method Summary collapse
-
#initialize(id:, context_length:, created:, languages:, license:, organization:, owned_by:, parameters:, tier:, base_model: nil, description: nil, is_fine_tunable: nil, is_vision_supported: nil, max_completion_tokens: nil, object: nil, parameters_str: nil, pricing: nil, recommended_for_assistants: nil, regions: nil, task: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see ModelMetadata for more details.
- #to_hash ⇒ {
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(id:, context_length:, created:, languages:, license:, organization:, owned_by:, parameters:, tier:, base_model: nil, description: nil, is_fine_tunable: nil, is_vision_supported: nil, max_completion_tokens: nil, object: nil, parameters_str: nil, pricing: nil, recommended_for_assistants: nil, regions: nil, task: nil) ⇒ Object
Some parameter documentations has been truncated, see Telnyx::Models::ModelMetadata for more details.
Metadata for a model available on Telnyx Inference. Returned by
GET /v2/ai/openai/models (and the deprecated GET /v2/ai/models). Open-source
models live under their Hugging Face organization (e.g. moonshotai/Kimi-K2.6,
zai-org/GLM-5.1-FP8, MiniMaxAI/MiniMax-M2.7); fine-tuned models are owned by
the Telnyx organization that trained them.
|
|
# File 'lib/telnyx/models/model_metadata.rb', line 145
|
Instance Attribute Details
#base_model ⇒ String?
Base model the fine-tuned model was trained from. Only set for fine-tuned models.
73 |
# File 'lib/telnyx/models/model_metadata.rb', line 73 optional :base_model, String, nil?: true |
#context_length ⇒ Integer
Maximum total tokens (prompt + completion) supported by the model in a single request.
19 |
# File 'lib/telnyx/models/model_metadata.rb', line 19 required :context_length, Integer |
#created ⇒ Time
Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
25 |
# File 'lib/telnyx/models/model_metadata.rb', line 25 required :created, Time |
#description ⇒ String?
Short, human-readable summary of what the model is best suited for.
79 |
# File 'lib/telnyx/models/model_metadata.rb', line 79 optional :description, String, nil?: true |
#id ⇒ String
Model identifier. For open-source models, follows the
{organization}/{model_name} convention from Hugging Face (e.g.
moonshotai/Kimi-K2.6).
12 |
# File 'lib/telnyx/models/model_metadata.rb', line 12 required :id, String |
#is_fine_tunable ⇒ Boolean?
Whether the model can be used as a base for a fine-tuning job via
POST /v2/ai/fine_tuning/jobs.
86 |
# File 'lib/telnyx/models/model_metadata.rb', line 86 optional :is_fine_tunable, Telnyx::Internal::Type::Boolean |
#is_vision_supported ⇒ Boolean?
Whether the model accepts image inputs in chat completions (multimodal vision support).
93 |
# File 'lib/telnyx/models/model_metadata.rb', line 93 optional :is_vision_supported, Telnyx::Internal::Type::Boolean |
#languages ⇒ Array<String>
ISO language codes the model supports (e.g. en, es).
31 |
# File 'lib/telnyx/models/model_metadata.rb', line 31 required :languages, Telnyx::Internal::Type::ArrayOf[String] |
#license ⇒ String
License the model is distributed under, e.g. Apache 2.0, MIT,
Llama 3 Community License.
38 |
# File 'lib/telnyx/models/model_metadata.rb', line 38 required :license, String |
#max_completion_tokens ⇒ Integer?
Maximum number of completion (output) tokens the model will generate per
request. null if unconstrained beyond context_length.
100 |
# File 'lib/telnyx/models/model_metadata.rb', line 100 optional :max_completion_tokens, Integer, nil?: true |
#object ⇒ String?
Object type. Always model.
106 |
# File 'lib/telnyx/models/model_metadata.rb', line 106 optional :object, String |
#organization ⇒ String
Organization that originally published the model, matching the prefix of id
for open-source models.
45 |
# File 'lib/telnyx/models/model_metadata.rb', line 45 required :organization, String |
#owned_by ⇒ String
Owner of the model. Telnyx for Telnyx-hosted open-source models, the upstream
provider name for proxied models, or the Telnyx organization id for fine-tuned
models.
53 |
# File 'lib/telnyx/models/model_metadata.rb', line 53 required :owned_by, String |
#parameters ⇒ Integer
Total parameter count of the model.
59 |
# File 'lib/telnyx/models/model_metadata.rb', line 59 required :parameters, Integer |
#parameters_str ⇒ String?
Human-readable parameter count, e.g. 1.0T, 753.9B, 8B.
112 |
# File 'lib/telnyx/models/model_metadata.rb', line 112 optional :parameters_str, String, nil?: true |
#pricing ⇒ Hash{Symbol=>String}?
Mapping of token kind to price, as strings to preserve precision. Typical keys
are prompt, cached_prompt, and completion. When pricing is available the
block also includes currency (ISO 4217 code matching the account's configured
billing currency) and unit (the denomination the prices are quoted in,
currently always 1M_tokens for token-priced models).
122 |
# File 'lib/telnyx/models/model_metadata.rb', line 122 optional :pricing, Telnyx::Internal::Type::HashOf[String] |
#recommended_for_assistants ⇒ Boolean?
Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI Assistant.
129 |
# File 'lib/telnyx/models/model_metadata.rb', line 129 optional :recommended_for_assistants, Telnyx::Internal::Type::Boolean |
#regions ⇒ Array<String>?
Public region names where the model is currently deployed (e.g. us-central-1,
eu-central-1).
136 |
# File 'lib/telnyx/models/model_metadata.rb', line 136 optional :regions, Telnyx::Internal::Type::ArrayOf[String] |
#task ⇒ String?
Primary task the model is intended for, e.g. text-generation,
audio-text-to-text, feature-extraction (embeddings).
143 |
# File 'lib/telnyx/models/model_metadata.rb', line 143 optional :task, String |
#tier ⇒ Symbol, Telnyx::Models::ModelMetadata::Tier
Billing tier the model belongs to. Used together with pricing to determine
cost per 1M tokens.
66 |
# File 'lib/telnyx/models/model_metadata.rb', line 66 required :tier, enum: -> { Telnyx::ModelMetadata::Tier } |
Instance Method Details
#to_hash ⇒ {
105 |
# File 'sig/telnyx/models/model_metadata.rbs', line 105
def to_hash: -> {
|