Class: DatadogAPIClient::V2::AiGatewayRateLimitCreateAttributes
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::AiGatewayRateLimitCreateAttributes
- Includes:
- BaseGenericModel
- Defined in:
- lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb
Overview
Attributes used to create an AI Gateway rate limit.
Instance Attribute Summary collapse
-
#additional_properties ⇒ Object
Returns the value of attribute additional_properties.
-
#cost_microcents_per_minute ⇒ Object
readonly
Maximum priced spend per rolling minute, in microcents of 1e-8 USD each.
-
#input_tokens_per_minute ⇒ Object
readonly
Maximum input tokens per rolling minute.
-
#mode ⇒ Object
Action taken when request rate exceeds the limit.
-
#name ⇒ Object
readonly
Rate limit name.
-
#output_tokens_per_minute ⇒ Object
readonly
Maximum output tokens per rolling minute.
-
#requests_per_minute ⇒ Object
readonly
Maximum requests per rolling minute.
-
#selector ⇒ Object
Dimension rules for a template rate limit, which gives each matched user, Team, or value its own allowance with the rule's limits.
-
#tags ⇒ Object
Optional scope tags, such as
provider,model,ml_app, or custom dimensions. -
#team_id ⇒ Object
Optional UUID.
-
#user_id ⇒ Object
Optional UUID.
-
#window_limits ⇒ Object
readonly
Limits over rolling windows longer than a minute, such as $20 of spend per 24 hours.
Method Summary
Methods included from BaseGenericModel
Instance Attribute Details
#additional_properties ⇒ Object
Returns the value of attribute additional_properties.
57 58 59 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 57 def additional_properties @additional_properties end |
#cost_microcents_per_minute ⇒ Object
Maximum priced spend per rolling minute, in microcents of 1e-8 USD each. In ENFORCE mode, the gateway rejects requests to models with no pricing because their cost can't be counted.
25 26 27 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 25 def cost_microcents_per_minute @cost_microcents_per_minute end |
#input_tokens_per_minute ⇒ Object
Maximum input tokens per rolling minute.
28 29 30 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 28 def input_tokens_per_minute @input_tokens_per_minute end |
#mode ⇒ Object
Action taken when request rate exceeds the limit.
31 32 33 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 31 def mode @mode end |
#name ⇒ Object
Rate limit name. Must not be empty.
34 35 36 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 34 def name @name end |
#output_tokens_per_minute ⇒ Object
Maximum output tokens per rolling minute.
37 38 39 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 37 def output_tokens_per_minute @output_tokens_per_minute end |
#requests_per_minute ⇒ Object
Maximum requests per rolling minute. At least one of requests_per_minute, input_tokens_per_minute, output_tokens_per_minute, cost_microcents_per_minute, or a non-empty window_limits is required.
40 41 42 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 40 def requests_per_minute @requests_per_minute end |
#selector ⇒ Object
Dimension rules for a template rate limit, which gives each matched user, Team, or value its own allowance with the rule's limits. Can't be combined with user_id, team_id, or tags, and can't be changed after creation. Omit for a rule with one shared allowance.
43 44 45 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 43 def selector @selector end |
#tags ⇒ Object
Optional scope tags, such as provider, model, ml_app, or custom dimensions. A request matches when it has all of these tags. The reserved metadata keys name, budget_name, and span_filter are rejected.
46 47 48 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 46 def @tags end |
#team_id ⇒ Object
Optional UUID. Count only requests attributed to this Datadog Team.
49 50 51 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 49 def team_id @team_id end |
#user_id ⇒ Object
Optional UUID. Count only this user's requests.
52 53 54 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 52 def user_id @user_id end |
#window_limits ⇒ Object
Limits over rolling windows longer than a minute, such as $20 of spend per 24 hours. This field is available only to organizations with the feature enabled. Other organizations receive a 400 Bad Request response for a non-empty list. Each limit counts the rule's matching traffic, or each counter of a template rate limit, over its window. Set per-minute limits in the *_per_minute fields. A rule can have at most four limits in total, including any per-minute limits that are set. Each metric and window pair can appear only once, and for the same metric, a longer window must have a larger amount. In ENFORCE mode, the gateway rejects a request that exceeds any limit with HTTP 429 and a Retry-After header. If the list includes a cost limit, the gateway also rejects requests to models with no pricing because their cost can't be counted.
55 56 57 |
# File 'lib/datadog_api_client/v2/models/ai_gateway_rate_limit_create_attributes.rb', line 55 def window_limits @window_limits end |