@selleo/chatbot-client
Version:
Client that can be integrated with a backend created with openai
32 lines (30 loc) • 986 B
TypeScript
import { ComponentType, ReactNode, SVGProps } from 'react';
export type MessageType = {
content: string;
role: "user" | "assistant" | "system";
isWaiting?: boolean;
};
export type ChatProps = {
logo?: ComponentType<SVGProps<SVGSVGElement>>;
toggleButtonIcon?: ComponentType<SVGProps<SVGSVGElement>>;
UserBubbleClassName?: string;
AssistantBubbleClassName?: string;
messageResponseDotsClassName?: string;
chatToggleButtonClassName?: string;
chatMainClassName?: string;
topBarClassName?: string;
conversationClassName?: string;
inputSectionClassName?: string;
chatName?: string;
token?: string;
apiUrl?: string;
placeholder?: string;
welcomeMessageText?: string;
};
export type ChatConfigContextType = ChatProps & {
logo: ComponentType<SVGProps<SVGSVGElement>>;
toggleButtonIcon: ComponentType<SVGProps<SVGSVGElement>>;
children?: ReactNode;
placeholder: string;
welcomeMessage: MessageType;
};