语境化问答 API
1.
2.
请求参数
context
:包含要回答问题的文档上下文的字符串。限制:50,000 个字符。question
:包含要根据提供的上下文回答的问题的字符串。限制:160 个字符。question
:一个字符串,包含根据库中的文档要回答的问题。限制:150 个字符。path
:指定文档在库中的路径的字符串。选修的labels
:表示回答问题时要考虑的文档标签的字符串数组。选修的documentIds
:文档 ID 数组,用于指定回答问题时要考虑哪些文档。选修的响应参数
answer
:包含基于所提供上下文的问题答案的字符串。如果模型无法在提供的上下文中找到答案,则会做出响应。`id
:API 分配的唯一标识符,用于标识生成响应的特定请求。此参数对于跟踪和记录目的非常有用,特别是在向 API 发出多个请求时。answer
:包含基于文档库内容的问题答案的字符串。如果模型无法在库中的任何位置找到答案,则会做出响应。`id
:API 分配的唯一标识符,用于标识生成响应的特定请求。此参数对于跟踪和记录目的非常有用,特别是在向 API 发出多个请求时。answerInContext
:一个布尔值,指示是否在文档库中找到了答案。sources
document_id
:源文档的唯一标识符。name
:源文档的名称。highlights
:包含源文档中与答案相关的部分的字符串数组。publicUrl
:指向源文档的 URL(如果可用)。示例:单文档语境化问答
{
"id": "36d2ec63-ef15-2296-af51-ef34206fc655",
"answer": "The Delta and Omicron variants and the global supply chain shortages did not slow down economic growth."
}
示例:文档库语境化问答
{
"id":"28a6f1a8-31f3-cca4-d71a-6bca2e62d124",
"answerInContext":true,
"answer":"JPMorgan Chase paid the Federal Deposit Insurance Corporation $11 billion over the past decade.",
"sources":[
{
"document_id":"f8527829-c036-4d3a-9a6e-3169f4db1765",
"name":"examples/banking/jpmorgan-annual-report-2021.txt",
"highlights":[
"I do just want to note that in our case, the silent partner is not so silent.\n\nJPMorgan Chase is a healthy and thriving company, and we always want to give\r\nback and pay our fair share.\n\nWe do — and we want it to be spent well and have\r\nthe greatest impact.\n\nTo give you an idea of where our taxes and fees go: In the\r\nlast 10 years, we paid $42 billion in federal, state and local taxes in the United\r\nStates and $17 billion in taxes outside of the United States.\n\nWe also paid the\r\nFederal Deposit Insurance Corporation $11 billion so that it has the resources\r\nto cover the failure of any major American bank.",
"31 Traditional assets include Equity, Fixed Income, Multi-Asset and Liquidity assets under\r\n2 Federal Deposit Insurance Corporation (“FDIC”)\n\n2021 Summary of Deposits survey per S&P management; Brokerage, Administration and Custody assets under supervision.",
"In addition to banks’ shrinking global role, you\r\n U.S. debt and equity markets, down from 11% can see that the number of public companies,\r\n in 2010.\n\nwhich should have grown substantially over the\r\n• Conversely, U.S. banks’ liquid assets are up past decade, is remarkably reduced.\n\nInstead, U.S.\r\n more than 300% to $8.6 trillion, most of which public companies peaked in 1996 at 7,300 and\r\n is needed to meet liquidity requirements.\n\nnow total 4,800.\n\nConversely, the number of pri-\r\n vate U.S. companies backed by private equity\r\n• Banks’ share of mortgage originations has companies has grown from 1,600 to 10,100 — a\r\n gone from 91% to 32%.\n\nremarkable increase.",
"Before we give an update on the\r\n million customer accounts — refunding more\r\nstructural shifts taking place, it would be good to\r\n than $250 million for nearly 2 million consumer\r\naddress the question: How did banks perform\r\n deposit and lending accounts and offering\r\nduring the recent COVID-19 crisis?",
"Although I begin this annual letter to shareholders in a challenging landscape,\r\nI remain proud of what our company and our hundreds of thousands of employ-\r\nees around the world have achieved, collectively and individually.\n\nAs you know,\r\nwe have long championed the essential role of banking in a community — its\r\npotential for bringing people together, for enabling companies and individuals to\r\nreach for their dreams, and for being a source of strength in difficult times.\n\nThroughout these past two challenging years, we never stopped doing all the\r\nthings we should be doing to serve our clients and our communities.\n\nLooking back on the last year and the past two decades — starting from my time\r\nas CEO of Bank One in 2000 — it is clear that our financial discipline, constant\r\ninvestment in innovation and ongoing development of our people are what\r\nenabled us to persevere in our steadfast dedication to help clients, communities\r\nand countries throughout the world."
],
"publicUrl":"https://www.jpmorganchase.com/ir/annual-report"
}
]
}
修改于 2023-11-13 03:59:23