Files
veridian/server/types/chat.ts
T

29 lines
712 B
TypeScript

export type MessageType = 'system' | 'agent' | 'user';
export type GenerationStatus = 'pending' | 'active' | 'completed' | 'failed';
export interface ChatMessage {
type: MessageType;
message: string;
}
export interface GenerateRequestBody {
topicId: string;
messages: ChatMessage[];
regeneratesFrom?: string;
}
export interface GenerationStreamEvent {
type: 'start' | 'token' | 'complete' | 'error';
data: string | object | null;
}
export interface GenerationStatusResponse {
generationId: string;
status: GenerationStatus;
content?: string;
topicId?: string;
model?: string;
tokensGenerated?: number;
tokensUsedThinking?: number;
error?: string;
}