Class: Riffer::Config
- Inherits:
-
Object
- Object
- Riffer::Config
- 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
-
#amazon_bedrock ⇒ Object
readonly
Amazon Bedrock configuration (Struct with
api_tokenandregion). -
#anthropic ⇒ Object
readonly
Anthropic configuration (Struct with
api_key). -
#azure_openai ⇒ Object
readonly
Azure OpenAI configuration (Struct with
api_keyandendpoint). -
#evals ⇒ Object
readonly
Evals configuration (Struct with
judge_model). -
#gemini ⇒ Object
readonly
Google Gemini configuration (Struct with
api_key,open_timeout, andread_timeout). -
#openai ⇒ Object
readonly
OpenAI configuration (Struct with
api_key). -
#tool_runtime ⇒ Object
Global tool runtime configuration (experimental).
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
– : () -> void.
Constructor Details
#initialize ⇒ Config
– : () -> 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_bedrock ⇒ Object (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 |
#anthropic ⇒ Object (readonly)
Anthropic configuration (Struct with api_key).
29 30 31 |
# File 'lib/riffer/config.rb', line 29 def anthropic @anthropic end |
#azure_openai ⇒ Object (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 |
#evals ⇒ Object (readonly)
Evals configuration (Struct with judge_model).
41 42 43 |
# File 'lib/riffer/config.rb', line 41 def evals @evals end |
#gemini ⇒ Object (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 |
#openai ⇒ Object (readonly)
OpenAI configuration (Struct with api_key).
38 39 40 |
# File 'lib/riffer/config.rb', line 38 def openai @openai end |
#tool_runtime ⇒ Object
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 |