提供: Bright Pattern Documentation
• English
sendChatMessage
チャット対応中に、エージェントに代わってメッセージを送信します。
リクエスト
構文
| sendChatMessage(テキスト: string, interactionId?: string): Promise<OPERATIONRESULT<null>> |
パラメータ
| パラメータ | パラメータ値 | データ型 | オプション/必須 | 説明 |
| テキスト | 文字列 | 必須 | 送信するメッセージ | |
| interactionId | 文字列 | オプション | メッセージが送信されるチャットインタラクションです。interactionId を省略した場合、現在アクティブなインタラクションが使用されます。 |
リクエスト例
sendMessageButton.onclick = () => {
const message = chatInput.value;
const interactionId = interactionsList[0].interactionId;
adApi.sendChatMessage(message, interactionId);
};
戻り値
Null