active_genie 0.26.0 → 0.26.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -9
- data/VERSION +1 -1
- data/lib/active_genie/battle/generalist.rb +8 -8
- data/lib/active_genie/clients/providers/anthropic_client.rb +2 -2
- data/lib/active_genie/clients/providers/base_client.rb +2 -2
- data/lib/active_genie/clients/providers/deepseek_client.rb +2 -2
- data/lib/active_genie/clients/providers/google_client.rb +3 -10
- data/lib/active_genie/clients/providers/openai_client.rb +2 -2
- data/lib/active_genie/config/README.md +235 -0
- data/lib/active_genie/config/log_config.rb +12 -15
- data/lib/active_genie/config/providers/anthropic_config.rb +2 -2
- data/lib/active_genie/config/providers/deepseek_config.rb +2 -2
- data/lib/active_genie/config/providers/google_config.rb +2 -2
- data/lib/active_genie/config/providers/openai_config.rb +2 -2
- data/lib/active_genie/config/providers/provider_base.rb +4 -4
- data/lib/active_genie/configuration.rb +16 -4
- data/lib/active_genie/data_extractor/generalist.rb +1 -1
- data/lib/active_genie/logger.rb +40 -22
- data/lib/active_genie/ranking/elo_round.rb +38 -38
- data/lib/active_genie/ranking/free_for_all.rb +29 -28
- data/lib/active_genie/ranking/player.rb +6 -18
- data/lib/active_genie/ranking/players_collection.rb +6 -2
- data/lib/active_genie/ranking/ranking.rb +32 -25
- data/lib/active_genie/ranking/ranking_scoring.rb +12 -17
- data/lib/active_genie/scoring/generalist.rb +8 -8
- data/lib/tasks/templates/active_genie.rb +1 -1
- metadata +3 -3
- data/lib/active_genie/ranking/concerns/loggable.rb +0 -29
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ActiveGenie
|
4
|
-
module Concerns
|
5
|
-
module Loggable
|
6
|
-
def self.included(base)
|
7
|
-
base.extend(ClassMethods)
|
8
|
-
end
|
9
|
-
|
10
|
-
module ClassMethods
|
11
|
-
def call_with_log_context(context_method)
|
12
|
-
original_method = instance_method(:call)
|
13
|
-
|
14
|
-
define_method(:call) do |*args, **kwargs, &block|
|
15
|
-
context = send(context_method, *args, **kwargs)
|
16
|
-
|
17
|
-
ActiveGenie::Logger.with_context(context) do
|
18
|
-
original_method.bind(self).call(*args, **kwargs, &block)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def logger(...)
|
24
|
-
ActiveGenie::Logger.call(...)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|