Class: ConsoleAgent::Providers::Base
- Inherits:
-
Object
- Object
- ConsoleAgent::Providers::Base
- Defined in:
- lib/console_agent/providers/base.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #chat(messages, system_prompt: nil) ⇒ Object
- #chat_with_tools(messages, tools:, system_prompt: nil) ⇒ Object
- #format_assistant_message(_result) ⇒ Object
- #format_tool_result(_tool_call_id, _result_string) ⇒ Object
-
#initialize(config = ConsoleAgent.configuration) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config = ConsoleAgent.configuration) ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/console_agent/providers/base.rb', line 9 def initialize(config = ConsoleAgent.configuration) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/console_agent/providers/base.rb', line 7 def config @config end |
Instance Method Details
#chat(messages, system_prompt: nil) ⇒ Object
13 14 15 |
# File 'lib/console_agent/providers/base.rb', line 13 def chat(, system_prompt: nil) raise NotImplementedError, "#{self.class}#chat must be implemented" end |
#chat_with_tools(messages, tools:, system_prompt: nil) ⇒ Object
17 18 19 |
# File 'lib/console_agent/providers/base.rb', line 17 def chat_with_tools(, tools:, system_prompt: nil) raise NotImplementedError, "#{self.class}#chat_with_tools must be implemented" end |
#format_assistant_message(_result) ⇒ Object
21 22 23 |
# File 'lib/console_agent/providers/base.rb', line 21 def (_result) raise NotImplementedError, "#{self.class}#format_assistant_message must be implemented" end |
#format_tool_result(_tool_call_id, _result_string) ⇒ Object
25 26 27 |
# File 'lib/console_agent/providers/base.rb', line 25 def format_tool_result(_tool_call_id, _result_string) raise NotImplementedError, "#{self.class}#format_tool_result must be implemented" end |