public static final class SearchRequest.SessionSpec extends com.google.protobuf.GeneratedMessageV3 implements SearchRequest.SessionSpecOrBuilder
Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.Protobuf type
google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec| Modifier and Type | Class and Description |
|---|---|
static class |
SearchRequest.SessionSpec.Builder
Session specification.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
QUERY_ID_FIELD_NUMBER |
static int |
SEARCH_RESULT_PERSISTENCE_COUNT_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static SearchRequest.SessionSpec |
getDefaultInstance() |
SearchRequest.SessionSpec |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<SearchRequest.SessionSpec> |
getParserForType() |
String |
getQueryId()
If set, the search result gets stored to the "turn" specified by this
query ID.
|
com.google.protobuf.ByteString |
getQueryIdBytes()
If set, the search result gets stored to the "turn" specified by this
query ID.
|
int |
getSearchResultPersistenceCount()
The number of top search results to persist.
|
int |
getSerializedSize() |
int |
hashCode() |
boolean |
hasSearchResultPersistenceCount()
The number of top search results to persist.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static SearchRequest.SessionSpec.Builder |
newBuilder() |
static SearchRequest.SessionSpec.Builder |
newBuilder(SearchRequest.SessionSpec prototype) |
SearchRequest.SessionSpec.Builder |
newBuilderForType() |
protected SearchRequest.SessionSpec.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static SearchRequest.SessionSpec |
parseDelimitedFrom(InputStream input) |
static SearchRequest.SessionSpec |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.SessionSpec |
parseFrom(byte[] data) |
static SearchRequest.SessionSpec |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.SessionSpec |
parseFrom(ByteBuffer data) |
static SearchRequest.SessionSpec |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.SessionSpec |
parseFrom(com.google.protobuf.ByteString data) |
static SearchRequest.SessionSpec |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.SessionSpec |
parseFrom(com.google.protobuf.CodedInputStream input) |
static SearchRequest.SessionSpec |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SearchRequest.SessionSpec |
parseFrom(InputStream input) |
static SearchRequest.SessionSpec |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<SearchRequest.SessionSpec> |
parser() |
SearchRequest.SessionSpec.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int QUERY_ID_FIELD_NUMBER
public static final int SEARCH_RESULT_PERSISTENCE_COUNT_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getQueryId()
If set, the search result gets stored to the "turn" specified by this
query ID.
Example: Let's say the session looks like this:
session {
name: ".../sessions/xxx"
turns {
query { text: "What is foo?" query_id: ".../questions/yyy" }
answer: "Foo is ..."
}
turns {
query { text: "How about bar then?" query_id: ".../questions/zzz" }
}
}
The user can call /search API with a request like this:
session: ".../sessions/xxx"
session_spec { query_id: ".../questions/zzz" }
Then, the API stores the search result, associated with the last turn.
The stored search result can be used by a subsequent /answer API call
(with the session ID and the query ID specified). Also, it is possible
to call /search and /answer in parallel with the same session ID & query
ID.
string query_id = 1;getQueryId in interface SearchRequest.SessionSpecOrBuilderpublic com.google.protobuf.ByteString getQueryIdBytes()
If set, the search result gets stored to the "turn" specified by this
query ID.
Example: Let's say the session looks like this:
session {
name: ".../sessions/xxx"
turns {
query { text: "What is foo?" query_id: ".../questions/yyy" }
answer: "Foo is ..."
}
turns {
query { text: "How about bar then?" query_id: ".../questions/zzz" }
}
}
The user can call /search API with a request like this:
session: ".../sessions/xxx"
session_spec { query_id: ".../questions/zzz" }
Then, the API stores the search result, associated with the last turn.
The stored search result can be used by a subsequent /answer API call
(with the session ID and the query ID specified). Also, it is possible
to call /search and /answer in parallel with the same session ID & query
ID.
string query_id = 1;getQueryIdBytes in interface SearchRequest.SessionSpecOrBuilderpublic boolean hasSearchResultPersistenceCount()
The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;hasSearchResultPersistenceCount in interface SearchRequest.SessionSpecOrBuilderpublic int getSearchResultPersistenceCount()
The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. At most 10 results for documents mode, or 50 for chunks mode.
optional int32 search_result_persistence_count = 2;getSearchResultPersistenceCount in interface SearchRequest.SessionSpecOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static SearchRequest.SessionSpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.SessionSpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.SessionSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.SessionSpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.SessionSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.SessionSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SearchRequest.SessionSpec parseFrom(InputStream input) throws IOException
IOExceptionpublic static SearchRequest.SessionSpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SearchRequest.SessionSpec parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static SearchRequest.SessionSpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SearchRequest.SessionSpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static SearchRequest.SessionSpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic SearchRequest.SessionSpec.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static SearchRequest.SessionSpec.Builder newBuilder()
public static SearchRequest.SessionSpec.Builder newBuilder(SearchRequest.SessionSpec prototype)
public SearchRequest.SessionSpec.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected SearchRequest.SessionSpec.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static SearchRequest.SessionSpec getDefaultInstance()
public static com.google.protobuf.Parser<SearchRequest.SessionSpec> parser()
public com.google.protobuf.Parser<SearchRequest.SessionSpec> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public SearchRequest.SessionSpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.