@conciergus/chat - v0.3.1
Preparing search index...
components
useCostAwareModel
Function useCostAwareModel
useCostAwareModel
()
:
{
selectCostOptimalModel
:
(
requirements
:
{
capabilities
?:
any
[]
;
maxTokens
?:
number
;
budgetConstraint
?:
"low"
|
"medium"
|
"high"
;
}
,
)
=>
{
modelId
:
string
;
estimatedCost
:
number
;
costSavings
:
number
}
;
getCostProjection
:
(
modelId
:
string
,
estimatedTokens
:
number
,
)
=>
{
cost
:
number
;
tier
:
"low"
|
"medium"
|
"high"
}
;
}
Hook for cost-aware model switching
Returns
{
selectCostOptimalModel
:
(
requirements
:
{
capabilities
?:
any
[]
;
maxTokens
?:
number
;
budgetConstraint
?:
"low"
|
"medium"
|
"high"
;
}
,
)
=>
{
modelId
:
string
;
estimatedCost
:
number
;
costSavings
:
number
}
;
getCostProjection
:
(
modelId
:
string
,
estimatedTokens
:
number
,
)
=>
{
cost
:
number
;
tier
:
"low"
|
"medium"
|
"high"
}
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
@conciergus/chat - v0.3.1
Loading...
Hook for cost-aware model switching