Class: OpenAI::Resources::Safety::Alerts
- Inherits:
-
Object
- Object
- OpenAI::Resources::Safety::Alerts
- Defined in:
- lib/openai/resources/safety/alerts.rb,
sig/openai/resources/safety/alerts.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Alerts
constructor
private
A new instance of Alerts.
-
#retrieve(id, request_options: {}) ⇒ OpenAI::Models::Safety::SafetyAlert
Get a safety alert belonging to the authenticated API project.
Constructor Details
#initialize(client:) ⇒ Alerts
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 Alerts.
32 33 34 |
# File 'lib/openai/resources/safety/alerts.rb', line 32 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(id, request_options: {}) ⇒ OpenAI::Models::Safety::SafetyAlert
Get a safety alert belonging to the authenticated API project.
19 20 21 22 23 24 25 26 27 |
# File 'lib/openai/resources/safety/alerts.rb', line 19 def retrieve(id, params = {}) @client.request( method: :get, path: ["safety/alerts/%1$s", id], model: OpenAI::Safety::SafetyAlert, security: {bearer_auth: true}, options: params[:request_options] ) end |