Class: Askcii::Commands::ChatCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Askcii::Commands::ChatCommand
- Defined in:
- lib/askcii/commands/chat_command.rb
Overview
Executes a chat session with the LLM
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
Methods inherited from BaseCommand
Constructor Details
This class inherits a constructor from Askcii::Commands::BaseCommand
Instance Method Details
#execute ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/askcii/commands/chat_command.rb', line 7 def execute validate_config! display_config_info if cli.verbose? # Read from stdin if available stdin_input = read_stdin_input # Execute the chat require_relative '../chat_session' session = ChatSession.new( config: config, private: cli.private?, session_context: session_context, verbose: cli.verbose? ) session.execute_chat(cli.prompt, stdin_input) end |