8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/ragdoll/cli/commands/status.rb', line 8
def call(id, options)
client = StandaloneClient.new
puts "Checking status for document ID: #{id}"
puts "Options: #{options.to_h}" unless options.to_h.empty?
puts
status = client.document_status(id: id)
if status.nil? || status.empty?
puts 'Document not found or no status available.'
return
end
case options[:format]
when 'json'
puts JSON.pretty_generate(status)
else
puts "Document ID: #{id}"
puts "Status: #{status[:status] || 'N/A'}"
puts "Embeddings Count: #{status[:embeddings_count] || 'N/A'}"
puts "Embeddings Ready: #{status[:embeddings_ready] || 'N/A'}"
puts "Message: #{status[:message] || 'No message available'}"
end
end
|