Class: AsktiveRecord::Configuration
- Inherits:
-
Object
- Object
- AsktiveRecord::Configuration
- 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
-
#db_schema_path ⇒ Object
Returns the value of attribute db_schema_path.
-
#llm_api_key ⇒ Object
Returns the value of attribute llm_api_key.
-
#llm_model_name ⇒ Object
Returns the value of attribute llm_model_name.
-
#llm_provider ⇒ Object
Returns the value of attribute llm_provider.
-
#skip_dump_schema ⇒ Object
Returns the value of attribute skip_dump_schema.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_path ⇒ Object
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_key ⇒ Object
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_name ⇒ Object
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_provider ⇒ Object
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_schema ⇒ Object
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 |