Class: AsktiveRecord::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/asktive_record/configuration.rb

Overview

Configuration class for AsktiveRecord This class holds the configuration settings for the LLM provider, API key, model name and database schema path.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
14
15
16
# File 'lib/asktive_record/configuration.rb', line 10

def initialize
  @llm_provider = :openai # Default LLM provider
  @llm_api_key = nil
  @llm_model_name = "gpt-3.5-turbo" # Default model for OpenAI
  @db_schema_path = "db/schema.rb" # Default path for Rails schema file
  @skip_dump_schema = false # Default is to not skip schema dump
end

Instance Attribute Details

#db_schema_pathObject

Returns the value of attribute db_schema_path.



8
9
10
# File 'lib/asktive_record/configuration.rb', line 8

def db_schema_path
  @db_schema_path
end

#llm_api_keyObject

Returns the value of attribute llm_api_key.



8
9
10
# File 'lib/asktive_record/configuration.rb', line 8

def llm_api_key
  @llm_api_key
end

#llm_model_nameObject

Returns the value of attribute llm_model_name.



8
9
10
# File 'lib/asktive_record/configuration.rb', line 8

def llm_model_name
  @llm_model_name
end

#llm_providerObject

Returns the value of attribute llm_provider.



8
9
10
# File 'lib/asktive_record/configuration.rb', line 8

def llm_provider
  @llm_provider
end

#skip_dump_schemaObject

Returns the value of attribute skip_dump_schema.



8
9
10
# File 'lib/asktive_record/configuration.rb', line 8

def skip_dump_schema
  @skip_dump_schema
end