Class: Help

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

Class Method Summary collapse

Class Method Details

.display_api_keyObject



20
21
22
23
24
25
26
# File 'lib/help.rb', line 20

def self.display_api_key()
  puts "You need to set your API key in the file: ./config/config.yml"
  puts "Create the file if it doesn't exist."
  puts "Add the following line to the file:"
  puts "  OPENAI_API_KEY: <your API key>"
  puts "You can get your API key from: https://openai.com/"
end

.display_helpObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/help.rb', line 4

def self.display_help()
  puts "Usage: aa [options] [input]"
  puts "  -lf, --loadfile <path>: Load file into context"
  puts "  -f, --file: Read from context file"
  puts "  -c, --conversation: Append to conversation (max 10 Questions / Answers pairs saved)"
  puts "  -d, --delete: Delete conversation"
  puts "  -i, --interactive: Interactive mode, always a conversation. Clear context with 'clear' (exit with 'exit' or 'quit')"
  puts "  -w, --whisper <path>: Transcribe audio file"
  puts "  -t, --translate <path>: Translate audio file"
  puts "\n  Options:"
  puts "    --config: Edit config file"
  puts "    -v, --version: Display version"
  puts "    -h, --help: Display this help message"

end

.display_help_conversationObject

This don’t work yet. Need to rework the way we handle args.



34
35
36
# File 'lib/help.rb', line 34

def self.display_help_conversation()
  ## TODO: How to work with conversation
end

.display_help_fileObject

This don’t work yet. Need to rework the way we handle args.



29
30
31
# File 'lib/help.rb', line 29

def self.display_help_file()
  ## TODO: How to work with files
end

.display_usageObject



43
44
45
46
47
# File 'lib/help.rb', line 43

def self.display_usage()
  puts "Usage: ./main.rb [options] [input]"

  puts "There are two types of options, flags and arguments."
end

.display_versionObject



38
39
40
41
# File 'lib/help.rb', line 38

def self.display_version()
  spec = Gem::Specification::load("aa.gemspec")
  puts "Version: #{spec.version}"
end