Interface FactChunkOrBuilder (0.51.0)

public interface FactChunkOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsSourceMetadata(String key)

public abstract boolean containsSourceMetadata(String key)

More fine-grained information for the source reference.

map<string, string> source_metadata = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

getChunkText()

public abstract String getChunkText()

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

string chunk_text = 1;

Returns
Type Description
String

The chunkText.

getChunkTextBytes()

public abstract ByteString getChunkTextBytes()

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

string chunk_text = 1;

Returns
Type Description
ByteString

The bytes for chunkText.

getIndex()

public abstract int getIndex()

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

int32 index = 4;

Returns
Type Description
int

The index.

getSource()

public abstract String 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.

string source = 2;

Returns
Type Description
String

The source.

getSourceBytes()

public abstract ByteString getSourceBytes()

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.

string source = 2;

Returns
Type Description
ByteString

The bytes for source.

getSourceMetadata() (deprecated)

public abstract Map<String,String> getSourceMetadata()
Returns
Type Description
Map<String,String>

getSourceMetadataCount()

public abstract int getSourceMetadataCount()

More fine-grained information for the source reference.

map<string, string> source_metadata = 3;

Returns
Type Description
int

getSourceMetadataMap()

public abstract Map<String,String> getSourceMetadataMap()

More fine-grained information for the source reference.

map<string, string> source_metadata = 3;

Returns
Type Description
Map<String,String>

getSourceMetadataOrDefault(String key, String defaultValue)

public abstract String getSourceMetadataOrDefault(String key, String defaultValue)

More fine-grained information for the source reference.

map<string, string> source_metadata = 3;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getSourceMetadataOrThrow(String key)

public abstract String getSourceMetadataOrThrow(String key)

More fine-grained information for the source reference.

map<string, string> source_metadata = 3;

Parameter
Name Description
key String
Returns
Type Description
String