Class: Nanobot::Config::ProviderConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/nanobot/config/schema.rb

Overview

Credentials and endpoint for a single LLM provider

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, api_base: nil, extra_headers: nil) ⇒ ProviderConfig

Returns a new instance of ProviderConfig.

Parameters:

  • api_key (String, nil) (defaults to: nil) —

    API authentication key

  • api_base (String, nil) (defaults to: nil) —

    custom API base URL

  • extra_headers (Hash, nil) (defaults to: nil) —

    additional HTTP headers sent with requests



12
13
14
# File 'lib/nanobot/config/schema.rb', line 12

def initialize(api_key: nil, api_base: nil, extra_headers: nil)
  super
end

Instance Attribute Details

#api_base ⇒ Object

Returns the value of attribute api_base

Returns:

  • (Object) —

    the current value of api_base



8
9
10
# File 'lib/nanobot/config/schema.rb', line 8

def api_base
  @api_base
end

#api_key ⇒ Object

Returns the value of attribute api_key

Returns:

  • (Object) —

    the current value of api_key



8
9
10
# File 'lib/nanobot/config/schema.rb', line 8

def api_key
  @api_key
end

#extra_headers ⇒ Object

Returns the value of attribute extra_headers

Returns:

  • (Object) —

    the current value of extra_headers



8
9
10
# File 'lib/nanobot/config/schema.rb', line 8

def extra_headers
  @extra_headers
end