Files
DocsGPT/frontend/src/conversation/conversationModels.ts
2023-02-22 10:02:05 +05:30

19 lines
347 B
TypeScript

export type MESSAGE_TYPE = 'QUESTION' | 'ANSWER' | 'ERROR';
export type Status = 'idle' | 'loading' | 'failed';
export interface Message {
text: string;
type: MESSAGE_TYPE;
}
export interface ConversationState {
conversation: Message[];
status: Status;
}
export interface Answer {
answer: string;
query: string;
result: string;
}