Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class RagChunk.
A RagChunk includes the content of a chunk of a RagFile, and associated metadata.
Generated from protobuf message google.cloud.aiplatform.v1.RagChunk
Namespace
Google \ Cloud \ AIPlatform \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ text |
string
The content of the chunk. |
↳ page_span |
RagChunk\PageSpan
If populated, represents where the chunk starts and ends in the document. |
getText
The content of the chunk.
| Returns | |
|---|---|
| Type | Description |
string |
|
setText
The content of the chunk.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPageSpan
If populated, represents where the chunk starts and ends in the document.
| Returns | |
|---|---|
| Type | Description |
RagChunk\PageSpan|null |
|
hasPageSpan
clearPageSpan
setPageSpan
If populated, represents where the chunk starts and ends in the document.
| Parameter | |
|---|---|
| Name | Description |
var |
RagChunk\PageSpan
|
| Returns | |
|---|---|
| Type | Description |
$this |
|