lib/raix.rb in raix-0.3.2 vs lib/raix.rb in raix-0.4.0
- old
+ new
@@ -14,10 +14,13 @@
attr_accessor :temperature
# The max_tokens option determines the maximum number of tokens to generate.
attr_accessor :max_tokens
+ # The max_completion_tokens option determines the maximum number of tokens to generate.
+ attr_accessor :max_completion_tokens
+
# The model option determines the model to use for text generation. This option
# is normally set in each class that includes the ChatCompletion module.
attr_accessor :model
# The openrouter_client option determines the default client to use for communicatio.
@@ -25,15 +28,17 @@
# The openai_client option determines the OpenAI client to use for communication.
attr_accessor :openai_client
DEFAULT_MAX_TOKENS = 1000
+ DEFAULT_MAX_COMPLETION_TOKENS = 16_384
DEFAULT_MODEL = "meta-llama/llama-3-8b-instruct:free"
DEFAULT_TEMPERATURE = 0.0
# Initializes a new instance of the Configuration class with default values.
def initialize
self.temperature = DEFAULT_TEMPERATURE
+ self.max_completion_tokens = DEFAULT_MAX_COMPLETION_TOKENS
self.max_tokens = DEFAULT_MAX_TOKENS
self.model = DEFAULT_MODEL
end
end