Class: RubyBots::OpenAIChatTool
- Inherits:
-
OpenAITool
- Object
- Tool
- OpenAITool
- RubyBots::OpenAIChatTool
- Includes:
- Chattable
- Defined in:
- lib/ruby_bots/tools/openai_chat_tool.rb
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_DESCRIPTION =
'This tool will use OpenAI to set up a chat interface with the user. It will chat responses to the user to clarify their request.'.freeze
Instance Attribute Summary
Attributes inherited from Tool
Instance Method Summary collapse
-
#initialize(name: 'OpenAI chat tool', description: DEFAULT_DESCRIPTION) ⇒ OpenAIChatTool
constructor
A new instance of OpenAIChatTool.
- #system_instructions ⇒ Object
Methods included from Chattable
Methods inherited from OpenAITool
Methods inherited from Tool
#response, validate_input, validate_output
Constructor Details
#initialize(name: 'OpenAI chat tool', description: DEFAULT_DESCRIPTION) ⇒ OpenAIChatTool
Returns a new instance of OpenAIChatTool.
7 8 9 |
# File 'lib/ruby_bots/tools/openai_chat_tool.rb', line 7 def initialize(name: 'OpenAI chat tool', description: DEFAULT_DESCRIPTION) super(name:, description:) end |
Instance Method Details
#system_instructions ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ruby_bots/tools/openai_chat_tool.rb', line 11 def system_instructions <<~PROMPT You are a helpful assistant that is chatting with a user. You can ask the user to provide more information if it helps you determine the correct response. PROMPT end |