Class: DSPy::LM::ChatStrategy
- Inherits:
-
Object
- Object
- DSPy::LM::ChatStrategy
- 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
- #extract_json(response) ⇒ Object
-
#initialize(adapter) ⇒ ChatStrategy
constructor
A new instance of ChatStrategy.
- #name ⇒ Object
- #prepare_request(messages, request_params) ⇒ Object
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 |
#name ⇒ Object
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(, request_params) # Pass through unchanged end |