adds api call and introduces model for conversations

This commit is contained in:
ajaythapliyal
2023-03-05 14:25:21 +05:30
parent 54eea0ff04
commit 780f5893de
4 changed files with 40 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
export type MESSAGE_TYPE = 'QUESTION' | 'ANSWER' | 'ERROR';
export type Status = 'idle' | 'loading' | 'failed';
export type FEEDBACK = 'LIKE' | 'DISLIKE';
export interface Message {
text: string;
@@ -16,3 +17,9 @@ export interface Answer {
query: string;
result: string;
}
export interface Query {
prompt: string;
response?: string;
feedback?: FEEDBACK;
}