Class: Riffer::Providers::Test
- Defined in:
- lib/riffer/providers/test.rb
Instance Attribute Summary collapse
-
#calls ⇒ Object
readonly
Returns the value of attribute calls.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Test
constructor
A new instance of Test.
- #stub_response(content, tool_calls: []) ⇒ Object
Methods inherited from Base
find, #generate_text, identifier, #stream_text
Methods included from Messages::Converter
Constructor Details
#initialize(**options) ⇒ Test
Returns a new instance of Test.
8 9 10 11 12 13 |
# File 'lib/riffer/providers/test.rb', line 8 def initialize(**) @responses = [:responses] || [] @current_index = 0 @calls = [] @stubbed_response = nil end |
Instance Attribute Details
#calls ⇒ Object (readonly)
Returns the value of attribute calls.
6 7 8 |
# File 'lib/riffer/providers/test.rb', line 6 def calls @calls end |
Instance Method Details
#stub_response(content, tool_calls: []) ⇒ Object
15 16 17 |
# File 'lib/riffer/providers/test.rb', line 15 def stub_response(content, tool_calls: []) @stubbed_response = {role: "assistant", content: content, tool_calls: tool_calls} end |