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)

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_urlURI::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)


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

def base_url
  @base_url
end

#headersHash{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})


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

def headers
  @headers
end

#idempotency_headerString? (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)


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

def idempotency_header
  @idempotency_header
end

#initial_retry_delayFloat (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)


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

def initial_retry_delay
  @initial_retry_delay
end

#log_levelSymbol (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)


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

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)


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

def logger
  @logger
end

#max_retriesInteger (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)


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

def max_retries
  @max_retries
end

#max_retry_delayFloat (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)


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

def max_retry_delay
  @max_retry_delay
end

#on_retryProc? (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)


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

def on_retry
  @on_retry
end

#requesterOpenAI::_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:



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

def requester
  @requester
end

#timeoutFloat? (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)


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

def timeout
  @timeout
end