Class: OllamaAgent::Providers::Base::Response
- Inherits:
-
Data
- Object
- Data
- OllamaAgent::Providers::Base::Response
- Defined in:
- lib/ollama_agent/providers/base.rb
Overview
Unified response wrapper returned by all providers.
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message
28 29 30 |
# File 'lib/ollama_agent/providers/base.rb', line 28 def @message end |
#model ⇒ Object (readonly)
Returns the value of attribute model
28 29 30 |
# File 'lib/ollama_agent/providers/base.rb', line 28 def model @model end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider
28 29 30 |
# File 'lib/ollama_agent/providers/base.rb', line 28 def provider @provider end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage
28 29 30 |
# File 'lib/ollama_agent/providers/base.rb', line 28 def usage @usage end |
Instance Method Details
#content ⇒ Object
37 38 39 |
# File 'lib/ollama_agent/providers/base.rb', line 37 def content &.fetch(:content, nil) end |
#tool_calls ⇒ Object
33 34 35 |
# File 'lib/ollama_agent/providers/base.rb', line 33 def tool_calls &.fetch(:tool_calls, nil) || [] end |
#total_tokens ⇒ Object
29 30 31 |
# File 'lib/ollama_agent/providers/base.rb', line 29 def total_tokens usage&.fetch(:total_tokens, 0) || 0 end |