Google Cloud Discovery Engine V1 Client - Class FactChunk (1.2.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class FactChunk.

Fact Chunk.

Generated from protobuf message google.cloud.discoveryengine.v1.FactChunk

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ chunk_text string

Text content of the fact chunk. Can be at most 10K characters long.

↳ source string

Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.

↳ index int

The index of this chunk. Currently, only used for the streaming mode.

↳ source_metadata array|Google\Protobuf\Internal\MapField

More fine-grained information for the source reference.

getChunkText

Text content of the fact chunk. Can be at most 10K characters long.

Returns
Type Description
string

setChunkText

Text content of the fact chunk. Can be at most 10K characters long.

Parameter
Name Description
var string
Returns
Type Description
$this

getSource

Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.

Returns
Type Description
string

setSource

Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.

Parameter
Name Description
var string
Returns
Type Description
$this

getIndex

The index of this chunk. Currently, only used for the streaming mode.

Returns
Type Description
int

setIndex

The index of this chunk. Currently, only used for the streaming mode.

Parameter
Name Description
var int
Returns
Type Description
$this

getSourceMetadata

More fine-grained information for the source reference.

Returns
Type Description
Google\Protobuf\Internal\MapField

setSourceMetadata

More fine-grained information for the source reference.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this