Alexa 爬虫

`scraper.alexa` 执行器返回的 Alexa 响应会附带相关提示词、引用和媒体资源,以便您评估该模型在不同市场中的回答表现。

请求示例

curl 'https://api.scrapeless.com/api/v2/scraper/request' \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: {you_api_key}' \
  --data '{
    "actor": "scraper.alexa",
    "input": {
      "prompt": "Recommended attractions in New York",
      "country": "US"
    },
    "webhook": {
      "url": "http://www.youwebhook.com"
    }
  }'

请求体参数

参数类型是否必需描述
promptstring发送给 Alexa 的提示词。
countrystring国家或地区代码。

响应字段

参数类型描述
user_textstring用户发送的原始文本。
md_textstringAlexa 返回的 Markdown 格式回答。
raw_textstringAlexa 返回的纯文本回答。
completedbool回答生成是否已完成。
answer_fragment_uristring回答片段的 URI。
answer_revisionint回答的版本号。
dialog_request_idstring对话请求的标识符。
endpoint_idstring响应端点/设备的标识符。
fragment_countint响应片段的数量。
conversationobject对话上下文。
conversation.idstring对话标识符。
directivesarray交互过程中发出的处理指令。
directives.namestring指令名称,例如 RequestProcessingStarted
directives.namespacestring指令命名空间,例如 InteractionModel
directives.message_idstring指令消息的唯一标识符。
directives.dialog_request_idstring与该指令关联的对话请求 ID。
directives.fragment_countint该指令的片段数量。
referencesarray回答中引用的来源。
references.idstring引用标识符,例如 cite_NWXekzs
references.titlestring引用来源的标题。
references.urlstring引用来源的 URL。
sourcesarray支撑回答的来源链接。
sources.textstring来源的显示文本,例如网站名称。
sources.urlstring来源的 URL。
sources.typestring来源类型,例如 OpenURL
sources.fragment_uristring来源片段的 URI。
suggestionsarray建议的后续提示词。
suggestions.textstring建议的显示文本。
suggestions.messagestring选择该建议时发送的消息。
suggestions.typestring建议类型,例如 TextMessage
suggestions.fragment_uristring建议片段的 URI。
productsarrayAlexa 返回的产品信息(不适用时为空)。
products.product_idstring产品标识符,例如 Amazon ASIN。
products.citation_idstring将产品与回答关联的引用标识符。
products.titlestring产品标题。
products.image_urlstring产品图片 URL。
products.urlstring产品页面 URL。
products.pricestring显示价格,例如 $989.95
products.deliverystring配送信息,例如 Delivery by Tuesday, July 7
products.detailsarray详细信息行列表(标题、价格、配送等)。
products.fragment_uristring产品片段的 URI。
products.purposestring产品条目的用途,例如 INFORMATION