Adds mock conversation api layer, adds reducers to handle various asyc

state and wires it with conversation UI
This commit is contained in:
ajaythapliyal
2023-02-20 09:04:24 +05:30
parent 63859a814b
commit a036a6b979
7 changed files with 122 additions and 34 deletions

View File

@@ -1,4 +1,5 @@
export type MESSAGE_TYPE = 'QUESTION' | 'ANSWER';
export type Status = 'idle' | 'loading' | 'failed';
export interface Message {
text: string;
@@ -7,4 +8,11 @@ export interface Message {
export interface ConversationState {
conversation: Message[];
status: Status;
}
export interface Answer {
answer: string;
query: string;
result: string;
}