Class: Riffer::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/riffer/config.rb

Overview

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"

Defined Under Namespace

Classes: AmazonBedrock, Anthropic, AzureOpenAI, Evals, Gemini, OpenAI

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

– : () -> void



64
65
66
67
68
69
70
71
72
# File 'lib/riffer/config.rb', line 64

def initialize
  @amazon_bedrock = AmazonBedrock.new
  @anthropic = Anthropic.new
  @azure_openai = AzureOpenAI.new
  @gemini = Gemini.new
  @openai = OpenAI.new
  @evals = Evals.new
  @tool_runtime = Riffer::ToolRuntime::Inline.new
end

Instance Attribute Details

#amazon_bedrockObject (readonly)

Amazon Bedrock configuration (Struct with api_token and region).



26
27
28
# File 'lib/riffer/config.rb', line 26

def amazon_bedrock
  @amazon_bedrock
end

#anthropicObject (readonly)

Anthropic configuration (Struct with api_key).



29
30
31
# File 'lib/riffer/config.rb', line 29

def anthropic
  @anthropic
end

#azure_openaiObject (readonly)

Azure OpenAI configuration (Struct with api_key and endpoint).



32
33
34
# File 'lib/riffer/config.rb', line 32

def azure_openai
  @azure_openai
end

#evalsObject (readonly)

Evals configuration (Struct with judge_model).



41
42
43
# File 'lib/riffer/config.rb', line 41

def evals
  @evals
end

#geminiObject (readonly)

Google Gemini configuration (Struct with api_key, open_timeout, and read_timeout).



35
36
37
# File 'lib/riffer/config.rb', line 35

def gemini
  @gemini
end

#openaiObject (readonly)

OpenAI configuration (Struct with api_key).



38
39
40
# File 'lib/riffer/config.rb', line 38

def openai
  @openai
end

#tool_runtimeObject

Global tool runtime configuration (experimental).

Accepts a Riffer::ToolRuntime subclass, a Riffer::ToolRuntime instance, or a Proc. Defaults to Riffer::ToolRuntime::Inline.new.



47
48
49
# File 'lib/riffer/config.rb', line 47

def tool_runtime
  @tool_runtime
end