SessionSpec
Stay organized with collections
Save and categorize content based on your preferences.
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.
JSON representation |
{
"queryId": string,
"searchResultPersistenceCount": integer
} |
Fields |
queryId |
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?" queryId: ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How about bar then?" queryId: ".../questions/zzz" } } } The user can call /search API with a request like this: session: ".../sessions/xxx" sessionSpec { queryId: ".../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.
|
searchResultPersistenceCount |
integer
The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the summaryResultCount field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count . At most 10 results for documents mode, or 50 for chunks mode.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-03 UTC."],[[["The Multi-turn Search feature is currently in private GA and requires using v1alpha or v1beta versions or requesting allowlisting through Google Support."],["The JSON representation for the session specification includes a `queryId` (string) and `searchResultPersistenceCount` (integer)."],["The `queryId` field allows search results to be stored and associated with a specific turn within a session, enabling subsequent /answer API calls to utilize those results."],["The `searchResultPersistenceCount` field defines how many of the top search results are saved for future /answer API calls, with a maximum of 10 results for documents mode and 50 for chunks mode."]]],[]]