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)


204
205
206
# File 'lib/openai/internal/transport/base_client.rb', line 204

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})


219
220
221
# File 'lib/openai/internal/transport/base_client.rb', line 219

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)


222
223
224
# File 'lib/openai/internal/transport/base_client.rb', line 222

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)


213
214
215
# File 'lib/openai/internal/transport/base_client.rb', line 213

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)


228
229
230
# File 'lib/openai/internal/transport/base_client.rb', line 228

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)


225
226
227
# File 'lib/openai/internal/transport/base_client.rb', line 225

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)


210
211
212
# File 'lib/openai/internal/transport/base_client.rb', line 210

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)


216
217
218
# File 'lib/openai/internal/transport/base_client.rb', line 216

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)


231
232
233
# File 'lib/openai/internal/transport/base_client.rb', line 231

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:



235
236
237
# File 'lib/openai/internal/transport/base_client.rb', line 235

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)


207
208
209
# File 'lib/openai/internal/transport/base_client.rb', line 207

def timeout
  @timeout
end