Class: Tama::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/tama/client.rb

Constant Summary collapse

DEFAULT_TIMEOUT =
300
DEFAULT_RETRIES =
2

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_url:, headers: {}, timeout: DEFAULT_TIMEOUT, retries: DEFAULT_RETRIES, connection: nil) ⇒ Client

Returns a new instance of Client.



10
11
12
13
14
15
16
17
18
# File 'lib/tama/client.rb', line 10

def initialize(base_url:, headers: {}, timeout: DEFAULT_TIMEOUT, retries: DEFAULT_RETRIES, connection: nil)
  http = HTTP.new(base_url:, headers:, timeout:, retries:, connection:)
  @connection = http.connection
  @neural = Neural::Service.new(http)
  @memory = Memory::Service.new(http)
  @perception = Perception::Service.new(http)
  @agentic = Agentic::Service.new(http)
  freeze
end

Instance Attribute Details

#agenticObject (readonly)

Returns the value of attribute agentic.



8
9
10
# File 'lib/tama/client.rb', line 8

def agentic
  @agentic
end

#connectionObject (readonly)

Returns the value of attribute connection.



8
9
10
# File 'lib/tama/client.rb', line 8

def connection
  @connection
end

#memoryObject (readonly)

Returns the value of attribute memory.



8
9
10
# File 'lib/tama/client.rb', line 8

def memory
  @memory
end

#neuralObject (readonly)

Returns the value of attribute neural.



8
9
10
# File 'lib/tama/client.rb', line 8

def neural
  @neural
end

#perceptionObject (readonly)

Returns the value of attribute perception.



8
9
10
# File 'lib/tama/client.rb', line 8

def perception
  @perception
end