curl -i -L 'https://api.box.com/2.0/ai/extract_structured' \
-H 'content-type: application/json' \
-H 'authorization: Bearer <ACCESS_TOKEN>' \
-d '{
"items": [
{
"id": "12345678",
"type": "file",
"content": "This is file content."
}
],
"metadata_template": {
"template_key": "",
"type": "metadata_template",
"scope": ""
},
"fields": [
{
"key": "name",
"description": "The name of the person.",
"displayName": "Name",
"prompt": "The name is the first and last name from the email address.",
"type": "string",
"options": [
{
"key": "First Name"
},
{
"key": "Last Name"
}
]
}
],
"ai_agent": {
"type": "ai_agent_extract_structured",
"long_text": {
"model": "azure__openai__gpt_4o_mini"
},
"basic_text": {
"model": "azure__openai__gpt_4o_mini"
}
}
}'client.ai.create_ai_extract_structured(
[AiItemBase(id=file.id)],
fields=[
CreateAiExtractStructuredFields(
key="firstName",
display_name="First name",
description="Person first name",
prompt="What is the your first name?",
type="string",
),
CreateAiExtractStructuredFields(
key="lastName",
display_name="Last name",
description="Person last name",
prompt="What is the your last name?",
type="string",
),
CreateAiExtractStructuredFields(
key="dateOfBirth",
display_name="Birth date",
description="Person date of birth",
prompt="What is the date of your birth?",
type="date",
),
CreateAiExtractStructuredFields(
key="age",
display_name="Age",
description="Person age",
prompt="How old are you?",
type="float",
),
CreateAiExtractStructuredFields(
key="hobby",
display_name="Hobby",
description="Person hobby",
prompt="What is your hobby?",
type="multiSelect",
options=[
CreateAiExtractStructuredFieldsOptionsField(key="guitar"),
CreateAiExtractStructuredFieldsOptionsField(key="books"),
],
),
CreateAiExtractStructuredFields(
key="address",
display_name="Address",
description="Person address",
type="struct",
prompt="Extract the full mailing address.",
fields=[
AiExtractSubField(key="street", display_name="Street", type="string"),
AiExtractSubField(key="city", display_name="City", type="string"),
AiExtractSubField(key="state", display_name="State", type="string"),
AiExtractSubField(key="zip", display_name="Zip", type="string"),
AiExtractSubField(key="country", display_name="Country", type="string"),
],
),
CreateAiExtractStructuredFields(
key="work_history",
display_name="Work history",
description="Person work history",
type="table",
prompt="Extract each job as a row.",
fields=[
AiExtractSubField(
key="job_title", display_name="Job title", type="string"
),
AiExtractSubField(key="company", display_name="Company", type="string"),
AiExtractSubField(
key="start_year", display_name="Start year", type="string"
),
AiExtractSubField(
key="end_year", display_name="End year", type="string"
),
],
),
],
ai_agent=ai_extract_structured_agent_basic_text_config,
include_confidence_score=True,
include_reference=True,
)await client.ai.createAiExtractStructured({
fields: [
{
key: 'firstName',
displayName: 'First name',
description: 'Person first name',
prompt: 'What is the your first name?',
type: 'string',
} satisfies AiExtractStructuredFieldsField,
{
key: 'lastName',
displayName: 'Last name',
description: 'Person last name',
prompt: 'What is the your last name?',
type: 'string',
} satisfies AiExtractStructuredFieldsField,
{
key: 'dateOfBirth',
displayName: 'Birth date',
description: 'Person date of birth',
prompt: 'What is the date of your birth?',
type: 'date',
} satisfies AiExtractStructuredFieldsField,
{
key: 'age',
displayName: 'Age',
description: 'Person age',
prompt: 'How old are you?',
type: 'float',
} satisfies AiExtractStructuredFieldsField,
{
key: 'hobby',
displayName: 'Hobby',
description: 'Person hobby',
prompt: 'What is your hobby?',
type: 'multiSelect',
options: [
{ key: 'guitar' } satisfies AiExtractStructuredFieldsOptionsField,
{ key: 'books' } satisfies AiExtractStructuredFieldsOptionsField,
],
} satisfies AiExtractStructuredFieldsField,
{
key: 'address',
displayName: 'Address',
description: 'Person address',
type: 'struct',
prompt: 'Extract the full mailing address.',
fields: [
{
key: 'street',
displayName: 'Street',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'city',
displayName: 'City',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'state',
displayName: 'State',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'zip',
displayName: 'Zip',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'country',
displayName: 'Country',
type: 'string',
} satisfies AiExtractSubField,
],
} satisfies AiExtractStructuredFieldsField,
{
key: 'work_history',
displayName: 'Work history',
description: 'Person work history',
type: 'table',
prompt: 'Extract each job as a row.',
fields: [
{
key: 'job_title',
displayName: 'Job title',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'company',
displayName: 'Company',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'start_year',
displayName: 'Start year',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'end_year',
displayName: 'End year',
type: 'string',
} satisfies AiExtractSubField,
],
} satisfies AiExtractStructuredFieldsField,
],
items: [new AiItemBase({ id: file.id })],
includeConfidenceScore: true,
includeReference: true,
aiAgent: aiExtractStructuredAgentBasicTextConfig,
} satisfies AiExtractStructured);try await client.ai.createAiExtractStructured(requestBody: AiExtractStructured(fields: [AiExtractStructuredFieldsField(key: "firstName", displayName: "First name", description: "Person first name", prompt: "What is the your first name?", type: "string"), AiExtractStructuredFieldsField(key: "lastName", displayName: "Last name", description: "Person last name", prompt: "What is the your last name?", type: "string"), AiExtractStructuredFieldsField(key: "dateOfBirth", displayName: "Birth date", description: "Person date of birth", prompt: "What is the date of your birth?", type: "date"), AiExtractStructuredFieldsField(key: "age", displayName: "Age", description: "Person age", prompt: "How old are you?", type: "float"), AiExtractStructuredFieldsField(key: "hobby", displayName: "Hobby", description: "Person hobby", prompt: "What is your hobby?", type: "multiSelect", options: [AiExtractStructuredFieldsOptionsField(key: "guitar"), AiExtractStructuredFieldsOptionsField(key: "books")]), AiExtractStructuredFieldsField(key: "address", displayName: "Address", description: "Person address", type: "struct", prompt: "Extract the full mailing address.", fields: [AiExtractSubField(key: "street", displayName: "Street", type: "string"), AiExtractSubField(key: "city", displayName: "City", type: "string"), AiExtractSubField(key: "state", displayName: "State", type: "string"), AiExtractSubField(key: "zip", displayName: "Zip", type: "string"), AiExtractSubField(key: "country", displayName: "Country", type: "string")]), AiExtractStructuredFieldsField(key: "work_history", displayName: "Work history", description: "Person work history", type: "table", prompt: "Extract each job as a row.", fields: [AiExtractSubField(key: "job_title", displayName: "Job title", type: "string"), AiExtractSubField(key: "company", displayName: "Company", type: "string"), AiExtractSubField(key: "start_year", displayName: "Start year", type: "string"), AiExtractSubField(key: "end_year", displayName: "End year", type: "string")])], items: [AiItemBase(id: file.id)], includeConfidenceScore: true, includeReference: true))client.getAi().createAiExtractStructured(new AiExtractStructured.Builder(Arrays.asList(new AiItemBase(file.getId()))).fields(Arrays.asList(new AiExtractStructuredFieldsField.Builder("firstName").description("Person first name").displayName("First name").prompt("What is the your first name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("lastName").description("Person last name").displayName("Last name").prompt("What is the your last name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("dateOfBirth").description("Person date of birth").displayName("Birth date").prompt("What is the date of your birth?").type("date").build(), new AiExtractStructuredFieldsField.Builder("age").description("Person age").displayName("Age").prompt("How old are you?").type("float").build(), new AiExtractStructuredFieldsField.Builder("hobby").description("Person hobby").displayName("Hobby").prompt("What is your hobby?").type("multiSelect").options(Arrays.asList(new AiExtractStructuredFieldsOptionsField("guitar"), new AiExtractStructuredFieldsOptionsField("books"))).build(), new AiExtractStructuredFieldsField.Builder("address").description("Person address").displayName("Address").prompt("Extract the full mailing address.").type("struct").fields(Arrays.asList(new AiExtractSubField.Builder("street").displayName("Street").type("string").build(), new AiExtractSubField.Builder("city").displayName("City").type("string").build(), new AiExtractSubField.Builder("state").displayName("State").type("string").build(), new AiExtractSubField.Builder("zip").displayName("Zip").type("string").build(), new AiExtractSubField.Builder("country").displayName("Country").type("string").build())).build(), new AiExtractStructuredFieldsField.Builder("work_history").description("Person work history").displayName("Work history").prompt("Extract each job as a row.").type("table").fields(Arrays.asList(new AiExtractSubField.Builder("job_title").displayName("Job title").type("string").build(), new AiExtractSubField.Builder("company").displayName("Company").type("string").build(), new AiExtractSubField.Builder("start_year").displayName("Start year").type("string").build(), new AiExtractSubField.Builder("end_year").displayName("End year").type("string").build())).build())).aiAgent(aiExtractStructuredAgentBasicTextConfig).includeConfidenceScore(true).includeReference(true).build())await client.Ai.CreateAiExtractStructuredAsync(requestBody: new AiExtractStructured(items: Array.AsReadOnly(new [] {new AiItemBase(id: file.Id)})) { Fields = Array.AsReadOnly(new [] {new AiExtractStructuredFieldsField(key: "firstName") { DisplayName = "First name", Description = "Person first name", Prompt = "What is the your first name?", Type = "string" },new AiExtractStructuredFieldsField(key: "lastName") { DisplayName = "Last name", Description = "Person last name", Prompt = "What is the your last name?", Type = "string" },new AiExtractStructuredFieldsField(key: "dateOfBirth") { DisplayName = "Birth date", Description = "Person date of birth", Prompt = "What is the date of your birth?", Type = "date" },new AiExtractStructuredFieldsField(key: "age") { DisplayName = "Age", Description = "Person age", Prompt = "How old are you?", Type = "float" },new AiExtractStructuredFieldsField(key: "hobby") { DisplayName = "Hobby", Description = "Person hobby", Prompt = "What is your hobby?", Type = "multiSelect", Options = Array.AsReadOnly(new [] {new AiExtractStructuredFieldsOptionsField(key: "guitar"),new AiExtractStructuredFieldsOptionsField(key: "books")}) },new AiExtractStructuredFieldsField(key: "address") { DisplayName = "Address", Description = "Person address", Type = "struct", Prompt = "Extract the full mailing address.", Fields = Array.AsReadOnly(new [] {new AiExtractSubField(key: "street") { DisplayName = "Street", Type = "string" },new AiExtractSubField(key: "city") { DisplayName = "City", Type = "string" },new AiExtractSubField(key: "state") { DisplayName = "State", Type = "string" },new AiExtractSubField(key: "zip") { DisplayName = "Zip", Type = "string" },new AiExtractSubField(key: "country") { DisplayName = "Country", Type = "string" }}) },new AiExtractStructuredFieldsField(key: "work_history") { DisplayName = "Work history", Description = "Person work history", Type = "table", Prompt = "Extract each job as a row.", Fields = Array.AsReadOnly(new [] {new AiExtractSubField(key: "job_title") { DisplayName = "Job title", Type = "string" },new AiExtractSubField(key: "company") { DisplayName = "Company", Type = "string" },new AiExtractSubField(key: "start_year") { DisplayName = "Start year", Type = "string" },new AiExtractSubField(key: "end_year") { DisplayName = "End year", Type = "string" }}) }}), IncludeConfidenceScore = true, IncludeReference = true });{
"answer": {},
"created_at": "2012-12-12T10:53:43-08:00",
"completion_reason": "done",
"confidence_score": {},
"reference": {},
"ai_agent_info": {
"models": [
{
"name": "azure__openai__text_embedding_ada_002",
"provider": "azure",
"supported_purpose": "embedding"
}
],
"processor": "basic_text"
}
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}メタデータを抽出 (構造化)
サポートされている大規模言語モデル (LLM) にAIリクエストを送信し、抽出されたメタデータを一連のキー/値ペアとして返します。
抽出の構造を定義するには、メタデータテンプレートまたはフィールドのリストを指定します。テンプレート作成の詳細については、メタデータテンプレートのカスタマイズを参照するか、メタデータテンプレートAPIを使用してください。
このエンドポイントは、抽出エージェント (強化) もサポートしています。
サポートされているファイル形式と言語については、ファイルからメタデータを抽出する (構造化) APIガイドを参照してください。
curl -i -L 'https://api.box.com/2.0/ai/extract_structured' \
-H 'content-type: application/json' \
-H 'authorization: Bearer <ACCESS_TOKEN>' \
-d '{
"items": [
{
"id": "12345678",
"type": "file",
"content": "This is file content."
}
],
"metadata_template": {
"template_key": "",
"type": "metadata_template",
"scope": ""
},
"fields": [
{
"key": "name",
"description": "The name of the person.",
"displayName": "Name",
"prompt": "The name is the first and last name from the email address.",
"type": "string",
"options": [
{
"key": "First Name"
},
{
"key": "Last Name"
}
]
}
],
"ai_agent": {
"type": "ai_agent_extract_structured",
"long_text": {
"model": "azure__openai__gpt_4o_mini"
},
"basic_text": {
"model": "azure__openai__gpt_4o_mini"
}
}
}'client.ai.create_ai_extract_structured(
[AiItemBase(id=file.id)],
fields=[
CreateAiExtractStructuredFields(
key="firstName",
display_name="First name",
description="Person first name",
prompt="What is the your first name?",
type="string",
),
CreateAiExtractStructuredFields(
key="lastName",
display_name="Last name",
description="Person last name",
prompt="What is the your last name?",
type="string",
),
CreateAiExtractStructuredFields(
key="dateOfBirth",
display_name="Birth date",
description="Person date of birth",
prompt="What is the date of your birth?",
type="date",
),
CreateAiExtractStructuredFields(
key="age",
display_name="Age",
description="Person age",
prompt="How old are you?",
type="float",
),
CreateAiExtractStructuredFields(
key="hobby",
display_name="Hobby",
description="Person hobby",
prompt="What is your hobby?",
type="multiSelect",
options=[
CreateAiExtractStructuredFieldsOptionsField(key="guitar"),
CreateAiExtractStructuredFieldsOptionsField(key="books"),
],
),
CreateAiExtractStructuredFields(
key="address",
display_name="Address",
description="Person address",
type="struct",
prompt="Extract the full mailing address.",
fields=[
AiExtractSubField(key="street", display_name="Street", type="string"),
AiExtractSubField(key="city", display_name="City", type="string"),
AiExtractSubField(key="state", display_name="State", type="string"),
AiExtractSubField(key="zip", display_name="Zip", type="string"),
AiExtractSubField(key="country", display_name="Country", type="string"),
],
),
CreateAiExtractStructuredFields(
key="work_history",
display_name="Work history",
description="Person work history",
type="table",
prompt="Extract each job as a row.",
fields=[
AiExtractSubField(
key="job_title", display_name="Job title", type="string"
),
AiExtractSubField(key="company", display_name="Company", type="string"),
AiExtractSubField(
key="start_year", display_name="Start year", type="string"
),
AiExtractSubField(
key="end_year", display_name="End year", type="string"
),
],
),
],
ai_agent=ai_extract_structured_agent_basic_text_config,
include_confidence_score=True,
include_reference=True,
)await client.ai.createAiExtractStructured({
fields: [
{
key: 'firstName',
displayName: 'First name',
description: 'Person first name',
prompt: 'What is the your first name?',
type: 'string',
} satisfies AiExtractStructuredFieldsField,
{
key: 'lastName',
displayName: 'Last name',
description: 'Person last name',
prompt: 'What is the your last name?',
type: 'string',
} satisfies AiExtractStructuredFieldsField,
{
key: 'dateOfBirth',
displayName: 'Birth date',
description: 'Person date of birth',
prompt: 'What is the date of your birth?',
type: 'date',
} satisfies AiExtractStructuredFieldsField,
{
key: 'age',
displayName: 'Age',
description: 'Person age',
prompt: 'How old are you?',
type: 'float',
} satisfies AiExtractStructuredFieldsField,
{
key: 'hobby',
displayName: 'Hobby',
description: 'Person hobby',
prompt: 'What is your hobby?',
type: 'multiSelect',
options: [
{ key: 'guitar' } satisfies AiExtractStructuredFieldsOptionsField,
{ key: 'books' } satisfies AiExtractStructuredFieldsOptionsField,
],
} satisfies AiExtractStructuredFieldsField,
{
key: 'address',
displayName: 'Address',
description: 'Person address',
type: 'struct',
prompt: 'Extract the full mailing address.',
fields: [
{
key: 'street',
displayName: 'Street',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'city',
displayName: 'City',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'state',
displayName: 'State',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'zip',
displayName: 'Zip',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'country',
displayName: 'Country',
type: 'string',
} satisfies AiExtractSubField,
],
} satisfies AiExtractStructuredFieldsField,
{
key: 'work_history',
displayName: 'Work history',
description: 'Person work history',
type: 'table',
prompt: 'Extract each job as a row.',
fields: [
{
key: 'job_title',
displayName: 'Job title',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'company',
displayName: 'Company',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'start_year',
displayName: 'Start year',
type: 'string',
} satisfies AiExtractSubField,
{
key: 'end_year',
displayName: 'End year',
type: 'string',
} satisfies AiExtractSubField,
],
} satisfies AiExtractStructuredFieldsField,
],
items: [new AiItemBase({ id: file.id })],
includeConfidenceScore: true,
includeReference: true,
aiAgent: aiExtractStructuredAgentBasicTextConfig,
} satisfies AiExtractStructured);try await client.ai.createAiExtractStructured(requestBody: AiExtractStructured(fields: [AiExtractStructuredFieldsField(key: "firstName", displayName: "First name", description: "Person first name", prompt: "What is the your first name?", type: "string"), AiExtractStructuredFieldsField(key: "lastName", displayName: "Last name", description: "Person last name", prompt: "What is the your last name?", type: "string"), AiExtractStructuredFieldsField(key: "dateOfBirth", displayName: "Birth date", description: "Person date of birth", prompt: "What is the date of your birth?", type: "date"), AiExtractStructuredFieldsField(key: "age", displayName: "Age", description: "Person age", prompt: "How old are you?", type: "float"), AiExtractStructuredFieldsField(key: "hobby", displayName: "Hobby", description: "Person hobby", prompt: "What is your hobby?", type: "multiSelect", options: [AiExtractStructuredFieldsOptionsField(key: "guitar"), AiExtractStructuredFieldsOptionsField(key: "books")]), AiExtractStructuredFieldsField(key: "address", displayName: "Address", description: "Person address", type: "struct", prompt: "Extract the full mailing address.", fields: [AiExtractSubField(key: "street", displayName: "Street", type: "string"), AiExtractSubField(key: "city", displayName: "City", type: "string"), AiExtractSubField(key: "state", displayName: "State", type: "string"), AiExtractSubField(key: "zip", displayName: "Zip", type: "string"), AiExtractSubField(key: "country", displayName: "Country", type: "string")]), AiExtractStructuredFieldsField(key: "work_history", displayName: "Work history", description: "Person work history", type: "table", prompt: "Extract each job as a row.", fields: [AiExtractSubField(key: "job_title", displayName: "Job title", type: "string"), AiExtractSubField(key: "company", displayName: "Company", type: "string"), AiExtractSubField(key: "start_year", displayName: "Start year", type: "string"), AiExtractSubField(key: "end_year", displayName: "End year", type: "string")])], items: [AiItemBase(id: file.id)], includeConfidenceScore: true, includeReference: true))client.getAi().createAiExtractStructured(new AiExtractStructured.Builder(Arrays.asList(new AiItemBase(file.getId()))).fields(Arrays.asList(new AiExtractStructuredFieldsField.Builder("firstName").description("Person first name").displayName("First name").prompt("What is the your first name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("lastName").description("Person last name").displayName("Last name").prompt("What is the your last name?").type("string").build(), new AiExtractStructuredFieldsField.Builder("dateOfBirth").description("Person date of birth").displayName("Birth date").prompt("What is the date of your birth?").type("date").build(), new AiExtractStructuredFieldsField.Builder("age").description("Person age").displayName("Age").prompt("How old are you?").type("float").build(), new AiExtractStructuredFieldsField.Builder("hobby").description("Person hobby").displayName("Hobby").prompt("What is your hobby?").type("multiSelect").options(Arrays.asList(new AiExtractStructuredFieldsOptionsField("guitar"), new AiExtractStructuredFieldsOptionsField("books"))).build(), new AiExtractStructuredFieldsField.Builder("address").description("Person address").displayName("Address").prompt("Extract the full mailing address.").type("struct").fields(Arrays.asList(new AiExtractSubField.Builder("street").displayName("Street").type("string").build(), new AiExtractSubField.Builder("city").displayName("City").type("string").build(), new AiExtractSubField.Builder("state").displayName("State").type("string").build(), new AiExtractSubField.Builder("zip").displayName("Zip").type("string").build(), new AiExtractSubField.Builder("country").displayName("Country").type("string").build())).build(), new AiExtractStructuredFieldsField.Builder("work_history").description("Person work history").displayName("Work history").prompt("Extract each job as a row.").type("table").fields(Arrays.asList(new AiExtractSubField.Builder("job_title").displayName("Job title").type("string").build(), new AiExtractSubField.Builder("company").displayName("Company").type("string").build(), new AiExtractSubField.Builder("start_year").displayName("Start year").type("string").build(), new AiExtractSubField.Builder("end_year").displayName("End year").type("string").build())).build())).aiAgent(aiExtractStructuredAgentBasicTextConfig).includeConfidenceScore(true).includeReference(true).build())await client.Ai.CreateAiExtractStructuredAsync(requestBody: new AiExtractStructured(items: Array.AsReadOnly(new [] {new AiItemBase(id: file.Id)})) { Fields = Array.AsReadOnly(new [] {new AiExtractStructuredFieldsField(key: "firstName") { DisplayName = "First name", Description = "Person first name", Prompt = "What is the your first name?", Type = "string" },new AiExtractStructuredFieldsField(key: "lastName") { DisplayName = "Last name", Description = "Person last name", Prompt = "What is the your last name?", Type = "string" },new AiExtractStructuredFieldsField(key: "dateOfBirth") { DisplayName = "Birth date", Description = "Person date of birth", Prompt = "What is the date of your birth?", Type = "date" },new AiExtractStructuredFieldsField(key: "age") { DisplayName = "Age", Description = "Person age", Prompt = "How old are you?", Type = "float" },new AiExtractStructuredFieldsField(key: "hobby") { DisplayName = "Hobby", Description = "Person hobby", Prompt = "What is your hobby?", Type = "multiSelect", Options = Array.AsReadOnly(new [] {new AiExtractStructuredFieldsOptionsField(key: "guitar"),new AiExtractStructuredFieldsOptionsField(key: "books")}) },new AiExtractStructuredFieldsField(key: "address") { DisplayName = "Address", Description = "Person address", Type = "struct", Prompt = "Extract the full mailing address.", Fields = Array.AsReadOnly(new [] {new AiExtractSubField(key: "street") { DisplayName = "Street", Type = "string" },new AiExtractSubField(key: "city") { DisplayName = "City", Type = "string" },new AiExtractSubField(key: "state") { DisplayName = "State", Type = "string" },new AiExtractSubField(key: "zip") { DisplayName = "Zip", Type = "string" },new AiExtractSubField(key: "country") { DisplayName = "Country", Type = "string" }}) },new AiExtractStructuredFieldsField(key: "work_history") { DisplayName = "Work history", Description = "Person work history", Type = "table", Prompt = "Extract each job as a row.", Fields = Array.AsReadOnly(new [] {new AiExtractSubField(key: "job_title") { DisplayName = "Job title", Type = "string" },new AiExtractSubField(key: "company") { DisplayName = "Company", Type = "string" },new AiExtractSubField(key: "start_year") { DisplayName = "Start year", Type = "string" },new AiExtractSubField(key: "end_year") { DisplayName = "End year", Type = "string" }}) }}), IncludeConfidenceScore = true, IncludeReference = true });{
"answer": {},
"created_at": "2012-12-12T10:53:43-08:00",
"completion_reason": "done",
"confidence_score": {},
"reference": {},
"ai_agent_info": {
"models": [
{
"name": "azure__openai__text_embedding_ada_002",
"provider": "azure",
"supported_purpose": "embedding"
}
],
"processor": "basic_text"
}
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}承認
The access token received from the authorization server in the OAuth 2.0 flow.
ボディ
AIによる抽出 (構造化) リクエストオブジェクト。
LLMで処理する項目。現在使用できるのはファイルのみです。
1 - 25 elementsShow child attributes
Show child attributes
抽出するフィールドを含むメタデータテンプレート。リクエストを機能させるには、metadata_templateまたはfieldsを指定する必要がありますが、両方を指定することはできません。
Show child attributes
Show child attributes
指定された項目から抽出するフィールド。リクエストを機能させるには、metadata_templateまたはfieldsを指定する必要がありますが、両方を指定することはできません。
1Show child attributes
Show child attributes
抽出 (構造化) に使用されるAIエージェント。指定しなかった場合、デフォルトではエージェント (標準) になります。抽出エージェント (強化) を使用する場合の詳細については、抽出エージェント (強化) を参照してください。
- AIエージェントの参照
- 抽出 (構造化) リクエスト用のAIエージェント
Show child attributes
Show child attributes
抽出された各フィールドの信頼度スコアを返すかどうかを示すフラグ。
true
抽出された各フィールドの参照を返すかどうかを示すフラグ。
true
抽出 (構造化) に使用するメタデータ階層ソース。既存のファイルまたはメタデータ階層になります。リクエストを機能させるには、fieldsも指定する必要があります。taxonomy_sourcesはmetadata_templateではサポートされていません。
抽出 (構造化) に使用するメタデータ階層ソース。リクエストを機能させるには、fieldsも指定する必要があります。
- AIメタデータ階層の参照
- AIメタデータ階層のファイル参照
Show child attributes
Show child attributes
[
{
"type": "taxonomy",
"taxonomy_key": "certification_taxonomy",
"namespace": "enterprise_123"
},
{
"type": "file",
"taxonomy_key": "industry_taxonomy",
"id": "1234567890"
}
]
レスポンス
LLMからの回答を含む成功したレスポンス。
AIによる抽出 (構造化) のレスポンス。
AIによる抽出のレスポンス。このレスポンスのコンテンツは、リクエストされた構成に応じて異なる場合があります。
Show child attributes
Show child attributes
プロンプトに対する回答が作成された時点のISO日付形式のタイムスタンプ。
"2012-12-12T10:53:43-08:00"
応答が終了した理由。
"done"
JSON形式の辞書として抽出された各フィールドの信頼度スコアレベルと数値。フィールドが抽出されなかった場合は空になります。
Show child attributes
Show child attributes
JSON形式の辞書として抽出された各フィールドの参照。フィールドが抽出されなかった場合は空になります。
Show child attributes
Show child attributes
リクエストで使用されるモデルおよびプロセッサに関する情報。
Show child attributes
Show child attributes
このページは役に立ちましたか?
