import type OpenAI from 'openai'; import type { PartialDeep } from 'type-fest'; import type { UncertainNumber } from '../../execution/UncertainNumber'; import type { Usage } from '../../execution/Usage'; import type { Prompt } from '../../types/Prompt'; /** * Computes the usage of the OpenAI API based on the response from OpenAI * * @param promptContent The content of the prompt * @param resultContent The content of the result (for embedding prompts or failed prompts pass empty string) * @param rawResponse The raw response from OpenAI API * @param duration The duration of the execution * @throws {PipelineExecutionError} If the usage is not defined in the response from OpenAI * * @private internal utility of `OpenAiExecutionTools` */ export declare function computeOpenAiUsage(promptContent: Prompt['content'], // <- Note: Intentionally using [] to access type properties to bring jsdoc from Prompt/PromptResult to consumer resultContent: string, rawResponse: PartialDeep>, duration?: UncertainNumber): Usage;