Class: GenAI::Chunk
- Inherits:
-
Object
- Object
- GenAI::Chunk
- Defined in:
- lib/gen_ai/core/chunk.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(provider:, model:, index:, raw:, value:) ⇒ Chunk
constructor
A new instance of Chunk.
Constructor Details
#initialize(provider:, model:, index:, raw:, value:) ⇒ Chunk
Returns a new instance of Chunk.
7 8 9 10 11 12 13 |
# File 'lib/gen_ai/core/chunk.rb', line 7 def initialize(provider:, model:, index:, raw:, value:) @raw = raw @index = index @provider = provider @model = model @value = value end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
5 6 7 |
# File 'lib/gen_ai/core/chunk.rb', line 5 def index @index end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
5 6 7 |
# File 'lib/gen_ai/core/chunk.rb', line 5 def model @model end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
5 6 7 |
# File 'lib/gen_ai/core/chunk.rb', line 5 def provider @provider end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
5 6 7 |
# File 'lib/gen_ai/core/chunk.rb', line 5 def raw @raw end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/gen_ai/core/chunk.rb', line 5 def value @value end |