Class: PlaypathRails::Configuration
- Inherits:
-
Object
- Object
- PlaypathRails::Configuration
- Defined in:
- lib/playpath_rails.rb
Overview
Configuration object for PlaypathRails
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Regular API key for PlayPath.io (full access).
-
#base_url ⇒ Object
Base URL for API requests (defaults to Playpath.io service).
-
#embeddings_api_key ⇒ Object
Embeddings API key for PlayPath.io (limited to RAG endpoints).
Instance Method Summary collapse
-
#api_key_for(endpoint_type = :items) ⇒ Object
Get the appropriate API key for the request type.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
50 51 52 53 54 |
# File 'lib/playpath_rails.rb', line 50 def initialize @api_key = nil @embeddings_api_key = nil @base_url = 'https://playpath.io' end |
Instance Attribute Details
#api_key ⇒ Object
Regular API key for PlayPath.io (full access)
44 45 46 |
# File 'lib/playpath_rails.rb', line 44 def api_key @api_key end |
#base_url ⇒ Object
Base URL for API requests (defaults to Playpath.io service)
48 49 50 |
# File 'lib/playpath_rails.rb', line 48 def base_url @base_url end |
#embeddings_api_key ⇒ Object
Embeddings API key for PlayPath.io (limited to RAG endpoints)
46 47 48 |
# File 'lib/playpath_rails.rb', line 46 def @embeddings_api_key end |
Instance Method Details
#api_key_for(endpoint_type = :items) ⇒ Object
Get the appropriate API key for the request type
57 58 59 60 61 62 63 64 |
# File 'lib/playpath_rails.rb', line 57 def api_key_for(endpoint_type = :items) case endpoint_type when :rag @embeddings_api_key || @api_key else @api_key end end |