public final class Fact extends GeneratedMessageV3 implements FactOrBuilder
The fact used in grounding.
Protobuf type google.cloud.aiplatform.v1.Fact
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int QUERY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int SCORE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int SUMMARY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int TITLE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int URI_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int VECTOR_DISTANCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static Fact getDefaultInstance()
Returns |
Type |
Description |
Fact |
|
public static final Descriptors.Descriptor getDescriptor()
public static Fact.Builder newBuilder()
public static Fact.Builder newBuilder(Fact prototype)
Parameter |
Name |
Description |
prototype |
Fact
|
public static Fact parseDelimitedFrom(InputStream input)
Returns |
Type |
Description |
Fact |
|
public static Fact parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(ByteString data)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(CodedInputStream input)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(InputStream input)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(ByteBuffer data)
Returns |
Type |
Description |
Fact |
|
public static Fact parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Fact |
|
public static Parser<Fact> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public Fact getDefaultInstanceForType()
Returns |
Type |
Description |
Fact |
|
public Parser<Fact> getParserForType()
Overrides
Query that is used to retrieve this fact.
optional string query = 1;
Returns |
Type |
Description |
String |
The query.
|
public ByteString getQueryBytes()
Query that is used to retrieve this fact.
optional string query = 1;
Returns |
Type |
Description |
ByteString |
The bytes for query.
|
If present, according to the underlying Vector DB and the selected metric
type, the score can be either the distance or the similarity between the
query and the fact and its range depends on the metric type.
For example, if the metric type is COSINE_DISTANCE, it represents the
distance between the query and the fact. The larger the distance, the less
relevant the fact is to the query. The range is [0, 2], while 0 means the
most relevant and 2 means the least relevant.
optional double score = 6;
Returns |
Type |
Description |
double |
The score.
|
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public String getSummary()
If present, the summary/snippet of the fact.
optional string summary = 4;
Returns |
Type |
Description |
String |
The summary.
|
public ByteString getSummaryBytes()
If present, the summary/snippet of the fact.
optional string summary = 4;
Returns |
Type |
Description |
ByteString |
The bytes for summary.
|
If present, it refers to the title of this fact.
optional string title = 2;
Returns |
Type |
Description |
String |
The title.
|
public ByteString getTitleBytes()
If present, it refers to the title of this fact.
optional string title = 2;
Returns |
Type |
Description |
ByteString |
The bytes for title.
|
If present, this uri links to the source of the fact.
optional string uri = 3;
Returns |
Type |
Description |
String |
The uri.
|
public ByteString getUriBytes()
If present, this uri links to the source of the fact.
optional string uri = 3;
Returns |
Type |
Description |
ByteString |
The bytes for uri.
|
public double getVectorDistance()
Deprecated. google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See
google/cloud/aiplatform/v1/vertex_rag_service.proto;l=284
If present, the distance between the query vector and this fact vector.
optional double vector_distance = 5 [deprecated = true];
Returns |
Type |
Description |
double |
The vectorDistance.
|
public boolean hasQuery()
Query that is used to retrieve this fact.
optional string query = 1;
Returns |
Type |
Description |
boolean |
Whether the query field is set.
|
public boolean hasScore()
If present, according to the underlying Vector DB and the selected metric
type, the score can be either the distance or the similarity between the
query and the fact and its range depends on the metric type.
For example, if the metric type is COSINE_DISTANCE, it represents the
distance between the query and the fact. The larger the distance, the less
relevant the fact is to the query. The range is [0, 2], while 0 means the
most relevant and 2 means the least relevant.
optional double score = 6;
Returns |
Type |
Description |
boolean |
Whether the score field is set.
|
public boolean hasSummary()
If present, the summary/snippet of the fact.
optional string summary = 4;
Returns |
Type |
Description |
boolean |
Whether the summary field is set.
|
public boolean hasTitle()
If present, it refers to the title of this fact.
optional string title = 2;
Returns |
Type |
Description |
boolean |
Whether the title field is set.
|
If present, this uri links to the source of the fact.
optional string uri = 3;
Returns |
Type |
Description |
boolean |
Whether the uri field is set.
|
public boolean hasVectorDistance()
Deprecated. google.cloud.aiplatform.v1.Fact.vector_distance is deprecated. See
google/cloud/aiplatform/v1/vertex_rag_service.proto;l=284
If present, the distance between the query vector and this fact vector.
optional double vector_distance = 5 [deprecated = true];
Returns |
Type |
Description |
boolean |
Whether the vectorDistance field is set.
|
Returns |
Type |
Description |
int |
|
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public Fact.Builder newBuilderForType()
protected Fact.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public Fact.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides