ai-utils.js
Version:
Build AI applications, chatbots, and agents with JavaScript and TypeScript.
9 lines (8 loc) • 338 B
TypeScript
import { SuccessfulModelCall } from "../model-function/SuccessfulModelCall.js";
export interface CostCalculator {
readonly provider: string;
/**
* @return null if the cost is unknown, otherwise the cost in Millicents (0 if free)
*/
calculateCostInMillicents(call: SuccessfulModelCall): PromiseLike<number | null>;
}