Class: Geminai::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/geminai/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Step

Returns a new instance of Step.



5
6
7
8
9
10
11
12
13
# File 'lib/geminai/step.rb', line 5

def initialize(data)
  @raw_step = data
  @id = data[:id]
  @type = data[:type]
  @signature = data[:signature]
  @content = data[:content]
  @arguments = data[:arguments]
  @result = data[:result]
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



3
4
5
# File 'lib/geminai/step.rb', line 3

def arguments
  @arguments
end

#contentObject (readonly)

Returns the value of attribute content.



3
4
5
# File 'lib/geminai/step.rb', line 3

def content
  @content
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/geminai/step.rb', line 3

def id
  @id
end

#raw_stepObject (readonly)

Returns the value of attribute raw_step.



3
4
5
# File 'lib/geminai/step.rb', line 3

def raw_step
  @raw_step
end

#resultObject (readonly)

Returns the value of attribute result.



3
4
5
# File 'lib/geminai/step.rb', line 3

def result
  @result
end

#signatureObject (readonly)

Returns the value of attribute signature.



3
4
5
# File 'lib/geminai/step.rb', line 3

def signature
  @signature
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/geminai/step.rb', line 3

def type
  @type
end

Instance Method Details

#google_search_call?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/geminai/step.rb', line 23

def google_search_call?
  @type == "google_search_call"
end

#google_search_result?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/geminai/step.rb', line 27

def google_search_result?
  @type == "google_search_result"
end

#model_output?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/geminai/step.rb', line 19

def model_output?
  @type == "model_output"
end

#thought?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/geminai/step.rb', line 15

def thought?
  @type == "thought"
end