Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

ChatResult

Generated from the checked-in source. Do not edit this reference by hand.

SDK source. All SDK types.

TypeScript
export type ChatResult = {
model: string;
content: string;
elapsedMs: number;
phase: 'connecting' | 'streaming' | 'complete' | 'failed' | 'cancelled';
promptTokens?: number | null;
completionTokens?: number | null;
totalTokens?: number | null;
attemptId?: string | null;
attemptReference?: string | null;
error?: string | null;
customerChargeNanos?: string | null;
customerChargeCurrency?: string | null;
customerChargeStatus?: 'charged' | 'owner_funded' | 'pending' | 'unpriced' | 'not_charged' | 'unknown';
};