> For the complete documentation index, see [llms.txt](https://docs.dmflow.chat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dmflow.chat/domain/chat/gossip-tools.md).

# 閒聊工具

### 如何查找參考domain\_id和table\_id，大多會有自動提示功能，但有些新的工具可能沒有。

<figure><img src="/files/sTUOWjZLyDCl71fBsGeP" alt=""><figcaption><p>如何查找domain_id</p></figcaption></figure>

<figure><img src="/files/kkCOyYry5ZazxZLMgIMK" alt=""><figcaption><p>如何查找table_id</p></figcaption></figure>

### search\_table

* domain\_id: 選取表單的領域(需要是表單問答)
* table\_id: 選取表單的ID

可以透過"SQL"查詢表單內容，搜尋的內容為訪客權限，您可以前往 [表單](/domain/formqa/form.md#biao-dan-quan-xian)，並且可以整合CARD輸出。

<figure><img src="/files/1mpFFOz1X02A6w31tnxl" alt=""><figcaption><p>卡片輸出</p></figcaption></figure>

你可以透過搜尋到的內容對應到該欄位，並且可以點選Preview做預覽。

### rate\_conversation

可以判斷顧客想要離開的意圖，並對顧客詢問此對話是否"有幫助"或是"沒用"，會自動寫入日誌內。

### search\_knowledge

* domain\_id: 選取表單的領域(需要是文檔問答)
* description: 描述該搜尋的詞

使用這個工具它會自行調用文檔問答的內容作回答。

### collect\_user\_info

* username
* email
* phone

只要將上述設定為true即可讓機器人根據使用者對話更新使用者資訊。

### create\_table\_data

* domain\_id: 選取表單的領域(需要是表單問答)
* table\_id: 選取表單的ID
* trigger\_id: 觸發器ID

使用此工具，你可以新增表單內容，調用此工具不需要設定表單權限擁有插入權限即可插入。當插入成功後會調用該觸發器。

### human\_agent\_help

使用此工具，假設用戶有需要真人客服時，會自動Fallback，並將訪客的問題記錄到共用筆記內。

### auto\_suggestion

使用此工具，會自動追加最多三個推薦用戶的詢問句

### googlemap\_routes\_api

* api\_key，請先從設置那邊加密完畢後再輸入
* limit，原本最大為25，可自行設定1-25，會先透過計算直線距離過濾最近的距離再調用此API。

<figure><img src="/files/kyKrMSprUwhdCWGTttES" alt=""><figcaption><p>加密API KEY的地方</p></figcaption></figure>

### custom\_service

可以自己外呼API，但Payload不得超過4K(CJK長度算1，其他語言大約3-5個字母為長度1)

* resource\_id: 資源ID
* name: functionName(相當於LLM 調用工具的名稱)
* description: function Description(相當於LLM調用工具的描述)
* parameters: {name: string, description: string, type: 'string' | 'number' | 'boolean' | 'string\_array', require: boolean, enums: string}

參數部分，僅支援字串、數字、是否(布林)以及字串陣列，目前不支援物件陣列，enums可以使用'|'分開，例如: 中文|英文｜日文。資源節點在後面會在介紹。

### suggestion\_items

透過內建產品搜尋功能

### search\_reserve\_range

必須先選擇有預約組件的表單，才可以使用此功能

* domain\_id
* table\_id
* description: 讓LLM可以清楚了解你想要預約什麼物件

### collect\_user\_tag

使用此工具可以蒐集訪客標籤，標籤名稱若存在訪客標籤則會進行添加。

{name: string, description: string}\[]

### get\_form\_link

可以取得插入表單組件的外部連結，綁定訪客身份

array name, description, table\_id

### code\_geodesic

使用程式碼判斷經緯度位置

### store\_memory

可以儲存、查詢、移除訪客持久記憶
