簡體   English   中英

有沒有辦法在對話流或動態列表響應中顯示動態建議芯片?

[英]Is there a way to show dynamic suggestion chips in dialogflow or dynamic list response?

我正在嘗試向用戶顯示商店,但商店需要是動態的,並且應該根據用戶的當前位置來自數據庫。

Location1 的用戶

user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location1, these are the stores near you.
    Store1, Store2, Store3 (Suggestion Chips)

假設如果明天用戶在不同的位置並提出相同的問題,那么他應該能夠看到其他商店。

位置 2 的用戶

user: show nearby stores
assistant: I need your location, can I get that?
user: yes
assistant: you are at location2, these are the stores near you.
    Store4, Store5, Store6 (Suggestion Chips)

我想根據用戶所在的位置,以建議籌碼的形式,或者以列表響應的形式,動態地展示這些店鋪。

你在使用網絡鈎子嗎? 這將是做任何動態的標准方式。

Codelab展示了如何使用 Dialogflow 內聯編輯器進行動態響應。 您可以使用標准的 JavaScript 來實現您的決策邏輯並返回動態建議芯片。

如果你想獲取用戶的位置,你需要使用權限,也有簡潔的助手

如果您有更多關於到目前為止所嘗試的信息,我們可以為您提供更具體的資源。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM