Class: OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/admin/organization/usage_file_search_calls_params.rb,
sig/openai/models/admin/organization/usage_file_search_calls_params.rbs

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::Usage#file_search_calls

Defined Under Namespace

Modules: BucketWidth, GroupBy

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, page: nil, project_ids: nil, user_ids: nil, vector_store_ids: nil, request_options: {}) ⇒ Object

Parameters:

  • start_time —

    Start time (Unix seconds) of the query time range, inclusive.

  • api_key_ids (defaults to: nil) —

    Return only usage for these API keys.

  • bucket_width (defaults to: nil) —

    Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.

  • end_time (defaults to: nil) —

    End time (Unix seconds) of the query time range, exclusive.

  • group_by (defaults to: nil) —

    Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, vector_store_id or any combination of them.

  • limit (defaults to: nil) —

    Specifies the number of buckets to return.

    • bucket_width=1d: default: 7, max: 31
    • bucket_width=1h: default: 24, max: 168
    • bucket_width=1m: default: 60, max: 1440
  • page (defaults to: nil) —

    A cursor for use in pagination. Corresponding to the next_page field from the previous response.

  • project_ids (defaults to: nil) —

    Return only usage for these projects.

  • user_ids (defaults to: nil) —

    Return only usage for these users.

  • vector_store_ids (defaults to: nil) —

    Return only usage for these vector stores.



# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 85

Instance Attribute Details

#api_key_ids ⇒ ::Array[String]?

Return only usage for these API keys.

Returns:

  • (::Array[String], nil)


22
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 22

optional :api_key_ids, OpenAI::Internal::Type::ArrayOf[String]

#bucket_width ⇒ OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::bucket_width?

Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.

Returns:

  • (OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::bucket_width, nil)


29
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 29

optional :bucket_width, enum: -> { OpenAI::Admin::Organization::UsageFileSearchCallsParams::BucketWidth }

#end_time ⇒ Integer?

End time (Unix seconds) of the query time range, exclusive.

Returns:

  • (Integer, nil)


35
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 35

optional :end_time, Integer

#group_by ⇒ ::Array[OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::group_by]?

Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, vector_store_id or any combination of them.

Returns:

  • (::Array[OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::group_by], nil)


43
44
45
46
47
48
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 43

optional(
  :group_by,
  -> {
    OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Admin::Organization::UsageFileSearchCallsParams::GroupBy]
  }
)

#limit ⇒ Integer?

Specifies the number of buckets to return.

  • bucket_width=1d: default: 7, max: 31
  • bucket_width=1h: default: 24, max: 168
  • bucket_width=1m: default: 60, max: 1440

Returns:

  • (Integer, nil)


58
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 58

optional :limit, Integer

#page ⇒ String?

A cursor for use in pagination. Corresponding to the next_page field from the previous response.

Returns:

  • (String, nil)


65
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 65

optional :page, String

#project_ids ⇒ ::Array[String]?

Return only usage for these projects.

Returns:

  • (::Array[String], nil)


71
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 71

optional :project_ids, OpenAI::Internal::Type::ArrayOf[String]

#start_time ⇒ Integer

Start time (Unix seconds) of the query time range, inclusive.

Returns:

  • (Integer)


16
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 16

required :start_time, Integer

#user_ids ⇒ ::Array[String]?

Return only usage for these users.

Returns:

  • (::Array[String], nil)


77
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 77

optional :user_ids, OpenAI::Internal::Type::ArrayOf[String]

#vector_store_ids ⇒ ::Array[String]?

Return only usage for these vector stores.

Returns:

  • (::Array[String], nil)


83
# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 83

optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String]

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/admin/organization/usage_file_search_calls_params.rb', line 135

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


143
# File 'sig/openai/models/admin/organization/usage_file_search_calls_params.rbs', line 143

def to_hash: -> {