Class: OpenAI::Internal::Transport::BaseClient

Inherits:
Object
  • Object
show all
Extended by:
Util::SorbetRuntimeSupport
Defined in:
sig/openai/internal/transport/base_client.rbs

Direct Known Subclasses

Client

Constant Summary collapse

OpenAI =

Returns:

  • (:request_options opts)
URI =

Returns:

  • (:Generic url,)

Instance Attribute Summary collapse

Method Summary

Methods included from Util::SorbetRuntimeSupport

const_missing, define_sorbet_constant!, sorbet_constant_defined?, to_sorbet_type, to_sorbet_type

Instance Attribute Details

#base_url ⇒ URI::Generic (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (URI::Generic)


248
249
250
# File 'lib/openai/internal/transport/base_client.rb', line 248

def base_url
  @base_url
end

#headers ⇒ Hash{String=>String} (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Hash{String=>String})


263
264
265
# File 'lib/openai/internal/transport/base_client.rb', line 263

def headers
  @headers
end

#idempotency_header ⇒ String? (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String, nil)


266
267
268
# File 'lib/openai/internal/transport/base_client.rb', line 266

def idempotency_header
  @idempotency_header
end

#initial_retry_delay ⇒ Float (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Float)


257
258
259
# File 'lib/openai/internal/transport/base_client.rb', line 257

def initial_retry_delay
  @initial_retry_delay
end

#log_level ⇒ Symbol (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Symbol)


272
273
274
# File 'lib/openai/internal/transport/base_client.rb', line 272

def log_level
  @log_level
end

#logger ⇒ #debug, ... (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (#debug, #info, #warn, #error, nil)


269
270
271
# File 'lib/openai/internal/transport/base_client.rb', line 269

def logger
  @logger
end

#max_retries ⇒ Integer (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Integer)


254
255
256
# File 'lib/openai/internal/transport/base_client.rb', line 254

def max_retries
  @max_retries
end

#max_retry_delay ⇒ Float (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Float)


260
261
262
# File 'lib/openai/internal/transport/base_client.rb', line 260

def max_retry_delay
  @max_retry_delay
end

#on_retry ⇒ Proc? (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Proc, nil)


275
276
277
# File 'lib/openai/internal/transport/base_client.rb', line 275

def on_retry
  @on_retry
end

#requester ⇒ OpenAI::_HTTPClient (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



279
280
281
# File 'lib/openai/internal/transport/base_client.rb', line 279

def requester
  @requester
end

#timeout ⇒ Float? (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Float, nil)


251
252
253
# File 'lib/openai/internal/transport/base_client.rb', line 251

def timeout
  @timeout
end