chore: updated Query and WidgetProps interface with source property

This commit is contained in:
utin-francis-peter
2024-10-14 12:30:57 +01:00
parent aa57984bde
commit 0481e766ae

View File

@@ -1,16 +1,21 @@
export type MESSAGE_TYPE = 'QUESTION' | 'ANSWER' | 'ERROR';
export type Status = 'idle' | 'loading' | 'failed';
export type FEEDBACK = 'LIKE' | 'DISLIKE';
export type THEME = 'light' | 'dark';
export interface Query {
prompt: string;
response?: string;
feedback?: FEEDBACK;
error?: string;
sources?: { title: string; text: string }[];
sources?: { title: string; text: string, source:string }[];
conversationId?: string | null;
title?: string | null;
}
export interface WidgetProps {
apiHost?: string;
apiKey?: string;
@@ -24,4 +29,5 @@ export interface WidgetProps {
buttonIcon?:string;
buttonBg?:string;
collectFeedback?:boolean
showSources?: boolean
}