langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever¶
class langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever[source]¶
Bases: BaseRetriever
Google Cloud Enterprise Search API retriever.
For a detailed explanation of the Enterprise Search concepts
and configuration parameters, refer to the product documentation.
https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction
Initializes private fields.
param credentials: Any = None¶
The default custom credentials (google.auth.credentials.Credentials) to use
when making API calls. If not provided, credentials will be ascertained from
the environment.
param engine_data_type: int = 0¶
Defines the enterprise search data type
0 - Unstructured data
1 - Structured data
Constraints
minimum = 0
maximum = 1
param filter: Optional[str] = None¶
Filter expression.
param get_extractive_answers: bool = False¶
If True return Extractive Answers, otherwise return Extractive Segments.
param location_id: str = 'global'¶
Enterprise Search engine location.
param max_documents: int = 5¶
The maximum number of documents to return.
Constraints
minimum = 1
maximum = 100
param max_extractive_answer_count: int = 1¶
The maximum number of extractive answers returned in each search result.
At most 5 answers will be returned for each SearchResult.
Constraints
minimum = 1
maximum = 5
param max_extractive_segment_count: int = 1¶
The maximum number of extractive segments returned in each search result.
Currently one segment will be returned for each SearchResult.
Constraints
minimum = 1
maximum = 1
param metadata: Optional[Dict[str, Any]] = None¶