Class: Utcp::Providers::BaseProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/utcp/providers/base_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, provider_type:, auth: nil) ⇒ BaseProvider



7
8
9
10
11
# File 'lib/utcp/providers/base_provider.rb', line 7

def initialize(name:, provider_type:, auth: nil)
  @name = name
  @type = provider_type
  @auth = auth
end

Instance Attribute Details

#authObject (readonly)

Returns the value of attribute auth.



5
6
7
# File 'lib/utcp/providers/base_provider.rb', line 5

def auth
  @auth
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/utcp/providers/base_provider.rb', line 5

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/utcp/providers/base_provider.rb', line 5

def type
  @type
end

Instance Method Details

#call_tool(tool, arguments = {}, &block) ⇒ Object

Execute a tool, possibly streaming chunks via &block

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/utcp/providers/base_provider.rb', line 19

def call_tool(tool, arguments = {}, &block)
  raise NotImplementedError
end

#discover_tools!Object

Returns [Array<Tool>]

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/utcp/providers/base_provider.rb', line 14

def discover_tools!
  raise NotImplementedError
end