DocumentChunk

DocumentChunk 表示 DeveloperKnowledge 语料库中 Document 的一部分内容。如需提取整个文档内容,请将 parent 传递给 DeveloperKnowledge.GetDocumentDeveloperKnowledge.BatchGetDocuments

JSON 表示法
{
  "parent": string,
  "id": string,
  "content": string,
  "document": {
    object (Document)
  },
  "relevanceScore": number
}
字段
parent

string

仅限输出。包含此块所来自的文档的资源名称。格式:documents/{uri_without_scheme} 示例:documents/docs.cloud.google.com/storage/docs/creating-buckets

id

string

仅限输出。指定文档中此块的 ID。块 ID 在文档中是唯一的,但在不同文档之间不是全局唯一的。块 ID 不稳定,可能会随时间变化。

content

string

仅限输出。包含文档块的内容。

document

object (Document)

仅限输出。表示此块所来自的 Document 的元数据。此 Document 消息的 DocumentView 将设置为 DOCUMENT_VIEW_BASIC。此处包含此字段是为了方便起见,这样客户端如果只需要元数据字段,就不需要调用 DeveloperKnowledge.GetDocumentDeveloperKnowledge.BatchGetDocuments。否则,客户端应使用 DeveloperKnowledge.GetDocumentDeveloperKnowledge.BatchGetDocuments 来提取完整文档内容。

relevanceScore

number

仅限输出。表示块与搜索查询的相关性得分。得分越高,表示块的相关性越高。得分在 [0.0, 1.0] 范围内。