Class: BxBuilderChain::Configuration
- Inherits:
-
Object
- Object
- BxBuilderChain::Configuration
- Defined in:
- lib/bx_builder_chain/configuration.rb
Instance Attribute Summary collapse
-
#database_host ⇒ Object
Returns the value of attribute database_host.
-
#database_name ⇒ Object
Returns the value of attribute database_name.
-
#database_password ⇒ Object
Returns the value of attribute database_password.
-
#database_port ⇒ Object
Returns the value of attribute database_port.
-
#database_user ⇒ Object
Returns the value of attribute database_user.
-
#default_prompt_template ⇒ Object
Returns the value of attribute default_prompt_template.
-
#openai_api_key ⇒ Object
Returns the value of attribute openai_api_key.
-
#pg_url ⇒ Object
Returns the value of attribute pg_url.
-
#public_namespace ⇒ Object
Returns the value of attribute public_namespace.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/bx_builder_chain/configuration.rb', line 9 def initialize @pg_url = ENV['DB_URL'] || nil @openai_api_key = ENV['OPENAI_API_KEY'] @public_namespace = 'public' @threshold = 0.25 @default_prompt_template = "Context information is below -------------------- %{context} -------------------- Given the context information and not prior knowledge answer the question: %{question}" @database_host = ENV['DB_HOSTNAME'] @database_port = ENV['DB_PORT'] @database_name = ENV['DB_NAME'] @database_user = ENV['DB_USER'] @database_password = ENV['DB_PASSWORD'] end |
Instance Attribute Details
#database_host ⇒ Object
Returns the value of attribute database_host.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def database_host @database_host end |
#database_name ⇒ Object
Returns the value of attribute database_name.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def database_name @database_name end |
#database_password ⇒ Object
Returns the value of attribute database_password.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def database_password @database_password end |
#database_port ⇒ Object
Returns the value of attribute database_port.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def database_port @database_port end |
#database_user ⇒ Object
Returns the value of attribute database_user.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def database_user @database_user end |
#default_prompt_template ⇒ Object
Returns the value of attribute default_prompt_template.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def default_prompt_template @default_prompt_template end |
#openai_api_key ⇒ Object
Returns the value of attribute openai_api_key.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def openai_api_key @openai_api_key end |
#pg_url ⇒ Object
Returns the value of attribute pg_url.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def pg_url @pg_url end |
#public_namespace ⇒ Object
Returns the value of attribute public_namespace.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def public_namespace @public_namespace end |
#threshold ⇒ Object
Returns the value of attribute threshold.
5 6 7 |
# File 'lib/bx_builder_chain/configuration.rb', line 5 def threshold @threshold end |