ナレッジベースの単一ターン Q&A 結果を照会します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
polardb:DescribeKnowledgeBaseAnswer |
get |
*All resources.
|
なし | なし |
リクエスト構文
POST HTTP/1.1
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
リージョン ID。 |
cn-beijing |
| KnowledgeBaseId |
string |
必須 |
ナレッジベースの一意な識別子。 |
pkb-xxxxx |
| QueryId |
string |
必須 |
Q&A タスクの一意な識別子。 |
R3BGbnBqcXN******.2a5a23c9-******-179970533d30 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンスのスキーマ。 |
||
| AgentId |
string |
エージェント ID。 |
****** |
| Answer |
string |
回答内容。 |
The content of the financial report is summarized as follows: ****** |
| CompletionTokens |
integer |
コンプリートにより生成されたトークンの累積数。 |
3935 |
| ErrorMessage |
string |
エラーメッセージ。 |
Space not found: pks-xxxx |
| ErrorType |
string |
エラータイプ。 |
not_found |
| LLMModelId |
string |
large 言語モデルの ID。 |
OO1A6p8B******_xPUC |
| PromptTokens |
integer |
プロンプトにより消費されたトークンの累積数。 |
2459 |
| QueryId |
string |
Q&A タスクの一意な識別子。 |
R3BGbnBqcXN******.2a5a23c9-******-179970533d30 |
| RequestId |
string |
リクエストの ID。 |
CDB3258F-B5DE-43C4-8935-CBA0CA****** |
| Sources |
array<object> |
回答のリファレンスソースのリスト。 |
|
|
array<object> |
回答のリファレンスソース情報。 |
||
| ChunkMetadata |
object |
チャンクのメタデータ。 |
{} |
| FileId |
string |
ファイルの ID。 |
91b97b71-xxxx-xxxx-xxxx-33c6a6341cdc |
| FileName |
string |
ファイル名。 |
FinancialReport.pdf |
| ImageResources |
array<object> |
Q&A でリファレンスされたチャンクに関連付けられたイメージリソースのリスト。 |
|
|
object |
イメージリソース。 |
||
| DocumentIndex |
integer |
イメージが属するソースドキュメントのインデックス。0 から始まります。 |
0 |
| Id |
string |
イメージリソースの一意な識別子。 |
document-0/pictures/1 |
| ItemRef |
string |
ソースドキュメント構造内のイメージの要素リファレンス。 |
#/pictures/1 |
| MimeType |
string |
イメージリソースのメディアタイプ。 |
image/png |
| Uri |
string |
イメージリソースの OSS URI。 |
oss://my-bucket/results/my-space/doc-001/artifacts/image-1.png |
| KnowledgeBaseId |
string |
ナレッジベースの一意な識別子。 |
pkb-xxxxx |
| Metadata |
object |
ドキュメントのメタデータ。 |
{} |
| PageNumbers |
array |
チャンクが属するページ番号のリスト。 |
|
|
integer |
チャンクが属するページ番号。 |
2 |
|
| ShardContent |
string |
チャンクのコンテンツ。 |
Financial report |
| ShardIndex |
integer |
チャンクの ID。 |
8 |
| SimilarityScore |
number |
類似度スコア。 |
0.75 |
| SourceId |
integer |
ソースの ID。 |
1 |
| SourceUri |
string |
ソースドキュメントの URI。 |
https://example.com/source.pdf |
| Status |
string |
Q&A タスクのステータス。有効な値:
|
COMPLETED |
例
成功レスポンス
JSONJSON
{
"AgentId": "******",
"Answer": "The content of the financial report is summarized as follows: ******",
"CompletionTokens": 3935,
"ErrorMessage": "Space not found: pks-xxxx",
"ErrorType": "not_found",
"LLMModelId": "OO1A6p8B******_xPUC",
"PromptTokens": 2459,
"QueryId": "R3BGbnBqcXN******.2a5a23c9-******-179970533d30",
"RequestId": "CDB3258F-B5DE-43C4-8935-CBA0CA******",
"Sources": [
{
"ChunkMetadata": {},
"FileId": "91b97b71-xxxx-xxxx-xxxx-33c6a6341cdc",
"FileName": "Financial_Report.pdf",
"ImageResources": [
{
"DocumentIndex": 0,
"Id": "document-0/pictures/1",
"ItemRef": "#/pictures/1",
"MimeType": "image/png",
"Uri": "oss://my-bucket/results/my-space/doc-001/artifacts/image-1.png"
}
],
"KnowledgeBaseId": "pkb-xxxxx",
"Metadata": {},
"PageNumbers": [
2
],
"ShardContent": "Financial report",
"ShardIndex": 8,
"SimilarityScore": 0.75,
"SourceId": 1,
"SourceUri": "https://example.com/source.pdf"
}
],
"Status": "COMPLETED"
}
エラーコード
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。