Class: RubyAiGemContext::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_ai_gem_context/configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Configuration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/ruby_ai_gem_context/configuration.rb', line 14

def initialize
  # Default to Claude Sonnet - good balance of quality and cost
  @model = "claude-sonnet-4-20250514"
  @temperature = 0.3
  @max_tokens = 4000

  # Default file patterns
  @include_patterns = %w[
    **/*.rb
    **/*.rake
    **/*.gemspec
    **/Gemfile
    **/Rakefile
    README*
    CHANGELOG*
    LICENSE*
  ]

  @exclude_patterns = %w[
    vendor/**/*
    node_modules/**/*
    tmp/**/*
    log/**/*
    .git/**/*
    coverage/**/*
    spec/**/*
    test/**/*
  ]

  @config_dir = ".ai_context"
end

Instance Attribute Details

#config_dir ⇒ Object

Config directory for tracking generated files



12
13
14
# File 'lib/ruby_ai_gem_context/configuration.rb', line 12

def config_dir
  @config_dir
end

#exclude_patterns ⇒ Object

File patterns to include/exclude when scanning



9
10
11
# File 'lib/ruby_ai_gem_context/configuration.rb', line 9

def exclude_patterns
  @exclude_patterns
end

#include_patterns ⇒ Object

File patterns to include/exclude when scanning



9
10
11
# File 'lib/ruby_ai_gem_context/configuration.rb', line 9

def include_patterns
  @include_patterns
end

#max_tokens ⇒ Object

RubyLLM model configuration



6
7
8
# File 'lib/ruby_ai_gem_context/configuration.rb', line 6

def max_tokens
  @max_tokens
end

#model ⇒ Object

RubyLLM model configuration



6
7
8
# File 'lib/ruby_ai_gem_context/configuration.rb', line 6

def model
  @model
end

#temperature ⇒ Object

RubyLLM model configuration



6
7
8
# File 'lib/ruby_ai_gem_context/configuration.rb', line 6

def temperature
  @temperature
end

Class Method Details

.supported_models ⇒ Object

Supported models with descriptions for documentation



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/ruby_ai_gem_context/configuration.rb', line 47

def self.supported_models
  {
    # Anthropic Claude models
    "claude-sonnet-4-20250514" => "Claude Sonnet 4 - Recommended balance of quality and cost",
    "claude-opus-4-20250514" => "Claude Opus 4 - Highest quality, higher cost",
    "claude-haiku-4-20250514" => "Claude Haiku 4 - Fast and cheap, lower quality",

    # OpenAI models
    "gpt-4o" => "GPT-4o - OpenAI's flagship model",
    "gpt-4o-mini" => "GPT-4o Mini - Faster and cheaper",
    "gpt-4-turbo" => "GPT-4 Turbo - Previous generation"
  }
end