在呼叫 API 之前,您需要設定 GCP 專案和驗證。您可以依照快速入門導覽課程:設定一文中的步驟進行操作。
建構代理程式
大多數情況下,您應使用 Dialogflow ES 主控台建構代理程式,請參閱說明文件並開啟主控台。您可以依照主控台快速入門導覽課程頁面中的步驟建構代理程式。在進階情況下,您也可以使用 Dialogflow API 來建構代理程式。許多概念頁面側重說明以主控台建構代理程式,但也會提供相關 API 類型的連結。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-09 (世界標準時間)。"],[[["When not using pre-built integrations, direct interaction with Dialogflow's API is required for each conversational turn to process end-user input and receive intent matches."],["Interactions with the Dialogflow API follow a process where the service sends user expressions, Dialogflow returns intent data, and the service then performs actions and replies to the user."],["Before using the API, users need to set up a GCP project and authentication, which can be done through the provided setup quickstart."],["A session represents a conversation with an end-user, initiated with a unique session ID, and this ID should not be used for multiple concurrent conversations."],["To interact, the service calls the `detectIntent` method to send the user's expressions to Dialogflow, which will respond with data about matched intents."]]],[]]