文档库语境化问答
开发环境
开发环境
POST
https://api.ai21.com/studio/v1/library/answer
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.ai21.com/studio/v1/library/answer?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw ''
响应示例响应示例
200 - 成功示例
{
"id": "c54b82ca-9347-137b-b76c-9dadcb992a1f",
"answerInContext": true,
"answer": "Koalas eat the leaves of Eucalyptus trees.",
"sources": [
{
"fileId": "912e8968-fa0d-4eb2-8ec1-9c35a10c9517",
"name": "main/endangered_species/koala.txt",
"highlights": [
"Koalas typically inhabit open Eucalyptus woodland, as the leaves of these trees make up most of their diet.\n\nThis eucalypt diet has low nutritional and caloric content and contains toxins that deter most other mammals from feeding on it.\n\nKoalas are largely sedentary and sleep up to twenty hours a day.\n\nThey are asocial animals, and bonding exists only between mothers and dependent offspring.\n\nAdult males communicate with loud bellows that intimidate rivals and attract mates.\n\nMales mark their presence with secretions from scent glands located on their chests.\n\nBeing marsupials, koalas give birth to underdeveloped young that crawl into their mothers' pouches, where they stay for the first six to seven months of their lives.\n\nThese young koalas, known as joeys, are fully weaned around a year old.",
"Koalas have few natural predators and parasites, but are threatened by various pathogens, such as Chlamydiaceae bacteria and koala retrovirus.",
"The koala or, inaccurately, koala bear (Phascolarctos cinereus), is an arboreal herbivorous marsupial native to Australia.\n\nIt is the only extant representative of the family Phascolarctidae and its closest living relatives are the wombats.",
"The koala is found in coastal areas of the mainland's eastern and southern regions, inhabiting Queensland, New South Wales, Victoria, and South Australia.\n\nIt is easily recognisable by its stout, tailless body and large head with round, fluffy ears and large, spoon-shaped nose.\n\nThe koala has a body length of 60–85 cm (24–33 in) and weighs 4–15 kg (9–33 lb).\n\nFur colour ranges from silver grey to chocolate brown.\n\nKoalas from the northern populations are typically smaller and lighter in colour than their counterparts further south.\n\nThese populations possibly are separate subspecies, but this is disputed.",
"During the Oligocene and Miocene, koalas lived in rainforests and had less specialised diets.[13] Some species, such as the Riversleigh rainforest koala (Nimiokoala greystanesi) and some species of Perikoala, were around the same size as the modern koala, while others, such as species of Litokoala, were one-half to two-thirds its size.[14] Like the modern species, prehistoric koalas had well developed ear structures which suggests that long-distance vocalising and sedentism developed early.[13] During the Miocene, the Australian continent began drying out, leading to the decline of rainforests and the spread of open Eucalyptus woodlands.\n\nThe genus Phascolarctos split from Litokoala in the late Miocene[13][15] and had several adaptations that allowed it to live on a specialised eucalyptus diet: a shifting of the palate towards the front of the skull; larger molars and premolars; smaller pterygoid fossa;[13] and a larger gap between the molar and the incisor teeth.[16]: 226 \n\nP. cinereus may have emerged as a dwarf form of the giant koala (P. stirtoni).\n\nThe reduction in the size of large mammals has been seen as a common phenomenon worldwide during the late Pleistocene, and several Australian mammals, such as the agile wallaby, are traditionally believed to have resulted from this dwarfing."
],
"publicUrl": "https://en.wikipedia.org/wiki/Koala"
}
]
}
请求参数
Body 参数application/json
返回响应
修改于 2023-11-13 03:15:00