Class: OpenAI::Models::Audio::TranscriptionTextDeltaEvent::Logprob

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/audio/transcription_text_delta_event.rb,
sig/openai/models/audio/transcription_text_delta_event.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(token: nil, bytes: nil, logprob: nil) ⇒ Logprob

Returns a new instance of Logprob.

Parameters:

  • token (defaults to: nil) —

    The token that was used to generate the log probability.

  • bytes (defaults to: nil) —

    The bytes that were used to generate the log probability.

  • logprob (defaults to: nil) —

    The log probability of the token.

  • token: (String) (defaults to: nil)
  • bytes: (::Array[Integer]) (defaults to: nil)
  • logprob: (Float) (defaults to: nil)


57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/openai/models/audio/transcription_text_delta_event.rb', line 57

class Logprob < OpenAI::Internal::Type::BaseModel
  # @!attribute token
  #   The token that was used to generate the log probability.
  #
  #   @return [String, nil]
  optional :token, String

  # @!attribute bytes
  #   The bytes that were used to generate the log probability.
  #
  #   @return [Array<Integer>, nil]
  optional :bytes, OpenAI::Internal::Type::ArrayOf[Integer]

  # @!attribute logprob
  #   The log probability of the token.
  #
  #   @return [Float, nil]
  optional :logprob, Float

  # @!method initialize(token: nil, bytes: nil, logprob: nil)
  #   @param token [String]
  #     The token that was used to generate the log probability.
  #
  #   @param bytes [Array<Integer>]
  #     The bytes that were used to generate the log probability.
  #
  #   @param logprob [Float]
  #     The log probability of the token.
end

Instance Attribute Details

#bytes ⇒ ::Array[Integer]?

The bytes that were used to generate the log probability.

Returns:

  • (::Array[Integer], nil)


68
# File 'lib/openai/models/audio/transcription_text_delta_event.rb', line 68

optional :bytes, OpenAI::Internal::Type::ArrayOf[Integer]

#logprob ⇒ Float?

The log probability of the token.

Returns:

  • (Float, nil)


74
# File 'lib/openai/models/audio/transcription_text_delta_event.rb', line 74

optional :logprob, Float

#token ⇒ String?

The token that was used to generate the log probability.

Returns:

  • (String, nil)


62
# File 'lib/openai/models/audio/transcription_text_delta_event.rb', line 62

optional :token, String

Instance Method Details

#to_hash ⇒ { ?token: String, ?bytes: ::Array[Integer], ?logprob: Float }

Returns:

  • ({ ?token: String, ?bytes: ::Array[Integer], ?logprob: Float })


98
99
100
101
102
# File 'sig/openai/models/audio/transcription_text_delta_event.rbs', line 98

def to_hash: -> {
  ?token: String,
  ?bytes: ::Array[Integer],
  ?logprob: Float
}