Class: OmniAgent::Providers::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/omni_agent/providers/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, tool_calls: [], raw_response: nil) ⇒ Response

Returns a new instance of Response.



6
7
8
9
10
# File 'lib/omni_agent/providers/response.rb', line 6

def initialize(content:, tool_calls: [], raw_response: nil)
  @content = content
  @tool_calls = tool_calls || []
  @raw_response = raw_response
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



4
5
6
# File 'lib/omni_agent/providers/response.rb', line 4

def content
  @content
end

#raw_responseObject (readonly)

Returns the value of attribute raw_response.



4
5
6
# File 'lib/omni_agent/providers/response.rb', line 4

def raw_response
  @raw_response
end

#tool_callsObject (readonly)

Returns the value of attribute tool_calls.



4
5
6
# File 'lib/omni_agent/providers/response.rb', line 4

def tool_calls
  @tool_calls
end

Instance Method Details

#tool_calls?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/omni_agent/providers/response.rb', line 12

def tool_calls?
  @tool_calls.any?
end