Module: Legion::Extensions::Llamacpp::Runners::Slots

Extended by:
Helpers::Client
Includes:
Helpers::Lex
Included in:
Client
Defined in:
lib/legion/extensions/llamacpp/runners/slots.rb

Constant Summary

Constants included from Helpers::Client

Helpers::Client::DEFAULT_HOST

Instance Method Summary collapse

Methods included from Helpers::Client

client, streaming_client

Instance Method Details

#erase_slot(id:) ⇒ Object



18
19
20
21
# File 'lib/legion/extensions/llamacpp/runners/slots.rb', line 18

def erase_slot(id:, **)
  response = Helpers::Errors.with_retry { client(**).post("/slots/#{id}?action=erase") }
  { result: response.body, status: response.status }
end

#list_slotsObject



13
14
15
16
# File 'lib/legion/extensions/llamacpp/runners/slots.rb', line 13

def list_slots(**)
  response = Helpers::Errors.with_retry { client(**).get('/slots') }
  { result: response.body, status: response.status }
end