Class: Cadenya::Models::AIProviderKeySpec
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Cadenya::Models::AIProviderKeySpec
- Defined in:
- lib/cadenya/models/ai_provider_key_spec.rb,
sig/cadenya/models/ai_provider_key_spec.rbs
Defined Under Namespace
Modules: Provider Classes: Config, Credentials
Instance Attribute Summary collapse
-
#config ⇒ Cadenya::Models::AIProviderKeySpec::Config?
AIProviderConfig holds non-secret, provider-specific settings.
-
#credentials ⇒ Cadenya::Models::AIProviderKeySpec::Credentials?
AIProviderCredential is the secret material used to authenticate with a provider.
-
#provider ⇒ Symbol, ...
The AI provider this key authenticates against.
Instance Method Summary collapse
-
#initialize(headers: nil) ⇒ Object
constructor
CredentialHeaders carries arbitrary HTTP headers sent with every request to the provider (e.g. "Bearer ...", "X-Api-Key": "...").
- #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(headers: nil) ⇒ Object
CredentialHeaders carries arbitrary HTTP headers sent with every request to the provider (e.g. "Bearer ...", "X-Api-Key": "...").
|
|
# File 'lib/cadenya/models/ai_provider_key_spec.rb', line 30
|
Instance Attribute Details
#config ⇒ Cadenya::Models::AIProviderKeySpec::Config?
AIProviderConfig holds non-secret, provider-specific settings. The set case must correspond to AIProviderKeySpec.provider. Providers with no settings (Anthropic, Gemini) simply leave this unset. The endpoint of a named provider is fixed and intentionally not overridable here; use the OpenAI-compatible provider to target a custom endpoint.
14 |
# File 'lib/cadenya/models/ai_provider_key_spec.rb', line 14 optional :config, -> { Cadenya::AIProviderKeySpec::Config } |
#credentials ⇒ Cadenya::Models::AIProviderKeySpec::Credentials?
AIProviderCredential is the secret material used to authenticate with a provider. The set case must correspond to AIProviderKeySpec.provider. The server encrypts the serialized message at rest and never returns it on reads.
22 |
# File 'lib/cadenya/models/ai_provider_key_spec.rb', line 22 optional :credentials, -> { Cadenya::AIProviderKeySpec::Credentials } |
#provider ⇒ Symbol, ...
The AI provider this key authenticates against.
28 |
# File 'lib/cadenya/models/ai_provider_key_spec.rb', line 28 optional :provider, enum: -> { Cadenya::AIProviderKeySpec::Provider } |
Instance Method Details
#to_hash ⇒ {
35 |
# File 'sig/cadenya/models/ai_provider_key_spec.rbs', line 35
def to_hash: -> {
|