Class: Deja::Judges::Anthropic

Inherits:
Base
  • Object
show all
Defined in:
lib/deja/judges/anthropic.rb

Overview

Judge backed by the Anthropic Ruby SDK. Use ‘::Anthropic` for the SDK constant — bare `Anthropic` would resolve to this class.

Constant Summary collapse

DEFAULTS =
{
  model: "claude-sonnet-4-5",
  max_tokens: 512,
  system: "You evaluate whether a candidate value meets a set of requirements. " \
    "Use the structured output schema to return your verdict.",
}.freeze

Instance Attribute Summary

Attributes inherited from Base

#client

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Deja::Judges::Base

Class Method Details

.client_descriptionObject



21
22
23
# File 'lib/deja/judges/anthropic.rb', line 21

def self.client_description
  "Anthropic::Client"
end

.handles?(client) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/deja/judges/anthropic.rb', line 17

def self.handles?(client)
  defined?(::Anthropic::Client) && client.is_a?(::Anthropic::Client)
end

Instance Method Details

#defaultsObject



25
26
27
# File 'lib/deja/judges/anthropic.rb', line 25

def defaults
  DEFAULTS
end