Skip to content

In Additional Recommendations

Description

加購推薦

Resource

POST /v1/openai_scenario/in_additional_recommendations

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Request Body Parameters

Name Type Description
message string 用戶輸入
recommand list[Product] 當前推薦商品

Request Body Parameters Product

Name Type Description
product_id string 商品代碼
product_name string 商品名稱(翻譯)

Request Example

{
    "message": "用戶輸入文本",
    "recommand": [{
        "product_id": "H001",
        "product_name": "蜂蜜啤酒"
    }]
}

Response Body Parameters

Name Type Description
intent string 意圖
  • accept_upsell
  • reject_upsell
  • unrecognized
parameters object 返回參數

Response Body Parameters Parameters

Name Type Description
item list[Product] 加點商品
error_type string 錯誤類型

Response Body Parameters Product

Name Type Description
product_id string 商品代碼
quantity int 商品數量

Response Example

Status-Code: 200

{
    "intent": "accept_upsell",
    "parameters": {
        "item": [{
            "product_id": "H001",
            "quantity": 1
        }]
    }
}