Class: RubyBots::OpenAIStreamingTool

Inherits:
OpenAIChatTool show all
Defined in:
lib/ruby_bots/tools/openai_streaming_tool.rb

Constant Summary

Constants inherited from OpenAIChatTool

RubyBots::OpenAIChatTool::DEFAULT_DESCRIPTION

Constants inherited from OpenAITool

RubyBots::OpenAITool::DEFAULT_DESCRIPTION

Instance Attribute Summary

Attributes inherited from Tool

#description, #errors, #name

Instance Method Summary collapse

Methods inherited from OpenAIChatTool

#system_instructions

Methods inherited from OpenAITool

#client, #default_params, #system_instructions

Methods inherited from Tool

validate_input, validate_output

Constructor Details

#initialize(name: 'OpenAI Streaming Tool', description: DEFAULT_DESCRIPTION, messages: nil) ⇒ OpenAIStreamingTool

Returns a new instance of OpenAIStreamingTool.



3
4
5
6
# File 'lib/ruby_bots/tools/openai_streaming_tool.rb', line 3

def initialize(name: 'OpenAI Streaming Tool', description: DEFAULT_DESCRIPTION, messages: nil)
  @messages = messages || []
  super(name:, description:)
end

Instance Method Details

#responseObject



8
9
10
# File 'lib/ruby_bots/tools/openai_streaming_tool.rb', line 8

def response
  super('')
end