export interface DcChatbot extends DcChatbotLean { id: string; name: string; description: string; adminNotes: string; avatarUrl?: string; status: DcChatbotStatus; temperature: number; answers: { answerLength: DcAnswerLength; // confidential citeSources: boolean; model: CompletionModel; // confidential customModelInstructions: string; // confidential enableAccessToSources: boolean; firstMessage: string; questionSuggestionMethod: QuestionSuggestionMethod; /** * If questionSuggestionMethod is @see QuestionSuggestionMethod.Disabled, this will be null. * Otherwise, this will be the list of suggested questions. */ suggestedQuestions?: string[]; questionPlaceHolder: string; /** * If this is 1, it means 100% semantic. if 0 , it means 100% keyword * */ semanticRate: number; rerankingEnabled: boolean; replaceSystemPrompt: boolean; autoAddContext: boolean; showExportButtonInChat: boolean; showFeedbackPopUpInChat: boolean; }; documentGroups: { name: string; id: string; // confidential documents: DcDocument[]; // confidential }[]; whiteLabel: { enabled: boolean; logoUrl?: string; /** * 7 digit hex color code , including the hash */ color: string; darkModeColor: string; pageTitle: string; ctaDescriptionText: string; ctaUrlText: string; ctaUrl: string; disclaimer: string; }; sharing: { link: { enabled: boolean; publicListingCategory: DcPublicListingCategory[]; publicListingCreatedBy: string; publicListingEnabled: boolean; }; embed: { // confidential enabled: boolean; /** * If empty, it means allow everyone * Otherwise, it means allow the given domains */ domains: string[]; }; team: { // confidential enabled: boolean; }; }; visibleUr?: string[]; widgetUrl?: string; limits: { // confidential enabled: boolean; monthlyMaxQuestions?: number; remainingQuestionsThisMonth?: number; }; } export enum QuestionSuggestionMethod { Disabled = "Disabled", Custom = "Custom", AutoGenerate = "AutoGenerate", /** * Can't be sent in a request, can only be set by backend */ AutoGenerateFailed = "AutoGenerateFailed", } export interface DcChatbotLean { id: string; name: string; description: string; avatarUrl?: string; answers: { citeSources: boolean; enableAccessToSources: boolean; firstMessage: string; /** * If questionSuggestionMethod is @see QuestionSuggestionMethod.Disabled, this will be null. * Otherwise, this will be the list of suggested questions. */ suggestedQuestions?: string[]; questionPlaceHolder: string; autoAddContext: boolean; showExportButtonInChat: boolean; showFeedbackPopUpInChat: boolean; }; documentGroups: { name: string; }[]; whiteLabel: { enabled: boolean; logoUrl?: string; pageTitle: string; ctaDescriptionText: string; ctaUrlText: string; ctaUrl: string; disclaimer: string; color: string; darkModeColor: string; }; sharing: { link: { enabled: boolean; publicListingCategory: DcPublicListingCategory[]; publicListingCreatedBy: string; publicListingEnabled: boolean; }; }; canAnswerQuestion?: boolean; canBeWhiteLabeled?: boolean; canChatBotBeTranslated?: boolean; organizationCustomCss: string; gtmCode: string; } export enum CompletionModel { Gpt3 = "Gpt3", Gpt4 = "Gpt4", Gpt4o = "Gpt4o", Gpt4oMini = "Gpt4oMini", Gpt5 = "Gpt5", Gpt5Mini = "Gpt5Mini", Gpt5Nano = "Gpt5Nano", MistralLarge = "MistralLarge", Claude3Haiku = "Claude3Haiku", Claude3Sonnet = "Claude3Sonnet", Claude3_5Sonnet = "Claude3_5Sonnet", Claude3_5Haiku = "Claude3_5Haiku", LLama3M = "LLama3M", LLama3L = "LLama3L", ClaudeOpus4_5 = "ClaudeOpus4_5", LLama4Scout = "LLama4Scout", ChatGpt5_2 = "ChatGpt5_2", } export enum DcChatbotStatus { /** * The chatbot has an id but nothing else. */ Draft = "Draft", /** * The chatbot has been initialized but not yet queued for processing. */ Initialized = "Initialized", /** * The chatbot is queued for processing. */ Queued = "Queued", /** * The chatbot is currently being processed. */ Processing = "Processing", /** * The chatbot couldn't be processed due to an eroor. */ Failed = "Failed", /** * Some of the documents couldn't be processed */ SomeDocumentsFailed = "SomeDocumentsFailed", /** * The chatbot is ready to be used. */ Ready = "Ready", } export type UserDocument = { document: DcDocument; relevantChatBotIds: string[]; }; export enum DcContentType { Document = "Document", Audio = "Audio", Image = "Image", Video = "Video", /** * Url to a single webpage */ Webpage = "Webpage", /** * Refers to a website, with some depth */ Website = "Website", Youtube = "Youtube", Rss = "Rss", GoogleDriveFolder = "GoogleDriveFolder", } /** Covers files and urls * */ export interface DcDocument { id: string; name: string; contentType: DcContentType; content?: DcContent; status: DcChatbotStatus; } /** * This will hold all the information that might be needed for the given DcContentType. */ export interface DcContent { /** this part is only sent from backend to frontend */ fileExtension?: string; url?: string; gDriveProperties?: { folderId: string; folderName: string; files: { fileName: string; fileUrl: string; processedAtLeastOnce: boolean; lastSuccessfulSync?: string; lastFailedSync?: string; lastSyncState: "Synced" | "Syncing" | "FailedToParse" | "FailedByPageProcessLimit" | "Unknown"; lastFailReason?: string; }[]; } } export enum DcAnswerLength { Short = "Short", Medium = "Medium", Long = "Long", } /** * Requires custom mapping to database */ export enum DcPublicListingCategory { Featured = "Featured", Popular = "Popular", ArtsAndLiterature = "Arts & Literature", PhilosophyAndSpirituality = "Philosophy & Spirituality", ScienceAndTechnology = "Science & Technology", HistoryAndCulture = "History & Culture", HealthAndWellness = "Health & Wellness", HobbiesAndInterests = "Hobbies & Interests", BusinessAndEntrepreneurship = "Business & Entrepreneurship", EntertainmentAndShows = "Entertainment & Shows", Miscellaneous = "Miscellaneous", Politics = "Politics", }