dag-orchestrator / Exports / CelCostEstimatorAdapter
Class: CelCostEstimatorAdapter
Adapter that bridges ICostEstimatorPort with dag-cost's CelCostEvaluator.
For each node in the prompt, looks up cost metadata from storage and evaluates the CEL estimate formula with node inputs as context variables.
Implements
Table of contents
Constructors
Methods
Constructors
constructor
• new CelCostEstimatorAdapter(storage): CelCostEstimatorAdapter
Parameters
| Name | Type |
|---|---|
storage | ICostMetaStoragePort |
Returns
Defined in
adapters/cel-cost-estimator-adapter.ts:15
Methods
estimateCost
▸ estimateCost(prompt, _objectInfo): Promise<TResult<IPromptCostEstimate, IDagError>>
Parameters
| Name | Type |
|---|---|
prompt | TPrompt |
_objectInfo | TObjectInfo |
Returns
Promise<TResult<IPromptCostEstimate, IDagError>>
Implementation of
ICostEstimatorPort.estimateCost