Full name: projects.locations.exampleStores.searchExamples
Search for similar Examples for given selection criteria.
Endpoint
posthttps://{service-endpoint}/v1beta1/{exampleStore}:searchExamples
Where {service-endpoint} is one of the supported service endpoints.
Path parameters
exampleStore
string
Required. The name of the ExampleStore resource that examples are retrieved from. Format: projects/{project}/locations/{location}/exampleStores/{exampleStore}
Request body
The request body contains data with the following structure:
topK
string (int64 format)
Optional. The number of similar examples to return.
parameters
Union type
parameters can be only one of the following:storedContentsExampleParameters
object (StoredContentsExampleParameters)
The parameters of StoredContentsExamples to be searched.
Response body
Response message for ExampleStoreService.SearchExamples.
If successful, the response body contains data with the following structure:
results[]
object (SimilarExample)
The results of searching for similar examples.
| JSON representation |
|---|
{
"results": [
{
object ( |
StoredContentsExampleParameters
The metadata filters that will be used to search StoredContentsExamples. If a field is unspecified, then no filtering for that field will be applied
functionNames
object (ExamplesArrayFilter)
Optional. The function names for filtering.
query
Union type
query can be only one of the following:searchKey
string
The exact search key to use for retrieval.
contentSearchKey
object (ContentSearchKey)
The chat history to use to generate the search key for retrieval.
| JSON representation |
|---|
{ "functionNames": { object ( |
ContentSearchKey
The chat history to use to generate the search key for retrieval.
contents[]
object (Content)
Required. The conversation for generating a search key.
searchKeyGenerationMethod
object (SearchKeyGenerationMethod)
Required. The method of generating a search key.
| JSON representation |
|---|
{ "contents": [ { object ( |