Struct google_api_proto::google::cloud::discoveryengine::v1::search_request::SessionSpec
source · pub struct SessionSpec {
pub query_id: String,
pub search_result_persistence_count: Option<i32>,
}
Expand description
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.
Fields§
§query_id: String
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.
search_result_persistence_count: Option<i32>
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.v1.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
At most 10 results for documents mode, or 50 for chunks mode.
Implementations§
source§impl SessionSpec
impl SessionSpec
sourcepub fn search_result_persistence_count(&self) -> i32
pub fn search_result_persistence_count(&self) -> i32
Returns the value of search_result_persistence_count
, or the default value if search_result_persistence_count
is unset.
Trait Implementations§
source§impl Clone for SessionSpec
impl Clone for SessionSpec
source§fn clone(&self) -> SessionSpec
fn clone(&self) -> SessionSpec
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SessionSpec
impl Debug for SessionSpec
source§impl Default for SessionSpec
impl Default for SessionSpec
source§impl Message for SessionSpec
impl Message for SessionSpec
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for SessionSpec
impl PartialEq for SessionSpec
source§fn eq(&self, other: &SessionSpec) -> bool
fn eq(&self, other: &SessionSpec) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SessionSpec
Auto Trait Implementations§
impl Freeze for SessionSpec
impl RefUnwindSafe for SessionSpec
impl Send for SessionSpec
impl Sync for SessionSpec
impl Unpin for SessionSpec
impl UnwindSafe for SessionSpec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request