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_provider, #generate_text, identifier, #stream_text
Methods included from DependencyHelper
Constructor Details
#initialize(**options) ⇒ Test
Returns a new instance of Test.
9 10 11 12 13 14 |
# File 'lib/riffer/providers/test.rb', line 9 def initialize(**) @responses = [:responses] || [] @current_index = 0 @calls = [] @stubbed_response = nil end |
Instance Attribute Details
#calls ⇒ Object (readonly)
Returns the value of attribute calls.
7 8 9 |
# File 'lib/riffer/providers/test.rb', line 7 def calls @calls end |
Instance Method Details
#stub_response(content, tool_calls: []) ⇒ Object
16 17 18 |
# File 'lib/riffer/providers/test.rb', line 16 def stub_response(content, tool_calls: []) @stubbed_response = {role: "assistant", content: content, tool_calls: tool_calls} end |