Join a webinar on April 30th: Unlocking Your Data using AI with Box Extract & MCP Server. Register here
curl -i -L 'https://api.box.com/2.0/ai/extract' \
-H 'content-type: application/json' \
-H 'authorization: Bearer <ACCESS_TOKEN>' \
-d '{
"prompt": "Extract data related to contract conditions",
"items": [
{
"type": "file",
"id": "1497741268097"
}
],
"ai_agent": {
"type": "ai_agent_extract",
"long_text": {
"model": "azure__openai__gpt_4o_mini",
"prompt_template": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. What should I see?",
},
"basic_text": {
"model": "azure__openai__gpt_4o_mini",
}
}
}'{
"answer": "Public APIs are important because of key and important reasons.",
"created_at": "2012-12-12T10:53:43-08:00",
"completion_reason": "done",
"ai_agent_info": {
"models": [
{
"name": "azure__openai__text_embedding_ada_002",
"provider": "azure",
"supported_purpose": "embedding"
}
],
"processor": "basic_text"
}
}サポートされている大規模言語モデル (LLM) にAIリクエストを送信し、メタデータをキー/値ペアの形式で抽出します。このリクエストでは、プロンプトと出力の両方を自由形式にすることができます。リクエストを送信する前に、メタデータテンプレートの設定は必要ありません。
curl -i -L 'https://api.box.com/2.0/ai/extract' \
-H 'content-type: application/json' \
-H 'authorization: Bearer <ACCESS_TOKEN>' \
-d '{
"prompt": "Extract data related to contract conditions",
"items": [
{
"type": "file",
"id": "1497741268097"
}
],
"ai_agent": {
"type": "ai_agent_extract",
"long_text": {
"model": "azure__openai__gpt_4o_mini",
"prompt_template": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. What should I see?",
},
"basic_text": {
"model": "azure__openai__gpt_4o_mini",
}
}
}'{
"answer": "Public APIs are important because of key and important reasons.",
"created_at": "2012-12-12T10:53:43-08:00",
"completion_reason": "done",
"ai_agent_info": {
"models": [
{
"name": "azure__openai__text_embedding_ada_002",
"provider": "azure",
"supported_purpose": "embedding"
}
],
"processor": "basic_text"
}
}The access token received from the authorization server in the OAuth 2.0 flow.
AIへのメタデータ抽出 (自由形式) リクエストオブジェクト。
リクエストで大規模言語モデル (LLM) に提供されるプロンプト。プロンプトには、最大10,000文字を指定できるほか、XMLまたはJSONスキーマを使用することができます。
"\\\"fields\\\":[{\\\"type\\\":\\\"string\\\",\\\"key\\\":\\\"name\\\",\\\"displayName\\\":\\\"Name\\\",\\\"description\\\":\\\"The customer name\\\",\\\"prompt\\\":\\\"Name is always the first word in the document\\\"},{\\\"type\\\":\\\"date\\\",\\\"key\\\":\\\"last_contacted_at\\\",\\\"displayName\\\":\\\"Last Contacted At\\\",\\\"description\\\":\\\"When this customer was last contacted at\\\"}]"
LLMで処理される項目。現在使用できるのはファイルのみです。
1 - 25 elementsShow child attributes
抽出に使用されるAIエージェント。
Show child attributes
LLMからの回答を含むレスポンス。
AIの応答。
LLMから提供された回答。
"Public APIs are important because of key and important reasons."
プロンプトに対する回答が作成された時点のISO日付形式のタイムスタンプ。
"2012-12-12T10:53:43-08:00"
応答が終了した理由。
"done"
リクエストで使用されるモデルおよびプロセッサに関する情報。
Show child attributes
このページは役に立ちましたか?