Class: ActiveAgent::ActionPrompt::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/active_agent/action_prompt/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Action

Returns a new instance of Action.



6
7
8
9
10
# File 'lib/active_agent/action_prompt/action.rb', line 6

def initialize(attributes = {})
  @id = attributes.fetch(:id, nil)
  @name = attributes.fetch(:name, "")
  @params = attributes.fetch(:params, {})
end

Instance Attribute Details

#agent_nameObject

Returns the value of attribute agent_name.



4
5
6
# File 'lib/active_agent/action_prompt/action.rb', line 4

def agent_name
  @agent_name
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/active_agent/action_prompt/action.rb', line 4

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/active_agent/action_prompt/action.rb', line 4

def name
  @name
end

#paramsObject

Returns the value of attribute params.



4
5
6
# File 'lib/active_agent/action_prompt/action.rb', line 4

def params
  @params
end