Class: GenAI::Chunk

Inherits:
Object
  • Object
show all
Defined in:
lib/gen_ai/core/chunk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#indexObject (readonly)

Returns the value of attribute index.



5
6
7
# File 'lib/gen_ai/core/chunk.rb', line 5

def index
  @index
end

#modelObject (readonly)

Returns the value of attribute model.



5
6
7
# File 'lib/gen_ai/core/chunk.rb', line 5

def model
  @model
end

#providerObject (readonly)

Returns the value of attribute provider.



5
6
7
# File 'lib/gen_ai/core/chunk.rb', line 5

def provider
  @provider
end

#rawObject (readonly)

Returns the value of attribute raw.



5
6
7
# File 'lib/gen_ai/core/chunk.rb', line 5

def raw
  @raw
end

#valueObject (readonly)

Returns the value of attribute value.



5
6
7
# File 'lib/gen_ai/core/chunk.rb', line 5

def value
  @value
end