Class: CLAI::Commands::Chat
- Inherits:
-
Object
- Object
- CLAI::Commands::Chat
- Defined in:
- lib/clai/commands/chat.rb
Instance Method Summary collapse
- #chat(prompt, persona: 'default') ⇒ Object
-
#initialize(config) ⇒ Chat
constructor
A new instance of Chat.
Constructor Details
#initialize(config) ⇒ Chat
Returns a new instance of Chat.
4 5 6 |
# File 'lib/clai/commands/chat.rb', line 4 def initialize(config) @config = config end |
Instance Method Details
#chat(prompt, persona: 'default') ⇒ Object
8 9 10 11 |
# File 'lib/clai/commands/chat.rb', line 8 def chat(prompt, persona: 'default') system_prompts = @config.personas.fetch(persona, []) HTTPClient.new(@config).chat(prompt, system_prompts: system_prompts) end |