Class: Anthropic::Resources::Beta::Organization::RateLimits
- Inherits:
-
Object
- Object
- Anthropic::Resources::Beta::Organization::RateLimits
- Defined in:
- lib/anthropic/resources/beta/organization/rate_limits.rb,
sig/anthropic/resources/beta/organization/rate_limits.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ RateLimits
constructor
private
A new instance of RateLimits.
-
#list(group_type: nil, limit: nil, model: nil, page: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit>
List Messages API rate limits for your organization.
Constructor Details
#initialize(client:) ⇒ RateLimits
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 RateLimits.
51 52 53 |
# File 'lib/anthropic/resources/beta/organization/rate_limits.rb', line 51 def initialize(client:) @client = client end |
Instance Method Details
#list(group_type: nil, limit: nil, model: nil, page: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::BetaOrganizationRateLimit>
List Messages API rate limits for your organization.
Each entry corresponds to one rate-limit group (either a model family or an API-surface category such as the Files API or Message Batches) and contains the set of limiter values that apply to it.
When limit is omitted, every matching entry is returned in a single page; when
limit truncates the result, follow next_page to fetch the remaining entries.
Some parameter documentations has been truncated, see Models::Beta::Organization::RateLimitListParams for more details.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/anthropic/resources/beta/organization/rate_limits.rb', line 35 def list(params = {}) parsed, = Anthropic::Beta::Organization::RateLimitListParams.dump_request(params) query = Anthropic::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v1/organizations/rate_limits?beta=true", query: query, page: Anthropic::Internal::PageCursor, model: Anthropic::Beta::Organization::BetaOrganizationRateLimit, options: ) end |