Method: Vellum::NormalizedLogProbs#to_json

Defined in:
lib/vellum_ai/types/normalized_log_probs.rb

#to_json(*_args) ⇒ JSON

Serialize an instance of NormalizedLogProbs to a JSON object

Returns:

  • (JSON)


41
42
43
# File 'lib/vellum_ai/types/normalized_log_probs.rb', line 41

def to_json(*_args)
  { "tokens": @tokens, "likelihood": @likelihood }.to_json
end