Alexa スクレイパー
scraper.alexa actorは、関連するプロンプト、引用、メディアアセットを含む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"
}
}'ボディパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
prompt | string | はい | Alexaに送信するプロンプト。 |
country | string | はい | 国または地域コード。 |
レスポンスフィールド
| パラメータ | 型 | 説明 |
|---|---|---|
user_text | string | ユーザーが送信した元のテキスト。 |
md_text | string | Markdown形式のAlexaからの回答。 |
raw_text | string | プレーンテキスト形式のAlexaからの回答。 |
completed | bool | 回答の生成が完了しているかどうか。 |
answer_fragment_uri | string | 回答フラグメントのURI。 |
answer_revision | int | 回答のリビジョン番号。 |
dialog_request_id | string | ダイアログリクエストの識別子。 |
endpoint_id | string | 応答したエンドポイント/デバイスの識別子。 |
fragment_count | int | レスポンスフラグメントの数。 |
conversation | object | 会話のコンテキスト。 |
conversation.id | string | 会話識別子。 |
directives | array | やり取り中に発行された処理ディレクティブ。 |
directives.name | string | ディレクティブ名、例: RequestProcessingStarted。 |
directives.namespace | string | ディレクティブ名前空間、例: InteractionModel。 |
directives.message_id | string | ディレクティブメッセージの固有識別子。 |
directives.dialog_request_id | string | ディレクティブに関連付けられたダイアログリクエストID。 |
directives.fragment_count | int | ディレクティブのフラグメント数。 |
references | array | 回答内で参照されている引用。 |
references.id | string | 引用識別子、例: cite_NWXekzs。 |
references.title | string | 参照されたソースのタイトル。 |
references.url | string | 参照されたソースのURL。 |
sources | array | 回答を裏付けるソースのリンク。 |
sources.text | string | ソースの表示テキスト(例:サイト名)。 |
sources.url | string | ソースのURL。 |
sources.type | string | ソースタイプ、例: OpenURL。 |
sources.fragment_uri | string | ソースフラグメントのURI。 |
suggestions | array | 提案されるフォローアッププロンプト。 |
suggestions.text | string | 提案の表示テキスト。 |
suggestions.message | string | 提案が選択されたときに送信されるメッセージ。 |
suggestions.type | string | 提案タイプ、例: TextMessage。 |
suggestions.fragment_uri | string | 提案フラグメントのURI。 |
products | array | Alexaが返した製品情報(該当しない場合は空)。 |
products.product_id | string | 製品識別子(例:Amazon ASIN)。 |
products.citation_id | string | 製品と回答を関連付ける引用識別子。 |
products.title | string | 製品タイトル。 |
products.image_url | string | 製品画像のURL。 |
products.url | string | 製品ページのURL。 |
products.price | string | 表示価格、例: $989.95。 |
products.delivery | string | 配送情報、例: Delivery by Tuesday, July 7。 |
products.details | array | 詳細ラインのリスト(タイトル、価格、配送など)。 |
products.fragment_uri | string | 製品フラグメントのURI。 |
products.purpose | string | 製品エントリの目的、例: INFORMATION。 |