Class: Anthropic::Models::ModelListParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::ModelListParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/anthropic/models/model_list_params.rb,
sig/anthropic/models/model_list_params.rbs
Overview
Defined Under Namespace
Modules: Lifecycle
Instance Attribute Summary collapse
-
#after_id ⇒ String?
ID of the object to use as a cursor for pagination.
-
#before_id ⇒ String?
ID of the object to use as a cursor for pagination.
-
#lifecycle ⇒ Array<Symbol, Anthropic::Models::ModelListParams::Lifecycle>?
Filter the list to models in any of the given lifecycle stages (
active,deprecated, orretired). -
#limit ⇒ Integer?
Number of items to return per page.
-
#workspace_id ⇒ String?
Optional header to select the Workspace for this request.
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
-
#initialize ⇒ ModelListParams
constructor
A new instance of ModelListParams.
- #to_hash ⇒ { after_id: String, before_id: String, lifecycle: ::Array[Anthropic::Models::ModelListParams::lifecycle], limit: Integer, workspace_id: String, request_options: Anthropic::RequestOptions }
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 ⇒ ModelListParams
Returns a new instance of ModelListParams.
39 40 41 42 43 44 45 46 |
# File 'sig/anthropic/models/model_list_params.rbs', line 39
def initialize: (
?after_id: String,
?before_id: String,
?lifecycle: ::Array[Anthropic::Models::ModelListParams::lifecycle],
?limit: Integer,
?workspace_id: String,
?request_options: Anthropic::request_opts
) -> void
|
Instance Attribute Details
#after_id ⇒ String?
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
15 |
# File 'lib/anthropic/models/model_list_params.rb', line 15 optional :after_id, String |
#before_id ⇒ String?
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
22 |
# File 'lib/anthropic/models/model_list_params.rb', line 22 optional :before_id, String |
#lifecycle ⇒ Array<Symbol, Anthropic::Models::ModelListParams::Lifecycle>?
Filter the list to models in any of the given lifecycle stages (active,
deprecated, or retired). Up to 3 values. When omitted, the list contains the
active and deprecated models; retired models appear only when retired is
requested explicitly.
31 32 |
# File 'lib/anthropic/models/model_list_params.rb', line 31 optional :lifecycle, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::ModelListParams::Lifecycle] } |
#limit ⇒ Integer?
Number of items to return per page.
Defaults to 20. Ranges from 1 to 1000.
40 |
# File 'lib/anthropic/models/model_list_params.rb', line 40 optional :limit, Integer |
#workspace_id ⇒ String?
Optional header to select the Workspace for this request. The value is a
Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).
Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.
51 |
# File 'lib/anthropic/models/model_list_params.rb', line 51 optional :workspace_id, String |
Instance Method Details
#to_hash ⇒ { after_id: String, before_id: String, lifecycle: ::Array[Anthropic::Models::ModelListParams::lifecycle], limit: Integer, workspace_id: String, request_options: Anthropic::RequestOptions }
48 49 50 51 52 53 54 55 |
# File 'sig/anthropic/models/model_list_params.rbs', line 48
def to_hash: -> {
after_id: String,
before_id: String,
lifecycle: ::Array[Anthropic::Models::ModelListParams::lifecycle],
limit: Integer,
workspace_id: String,
request_options: Anthropic::RequestOptions
}
|