class Riffer::Config
Configuration for the Riffer framework.
Provides configuration options for AI providers and other settings.
Riffer.config.openai.api_key = βsk-β¦β
Riffer.config.amazon_bedrock.region = βus-east-1β Riffer.config.amazon_bedrock.api_token = ββ¦β
Riffer.config.anthropic.api_key = βsk-ant-β¦β
Riffer.config.evals.judge_model = βanthropic/claude-sonnet-4-20250514β
Constants
- AmazonBedrock
- Anthropic
- Evals
- OpenAI
Attributes
Amazon Bedrock configuration (Struct with +api_token+ and +region+).
Anthropic configuration (Struct with +api_key+).
OpenAI configuration (Struct with +api_key+).
Global tool runtime configuration (experimental).
Accepts a Riffer::ToolRuntime subclass, a Riffer::ToolRuntime instance, or a Proc. Defaults to +Riffer::ToolRuntime::Inline.new+.
Public Class Methods
Source
# File lib/riffer/config.rb, line 54 def initialize @amazon_bedrock = AmazonBedrock.new @anthropic = Anthropic.new @openai = OpenAI.new @evals = Evals.new @tool_runtime = Riffer::ToolRuntime::Inline.new end
: () -> void
Public Instance Methods
Source
# File lib/riffer/config.rb, line 47 def tool_runtime=(value) valid = (value.is_a?(Class) && value < Riffer::ToolRuntime) || value.is_a?(Riffer::ToolRuntime) || value.is_a?(Proc) raise Riffer::ArgumentError, "tool_runtime must be a Riffer::ToolRuntime subclass, instance, or a Proc" unless valid @tool_runtime = value end
Sets the global tool runtime.
Raises +Riffer::ArgumentError+ if the value is not a valid runtime (ToolRuntime subclass, ToolRuntime instance, or Proc).
: ((singleton(Riffer::ToolRuntime) | Riffer::ToolRuntime | Proc)) -> void