Class: DSPy::LM::ChatStrategy

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dspy/lm/chat_strategy.rb

Overview

Simple chat strategy that passes messages through without JSON extraction

Instance Method Summary collapse

Constructor Details

#initialize(adapter) ⇒ ChatStrategy

Returns a new instance of ChatStrategy.



12
13
14
# File 'lib/dspy/lm/chat_strategy.rb', line 12

def initialize(adapter)
  @adapter = adapter
end

Instance Method Details

#extract_json(response) ⇒ Object



24
25
26
# File 'lib/dspy/lm/chat_strategy.rb', line 24

def extract_json(response)
  nil
end

#nameObject



29
30
31
# File 'lib/dspy/lm/chat_strategy.rb', line 29

def name
  'chat'
end

#prepare_request(messages, request_params) ⇒ Object



18
19
20
# File 'lib/dspy/lm/chat_strategy.rb', line 18

def prepare_request(messages, request_params)
  # Pass through unchanged
end