Class: OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageModerationsResult

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/admin/organization/usage_images_response.rb,
sig/openai/models/admin/organization/usage_images_response.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize ⇒ OrganizationUsageModerationsResult

Returns a new instance of OrganizationUsageModerationsResult.

Parameters:

  • input_tokens —

    The aggregated number of input tokens used.

  • num_model_requests —

    The count of requests made to the model.

  • api_key_id —

    When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

  • model —

    When group_by=model, this field provides the model name of the grouped usage result.

  • project_id —

    When group_by=project_id, this field provides the project ID of the grouped usage result.

  • user_id —

    When group_by=user_id, this field provides the user ID of the grouped usage result.

  • input_tokens: (Integer)
  • num_model_requests: (Integer)
  • api_key_id: (String, nil)
  • model: (String, nil)
  • project_id: (String, nil)
  • user_id: (String, nil)
  • object: (:"organization.usage.moderations.result")


510
511
512
513
514
515
516
517
518
# File 'sig/openai/models/admin/organization/usage_images_response.rbs', line 510

def initialize: (
  input_tokens: Integer,
  num_model_requests: Integer,
  ?api_key_id: String?,
  ?model: String?,
  ?project_id: String?,
  ?user_id: String?,
  ?object: :"organization.usage.moderations.result"
) -> void

Instance Attribute Details

#api_key_id ⇒ String?

When group_by=api_key_id, this field provides the API key ID of the grouped usage result.

Returns:

  • (String, nil)


549
# File 'lib/openai/models/admin/organization/usage_images_response.rb', line 549

optional :api_key_id, String, nil?: true

#input_tokens ⇒ Integer

The aggregated number of input tokens used.

Returns:

  • (Integer)


531
# File 'lib/openai/models/admin/organization/usage_images_response.rb', line 531

required :input_tokens, Integer

#model ⇒ String?

When group_by=model, this field provides the model name of the grouped usage result.

Returns:

  • (String, nil)


556
# File 'lib/openai/models/admin/organization/usage_images_response.rb', line 556

optional :model, String, nil?: true

#num_model_requests ⇒ Integer

The count of requests made to the model.

Returns:

  • (Integer)


537
# File 'lib/openai/models/admin/organization/usage_images_response.rb', line 537

required :num_model_requests, Integer

#object ⇒ Symbol, :"organization.usage.moderations.result"

Parameters:

  • value (:"organization.usage.moderations.result")

Returns:

  • (Symbol, :"organization.usage.moderations.result")


542
# File 'lib/openai/models/admin/organization/usage_images_response.rb', line 542

required :object, const: :"organization.usage.moderations.result"

#project_id ⇒ String?

When group_by=project_id, this field provides the project ID of the grouped usage result.

Returns:

  • (String, nil)


563
# File 'lib/openai/models/admin/organization/usage_images_response.rb', line 563

optional :project_id, String, nil?: true

#user_id ⇒ String?

When group_by=user_id, this field provides the user ID of the grouped usage result.

Returns:

  • (String, nil)


570
# File 'lib/openai/models/admin/organization/usage_images_response.rb', line 570

optional :user_id, String, nil?: true

Instance Method Details

#to_hash ⇒ { input_tokens: Integer, num_model_requests: Integer, ?object: :"organization.usage.moderations.result", ?api_key_id: String?, ?model: String?, ?project_id: String?, ?user_id: String? }

Returns:

  • ({ input_tokens: Integer, num_model_requests: Integer, ?object: :"organization.usage.moderations.result", ?api_key_id: String?, ?model: String?, ?project_id: String?, ?user_id: String? })


520
521
522
523
524
525
526
527
528
# File 'sig/openai/models/admin/organization/usage_images_response.rbs', line 520

def to_hash: -> {
  input_tokens: Integer,
  num_model_requests: Integer,
  ?object: :"organization.usage.moderations.result",
  ?api_key_id: String?,
  ?model: String?,
  ?project_id: String?,
  ?user_id: String?
}