Skip to content

ChatbotModule

new ChatbotModule(client): ChatbotModule

ApiClient

ChatbotModule

addKnowledgeSource(input): Promise<BotKnowledgeSource>

CreateKnowledgeInput

Promise<BotKnowledgeSource>


createProfile(input): Promise<BotProfile>

CreateBotProfileInput

Promise<BotProfile>


deleteProfile(id): Promise<void>

string

Promise<void>


getKnowledgeSources(botId): Promise<BotKnowledgeSource[]>

string

Promise<BotKnowledgeSource[]>


getProfiles(): Promise<BotProfile[]>

Promise<BotProfile[]>


getSessionHistory(sessionId): Promise<ChatMessage[]>

string

Promise<ChatMessage[]>


getTemplates(): Promise<any[]>

Retrieves a list of pre-configured chatbot templates. Templates include default settings like system prompts, theme colors, and welcome messages. Translations for the default templates are also included.

Promise<any[]>

A list of chatbot templates.


initSession(botId, visitorId?): Promise<{ sessionId: string; }>

string

string

Promise<{ sessionId: string; }>


removeKnowledgeSource(id): Promise<void>

string

Promise<void>


sendMessage(sessionId, message): Promise<{ latencyMs: number; message: string; tokensUsed: any; }>

string

string

Promise<{ latencyMs: number; message: string; tokensUsed: any; }>


updateKnowledgeSyncStatus(id, syncStatus): Promise<BotKnowledgeSource>

string

"error" | "pending" | "synced"

Promise<BotKnowledgeSource>


updateProfile(id, input): Promise<BotProfile>

string

UpdateBotProfileInput

Promise<BotProfile>