Reference documentation and code samples for the Google Cloud Gke Recommender V1 Client class Cost.
Cost for running a model deployment on a given instance type. Currently, only USD currency code is supported.
Generated from protobuf message google.cloud.gkerecommender.v1.Cost
Namespace
Google \ Cloud \ GkeRecommender \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ cost_per_million_output_tokens
Amount
Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
↳ cost_per_million_input_tokens
Amount
Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
↳ pricing_model
string
Optional. The pricing model used to calculate the cost. Can be one of: 3-years-cud
, 1-year-cud
, on-demand
, spot
. If not provided, spot
will be used.
↳ output_input_cost_ratio
float
Optional. The output-to-input cost ratio. This determines how the total GPU cost is split between input and output tokens. If not provided, 4.0
is used, assuming a 4:1 output:input cost ratio.
getCostPerMillionOutputTokens
Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
hasCostPerMillionOutputTokens
clearCostPerMillionOutputTokens
setCostPerMillionOutputTokens
Optional. The cost per million output tokens, calculated as: $/output token = GPU $/s / (1/output-to-input-cost-ratio * input tokens/s + output tokens/s)
$this
getCostPerMillionInputTokens
Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
hasCostPerMillionInputTokens
clearCostPerMillionInputTokens
setCostPerMillionInputTokens
Optional. The cost per million input tokens. $/input token = ($/output token) / output-to-input-cost-ratio.
$this
getPricingModel
Optional. The pricing model used to calculate the cost. Can be one of: 3-years-cud
, 1-year-cud
, on-demand
, spot
. If not provided, spot
will be used.
string
setPricingModel
Optional. The pricing model used to calculate the cost. Can be one of: 3-years-cud
, 1-year-cud
, on-demand
, spot
. If not provided, spot
will be used.
var
string
$this
getOutputInputCostRatio
Optional. The output-to-input cost ratio. This determines how the total GPU
cost is split between input and output tokens. If not provided, 4.0
is
used, assuming a 4:1 output:input cost ratio.
float
hasOutputInputCostRatio
clearOutputInputCostRatio
setOutputInputCostRatio
Optional. The output-to-input cost ratio. This determines how the total GPU
cost is split between input and output tokens. If not provided, 4.0
is
used, assuming a 4:1 output:input cost ratio.
var
float
$this

