Class: OllamaAgent::RuntimeCommandSystem::Dispatch::Handlers::ProviderHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/ollama_agent/runtime_command_system/dispatch/handlers/provider_handler.rb

Instance Method Summary collapse

Instance Method Details

#call(ast:, session:) ⇒ Object

Raises:

  • (NotImplementedError)


8
9
10
11
12
13
14
# File 'lib/ollama_agent/runtime_command_system/dispatch/handlers/provider_handler.rb', line 8

def call(ast:, session:)
  provider = ast.arguments.first&.value.to_s.strip
  hint = provider.empty? ? "<name>" : provider
  raise NotImplementedError,
        "Provider switching requires session restart. " \
        "Use: ollama_agent ask --provider #{hint}"
end