import * as z from "zod"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** * Usage statistics. * * @remarks * * For streaming responses, `usage` field is included in the very last response chunk returned. * * Note that returning `usage` for streaming requests is an OpenAI API extension. If you use OpenAI SDK, you might access the field directly even if it's not present in the type signature in the SDK. */ export type UsageInfo = { /** * The number of tokens in the prompt. */ promptTokens: number; /** * The number of tokens in the generated completion. */ completionTokens?: number | undefined; /** * The total number of tokens used in the request (prompt + completion). */ totalTokens: number; }; /** @internal */ export declare const UsageInfo$inboundSchema: z.ZodType; /** @internal */ export type UsageInfo$Outbound = { prompt_tokens: number; completion_tokens?: number | undefined; total_tokens: number; }; /** @internal */ export declare const UsageInfo$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace UsageInfo$ { /** @deprecated use `UsageInfo$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `UsageInfo$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `UsageInfo$Outbound` instead. */ type Outbound = UsageInfo$Outbound; } export declare function usageInfoToJSON(usageInfo: UsageInfo): string; export declare function usageInfoFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=usageinfo.d.ts.map