Class: OpenAI::Resources::Realtime::ClientSecrets

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/resources/realtime/client_secrets.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ClientSecrets

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 a new instance of ClientSecrets.

Parameters:



37
38
39
# File 'lib/openai/resources/realtime/client_secrets.rb', line 37

def initialize(client:)
  @client = client
end

Instance Method Details

#create(expires_after: nil, session: nil, request_options: {}) ⇒ OpenAI::Models::Realtime::ClientSecretCreateResponse

Some parameter documentations has been truncated, see Models::Realtime::ClientSecretCreateParams for more details.

Create a Realtime client secret with an associated session configuration.

Parameters:

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
# File 'lib/openai/resources/realtime/client_secrets.rb', line 23

def create(params = {})
  parsed, options = OpenAI::Realtime::ClientSecretCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "realtime/client_secrets",
    body: parsed,
    model: OpenAI::Models::Realtime::ClientSecretCreateResponse,
    options: options
  )
end