Composants → bpm.chatInterface

bpm.chatInterface

Interface de chat (messages, saisie, streaming).

StableIA & Spécialisés⏱ 2 min
Bonjour !
U
IA
Bonjour, comment puis-je vous aider ?
Python
bpm.chatInterface(messages=msgs, onSend=handle_send)
PropTypeDéfautRequisDescription
messagesChatMessage[]OuiListe des messages (id, role, content, timestamp?).
onSend(content: string) => voidOuiEnvoi d'un message utilisateur.
isLoadingbooleanfalseNonAffiche un indicateur de chargement (réponse en cours).
placeholderstring"Écrivez votre message..."NonPlaceholder du champ de saisie.
systemContextstringNonContexte système affiché en haut si défini.
heightstring100%NonHauteur du conteneur.
classNamestringNonClasses CSS.

Exemples

bpm.chatInterface(messages=msgs, onSend=send_message)
bpm.chatInterface(messages=msgs, onSend=send_message, isLoading=loading)
bpm.chatInterface(messages=msgs, onSend=send_message, systemContext="Assistant support client")
bpm.chatInterface(messages=msgs, onSend=send_message, placeholder="Posez votre question...", height="400px")