Class: LLM::Shell::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/llm/shell/default.rb

Instance Method Summary collapse

Constructor Details

#initialize(provider) ⇒ Default

Returns a new instance of Default.



5
6
7
# File 'lib/llm/shell/default.rb', line 5

def initialize(provider)
  @provider = provider
end

Instance Method Details

#promptObject



9
10
11
# File 'lib/llm/shell/default.rb', line 9

def prompt
  File.join(SHAREDIR, "prompts", "default.txt")
end

#roleObject



13
14
15
16
17
18
# File 'lib/llm/shell/default.rb', line 13

def role
  case @provider
  when "openai", "ollama" then :system
  else :user
  end
end