UNPKG

@promptbook/azure-openai

Version:

Promptbook: Run AI apps in plain human language across multiple models and platforms

27 lines (26 loc) 1.06 kB
import type { string_markdown } from '../../types/typeAliases'; import type { UncertainNumber } from '../UncertainNumber'; import type { Usage } from '../Usage'; /** * Minimal usage information required to calculate worktime */ type PartialUsage = Partial<Usage> & { price: UncertainNumber; input: Pick<Usage['input'], 'wordsCount'>; output: Pick<Usage['output'], 'wordsCount' | 'charactersCount'>; }; /** * Function `usageToHuman` will take usage and convert it to human readable report * * @public exported from `@promptbook/core` */ export declare function usageToHuman(usage: PartialUsage): string_markdown; export {}; /** * TODO: [🍓][🧞‍♂️] Use "$1" not "1 USD" * TODO: [🍓][🧞‍♂️] Use markdown formatting like "Cost approximately **$1**" * TODO: [🍓][🧞‍♂️] Report in minutes, seconds, days NOT 0.1 hours * TODO: [🧠] Maybe make from `uncertainNumberToHuman` separate exported utility * TODO: [🧠] Maybe use "~" instead of "approximately" * TODO: [🏛] Maybe make some markdown builder */