Class: Rubygpt::Requester::BaseRequester

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygpt/requester.rb

Overview

Base module for all requester modules

Direct Known Subclasses

ChatRequester

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ BaseRequester

Initializes new Rubygpt::Requester object

Parameters:



16
17
18
# File 'lib/rubygpt/requester.rb', line 16

def initialize(client)
  @client = client
end

Instance Attribute Details

#api_endpointObject (readonly)

The API endpoint for the request



11
12
13
# File 'lib/rubygpt/requester.rb', line 11

def api_endpoint
  @api_endpoint
end

#clientObject (readonly)

The client object that will be used to make the request



8
9
10
# File 'lib/rubygpt/requester.rb', line 8

def client
  @client
end

Instance Method Details

#createObject

Performs a POST request to the API endpoint

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/rubygpt/requester.rb', line 21

def create
  raise NotImplementedError
end