Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

rtk-chat-composer-view

最終更新 Markdown で表示Agent セットアップ

チャットの入力欄を描画するコンポーネントです。

プロパティ

プロパティ 型 必須 デフォルト 説明
canSendFiles boolean ✅ - ファイルメッセージを送信できるかどうか
canSendTextMessage boolean ✅ - テキストメッセージを送信できるかどうか
iconPack IconPack1 ❌ defaultIconPack アイコンパック
inputTextPlaceholder string ✅ - テキスト入力のプレースホルダー
isEditing boolean ✅ - コンポーザーを編集モードにします
maxLength number ✅ - テキスト入力の最大長
message string ✅ - あらかじめ入力するメッセージ
quotedMessage string ✅ - 表示する引用メッセージ
rateLimits { period: number; maxInvocations: number; } ✅ - レート制限
storageKey string ✅ - localStorage にメッセージを保存するキー
t RtkI18n1 ❌ useLanguage() 言語

使用例

基本的な使い方

<rtk-chat-composer-view></rtk-chat-composer-view>

プロパティを指定する場合

<rtk-chat-composer-view
 inputTextPlaceholder="example">
</rtk-chat-composer-view>
<script>
  const el = document.querySelector("rtk-chat-composer-view");

  el.canSendFiles= true;
  el.canSendTextMessage= true;
</script>

役に立ちましたか?