Class: GChatSH::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/gchatsh.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApplication

Returns a new instance of Application.



12
13
14
15
# File 'lib/gchatsh.rb', line 12

def initialize
  @options = Options.new
  @options.credentials = Credentials.new
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



11
12
13
# File 'lib/gchatsh.rb', line 11

def options
  @options
end

Instance Method Details

#callObject



17
18
19
20
21
22
23
# File 'lib/gchatsh.rb', line 17

def call
  system_prompt = File.read(File.join(__dir__, 'system_prompt.txt'))
  user_prompt = UserInput.new.call
  options.user_prompt = user_prompt
  options.system_prompt = system_prompt
  GroqApi.new(options).call
end