Class: Stagehand::Models::ModelConfig
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Stagehand::Models::ModelConfig
- Defined in:
- lib/stagehand/models/model_config.rb
Defined Under Namespace
Modules: Provider
Instance Attribute Summary collapse
-
#api_key ⇒ String?
API key for the model provider.
-
#base_url ⇒ String?
Base URL for the model provider.
-
#headers ⇒ Hash{Symbol=>String}?
Custom headers sent with every request to the model provider.
-
#model_name ⇒ String
Model name string with provider prefix (e.g., ‘openai/gpt-5-nano’).
-
#provider ⇒ Symbol, ...
AI provider for the model (or provide a baseURL endpoint instead).
Instance Method Summary collapse
- #initialize(model_name:, api_key: nil, base_url: nil, headers: nil, provider: nil) ⇒ Object constructor
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(model_name:, api_key: nil, base_url: nil, headers: nil, provider: nil) ⇒ Object
|
|
# File 'lib/stagehand/models/model_config.rb', line 36
|
Instance Attribute Details
#api_key ⇒ String?
API key for the model provider
16 |
# File 'lib/stagehand/models/model_config.rb', line 16 optional :api_key, String, api_name: :apiKey |
#base_url ⇒ String?
Base URL for the model provider
22 |
# File 'lib/stagehand/models/model_config.rb', line 22 optional :base_url, String, api_name: :baseURL |
#headers ⇒ Hash{Symbol=>String}?
Custom headers sent with every request to the model provider
28 |
# File 'lib/stagehand/models/model_config.rb', line 28 optional :headers, Stagehand::Internal::Type::HashOf[String] |
#model_name ⇒ String
Model name string with provider prefix (e.g., ‘openai/gpt-5-nano’)
10 |
# File 'lib/stagehand/models/model_config.rb', line 10 required :model_name, String, api_name: :modelName |
#provider ⇒ Symbol, ...
AI provider for the model (or provide a baseURL endpoint instead)
34 |
# File 'lib/stagehand/models/model_config.rb', line 34 optional :provider, enum: -> { Stagehand::ModelConfig::Provider } |