Class: Raix::Configuration
- Inherits:
-
Object
- Object
- Raix::Configuration
- Defined in:
- lib/raix.rb
Overview
The Configuration class holds the configuration options for the Raix gem.
Constant Summary collapse
- DEFAULT_MAX_TOKENS =
1000
- DEFAULT_MODEL =
"meta-llama/llama-3-8b-instruct:free"
- DEFAULT_TEMPERATURE =
0.0
Instance Attribute Summary collapse
-
#max_tokens ⇒ Object
The max_tokens option determines the maximum number of tokens to generate.
-
#model ⇒ Object
The model option determines the model to use for text generation.
-
#openai_client ⇒ Object
The openai_client option determines the OpenAI client to use for communication.
-
#openrouter_client ⇒ Object
The openrouter_client option determines the default client to use for communicatio.
-
#temperature ⇒ Object
The temperature option determines the randomness of the generated text.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Initializes a new instance of the Configuration class with default values.
Constructor Details
#initialize ⇒ Configuration
Initializes a new instance of the Configuration class with default values.
34 35 36 37 38 |
# File 'lib/raix.rb', line 34 def initialize self.temperature = DEFAULT_TEMPERATURE self.max_tokens = DEFAULT_MAX_TOKENS self.model = DEFAULT_MODEL end |
Instance Attribute Details
#max_tokens ⇒ Object
The max_tokens option determines the maximum number of tokens to generate.
17 18 19 |
# File 'lib/raix.rb', line 17 def max_tokens @max_tokens end |
#model ⇒ Object
The model option determines the model to use for text generation. This option is normally set in each class that includes the ChatCompletion module.
21 22 23 |
# File 'lib/raix.rb', line 21 def model @model end |
#openai_client ⇒ Object
The openai_client option determines the OpenAI client to use for communication.
27 28 29 |
# File 'lib/raix.rb', line 27 def openai_client @openai_client end |
#openrouter_client ⇒ Object
The openrouter_client option determines the default client to use for communicatio.
24 25 26 |
# File 'lib/raix.rb', line 24 def openrouter_client @openrouter_client end |
#temperature ⇒ Object
The temperature option determines the randomness of the generated text. Higher values result in more random output.
14 15 16 |
# File 'lib/raix.rb', line 14 def temperature @temperature end |